Repository navigation
acc: record dropped short-form variable override under environments - #8182
Conversation
Regression test report ✅Commit: Selected 1 changed tests (limit=20, 0 not selected) 2 tests: regression=0 unreleased=0 coverage=2 failing=0
|
✅ Integration test reportCommit: 5f584e4
Top 3 slowest tests (at least 2 minutes):
|
There was a problem hiding this comment.
Automated review at 655d23a. Each finding was verified against the code.
No blocking issues found.
This PR adds the acceptance test acceptance/bundle/variables/environments_shorthand. It records that short-form and complex variable overrides under the deprecated environments key get dropped with a normalizer warning, so the root value is used instead. The recorded output matches the current loader: rewriteShorthands in bundle/config/root.go only rewrites under targets, and EnvironmentsToTargets runs after normalization has already dropped the values. The warning line and column numbers also match databricks.yml. The wrong result is marked under Badness, and I found nothing that needs changing before merge.
A target variable written in the short form under the deprecated 'environments' key is dropped with a warning, so the root value is used. Co-authored-by: Isaac <no-reply@databricks.com>
655d23a to
5f584e4
Compare
Changes
New test acceptance/bundle/variables/environments_shorthand. It records that target variable overrides written in the short form under the deprecated
environmentskey are dropped with a warning, so the root value is used:The same overrides under
targets, or in the full form ({default: ...}), work. Badness in test.toml says what is wrong and what is right.Why
This PR was created by analyzing coverage gaps. Coverage: http://go/cli/dashboard/coverage/file/bundle/config/root.go (
rewriteShorthands, the shorthand rewrite that(*Root).MergeTargetOverridesrelies on).environmentsis still accepted. The JSON schema marks it deprecated, but there is no warning at runtime. A bundle that still uses it and overrides a variable in the short form gets the root value without an error. For example, it deploys with the default catalog instead of the target's. No existing test combinesenvironmentswith variables.Fix: #8183
A new small test directory, because
environmentsandtargetscan't be in the same configuration. It runs onebundle validate(about 0.1s per DMS variant locally).Gaps and risks
bundle validateis covered. Every other bundle command goes through the same loader.🤖 AI agent (opus5.5, isaac_claude)
This pull request and its description were written by Isaac.