-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: fix misreported CRDB environment variables during startup
During server startup, reportConfiguration (see cli/start.go), logs the values of CRDB and other, unredacted environment variables to the Ops channel. These environment variables are read from envVarRegistry.cache (see GetEnvVarsUsed) which is assumed to have been populated during the initialization of the (Go) runtime. Specifically, EnvOrDefaultXXX must be invoked, which has a side-effect of populating the cache. When it's invoked outside of the initializer (e.g., inside a func that's not invoked until after initilization), the corresponding environment variable will _not_ be in envVarRegistry.cache. Hence, it will not be reported. Reporting values of modified environment variables is useful for quickly assembling a configuration context during debugging. It's unfortunate that the current design relies on indirectly populating envVarRegistry.cache during the initialization _withoout_ any sort of enforcement. The change in this PR doesn't attempt to fix it. Instead, the following misreported environment variables are now reported, - COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING - COCKROACH_UPGRADE_TO_DEV_VERSION Note, we also remove COCKROACH_UI_RELEASE_NOTES_SIGNUP_DISMISSED which was only used by roachprod. It has no effect after the PR [1] reverted the related change. Release note: None [1] #57003
- Loading branch information
1 parent
06bb238
commit 01cd700
Showing
7 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters