upgrade/upgrades: add env var to skip nonessential bootstrap steps#168623
upgrade/upgrades: add env var to skip nonessential bootstrap steps#168623gmcquillan wants to merge 1 commit intocockroachdb:masterfrom
Conversation
Adds COCKROACH_SKIP_NONESSENTIAL_BOOTSTRAP, a boolean env var read at package init. When set, bootstrapSystem and bootstrapCluster skip the substeps marked skippableInTest, mirroring the existing SkipSomeUpgradeSteps testing knob used by in-process test servers. The existing knob is reachable only via Go-level TestingKnobs, which containerized test harnesses (testcontainers, docker-compose) cannot set. Exposing the same fast path through an env var lets those setups skip the observability scaffolding (scheduled jobs, cluster.secret initialization, diagnostics opt-in, default system.locations entries, key visualizer tables) that isn't needed for short-lived tests, while still executing the essential steps: cluster version, root user and admin role, and default databases. Intended for dev/test clusters only; the env var is not gated by build tags and will take effect in production binaries if set, consistent with the convention established by other COCKROACH_SKIP_* env vars. Epic: none Release note (ops change): Added a new environment variable, COCKROACH_SKIP_NONESSENTIAL_BOOTSTRAP, which when set causes a new cluster to skip the nonessential steps of its first-time bootstrap (scheduled observability jobs, cluster.secret initialization, diagnostics opt-in, default system.locations data, and the key visualizer tables). Intended only for dev/test clusters where bootstrap latency matters; do not enable in production.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
We see |
Adds
COCKROACH_SKIP_NONESSENTIAL_BOOTSTRAP, a boolean env var read atpackage init. When set,
bootstrapSystemandbootstrapClusterskipthe substeps marked
skippableInTest, mirroring the existingSkipSomeUpgradeStepstesting knob used by in-process test servers.The existing knob is reachable only via Go-level
TestingKnobs, whichcontainerized test harnesses (testcontainers, docker-compose) cannot
set. Exposing the same fast path through an env var lets those setups
skip the observability scaffolding (scheduled jobs,
cluster.secretinitialization, diagnostics opt-in, default
system.locationsentries,key visualizer tables) that isn't needed for short-lived tests, while
still executing the essential steps: cluster version, root user and
admin role, and default databases.
Intended for dev/test clusters only; the env var is not gated by build
tags and will take effect in production binaries if set, consistent
with the convention established by other
COCKROACH_SKIP_*env vars.Epic: none
Release note (ops change): Added a new environment variable,
COCKROACH_SKIP_NONESSENTIAL_BOOTSTRAP, which when set causes a newcluster to skip the nonessential steps of its first-time bootstrap
(scheduled observability jobs,
cluster.secretinitialization,diagnostics opt-in, default
system.locationsdata, and the keyvisualizer tables). Intended only for dev/test clusters where bootstrap
latency matters; do not enable in production.