Skip to content

[common-go] force set configcat log level to error #17067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Mar 28, 2023

Description

[common-go] force set configcat log level to error

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@iQQBot iQQBot requested a review from a team as a code owner March 28, 2023 14:29
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-pd-configcat-log-error.1 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-pd-configcat-log-error.2 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-pd-configcat-log-error.3 because the annotations in the pull request description changed
(with .werft/ from main)

@iQQBot
Copy link
Contributor Author

iQQBot commented Mar 28, 2023

/hold

unblock merge queue

@easyCZ
Copy link
Member

easyCZ commented Mar 28, 2023

Would you be able to provide more context as to why?

The log level is intentionally setup to mirror the log level of the rest of the system, so changing the system log level with LOG_LEVEL=debug should have the same effect as we're doing here.

The configcat debug logs can be rather verbose in practice.

@aledbf
Copy link
Member

aledbf commented Mar 28, 2023

@easyCZ
Copy link
Member

easyCZ commented Mar 29, 2023

@iQQBot
Copy link
Contributor Author

iQQBot commented Mar 29, 2023

It always logs as Error because of this https://github.com/gitpod-io/gitpod/blob/pd/configcat-log-error/components/common-go/experiments/configcat.go#L96

@easyCZ It's not true, configcat does not always use this, some times, it direct uses logger.Info which does not check enable

the expected use is like this https://github.com/configcat/go-sdk/blob/218279137924bf88947c8cc8120aec6287b33104/v7/eval.go#L63-L68 but it is not in everywhere

e.g. https://github.com/configcat/go-sdk/blob/218279137924bf88947c8cc8120aec6287b33104/v7/config_fetcher.go#L247-L248 this one will direct call logger.Info which ignores your level setting, and direct fallback to logrus log level

@iQQBot
Copy link
Contributor Author

iQQBot commented Mar 29, 2023

let's merge this first, if we have any problem, we can revert anyway

/unhold

@roboquat roboquat merged commit 8ad7b34 into main Mar 29, 2023
@roboquat roboquat deleted the pd/configcat-log-error branch March 29, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants