-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix supervisor panic when tkns and publicapi Service is nil #15274
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
Conversation
started the job as gitpod-build-hw-supervisor.3 because the annotations in the pull request description changed |
3830f6f
to
10e0bcc
Compare
10e0bcc
to
e081051
Compare
@@ -32,10 +37,23 @@ type Attributes struct { | |||
// If the environment contains CONFIGCAT_SDK_KEY value, it vill be used to construct a ConfigCat client. | |||
// Otherwise, it returns a client which always returns the default value. This client is used for Self-Hosted installations. | |||
func NewClient() Client { | |||
gitpodHost := os.Getenv("GITPOD_HOST") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mustard-mh it is a internal secret of supervisor which is a subject to change, why don't pass it as an argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving to unblock, see comments for style/improvements
return newConfigCatClient(configcat.Config{ | ||
SDKKey: "gitpod", | ||
BaseURL: fmt.Sprintf("%s%s", gitpodHost, "/configcat"), | ||
PollInterval: 1 * time.Minute, | ||
HTTPTimeout: 3 * time.Second, | ||
}) | ||
} | ||
sdkKey := os.Getenv("CONFIGCAT_SDK_KEY") | ||
if sdkKey == "" { | ||
return NewAlwaysReturningDefaultValueClient() | ||
} | ||
|
||
return newConfigCatClient(sdkKey) | ||
return newConfigCatClient(configcat.Config{ | ||
SDKKey: sdkKey, | ||
PollInterval: 3 * time.Minute, | ||
HTTPTimeout: 3 * time.Second, | ||
Logger: &configCatLogger{log.Log}, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's duplication in the config that could be reduced.
Description
Review only commit e081051
Test also
Related Issue(s)
Fixes #
How to test
Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh