Skip to content
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

Container should exit with non-zero code on AutoConfigKey error #165

Closed
barakbd opened this issue Jan 28, 2022 · 4 comments
Closed

Container should exit with non-zero code on AutoConfigKey error #165

barakbd opened this issue Jan 28, 2022 · 4 comments

Comments

@barakbd
Copy link

barakbd commented Jan 28, 2022

Is this a support request?
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going here or by emailing [email protected].

Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.

Describe the bug
When an incorrect auto config key is set, the container logs an error but continues to run. This is confusing, as the container should stop running and exit with a non-zero exit code to indicate an immediate problem - fail fast.

To reproduce
Deploy LDRP with incorrect auto config key

Expected behavior
Container exits with non-zero code.

Logs

2022/01/28 10:02:37.446552 INFO: Starting LaunchDarkly relay version 6.6.2 with configuration from environment variables
2022/01/28 10:02:37.451774 INFO: Successfully registered Datadog metrics exporter
2022/01/28 10:02:37.453347 INFO: [AutoConfiguration[] Connecting to auto-configuration stream at https://stream.launchdarkly.com/relay_auto_config
2022/01/28 10:02:37.455837 INFO: Starting server listening on port 8030
2022/01/28 10:02:37.850626 ERROR: [AutoConfiguration[] Invalid auto-configuration key; cannot get environments
2022/01/28 10:02:37.850670 ERROR: [AutoConfiguration[] Unexpected error on auto-configuration stream: error 401

SDK version
N/A

Language version, developer tools
N/A

OS/platform
Ubuntu

Additional context
Add any other context about the problem here.

@eli-darkly
Copy link
Contributor

Thanks for catching this. Should be easy to fix.

When there's an error on an individual environment (like, the SDK key is wrong), we deliberately don't exit unless the ExitOnError option was set, since other apps might be relying on other environments which are working. But if the auto-config key is wrong, there won't be any environments at all and Relay won't accept any requests, so there's no reason for it to keep running.

@eli-darkly
Copy link
Contributor

(Filed internally as 140317)

@eli-darkly
Copy link
Contributor

Version 6.6.4 has been released with this fix.

@barakbd
Copy link
Author

barakbd commented Feb 8, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants