Skip to content

acc: record target override failure when the bundle key is null - #8165

Merged
denik merged 2 commits into
mainfrom
denik/acc-null-bundle-key
Nov 29, 2026
Merged

denik merged 2 commits into
mainfrom
denik/acc-null-bundle-key

Conversation

@denik

@denik denik commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Changes

New test acceptance/bundle/override/null-bundle-key: a databricks.yml whose bundle: key is present but empty (null), as it is when every field under it is commented out, with four targets. bundle validate -o json -t <target> currently:

  • mode: development: Error: failed to perform target override for target=with_mode: expected a map to index "bundle.mode", found nil
  • cluster_id: ...: the same error for bundle.cluster_id
  • git: {branch: main}: the same error for bundle.git
  • no overrides: validates, with only the required field "name" is not set warning.

With bundle: {} instead of bundle: all four targets validate. The name is left out on purpose (it would make bundle a map); workspace.root_path makes the bundle valid without one. Badness in test.toml describes the wrong behavior and the expected one.

Cause: MergeTargetOverrides in bundle/config/root.go creates the bundle map before it sets mode, cluster_id and git, but only when the key is missing (dyn.KindInvalid), not when it is null (dyn.KindNil).

Why

This PR was created by analyzing coverage gaps. Coverage: http://go/cli/dashboard/coverage/file/bundle/config/root.go ((*Root).MergeTargetOverrides, lines 329-451: the error returns after setting bundle.mode, bundle.cluster_id and bundle.git never ran).
This is a new small test next to the other override tests; none of them has a null bundle key. It only runs bundle validate (about 1-2s locally, DMS matrix inherited from acceptance/bundle, 2 variants).

Fix: #8166

Gaps and risks

  • Test-only: one new acceptance test, no production code. It records the current wrong behavior; only bundle validate runs, not deploy (deploy fails the same way, since both select the target through the same mutator).
  • Risk: low.

🤖 AI agent (opus5.5, isaac_claude)

This pull request and its description were written by Isaac.

When databricks.yml has an empty (null) bundle key, a target that sets
mode, cluster_id or git fails with 'expected a map to index "bundle.mode",
found nil'. Record the current behavior with Badness.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added DABs DABs related issues test-only-fix PRs that update failing of flaky tests without changing CLI code. labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: ab914735e | Workflow run

Selected 1 changed tests (limit=20, 0 not selected)

2 tests: regression=0 unreleased=0 coverage=2 failing=0
test branch main (5cdaeb8) latest (v1.28.0)
TestAccept/bundle/override/null-bundle-key/DMS= ✅ ✅ ✅
TestAccept/bundle/override/null-bundle-key/DMS=true ✅ ✅ ✅

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: ab91473

Run: 46210162869

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 174 18 4:43
✅​ aws-windows-latest-4core-16gb 174 18 1:32
✅​ azure linux-2core-8gb 173 18 4:31
✅​ azure-windows-latest-4core-16gb 173 18 1:38
✅​ gcp linux-2core-8gb 174 18 5:07
✅​ gcp-windows-latest-4core-16gb 174 18 2:10
Top 3 slowest tests (at least 2 minutes):
duration env testname
4:24 aws linux-2core-8gb TestAccept
3:56 azure linux-2core-8gb TestAccept
3:50 gcp linux-2core-8gb TestAccept

@denik
denik marked this pull request as ready for review November 29, 2026 00:44
@denik
denik requested review from a team as code owners November 29, 2026 00:44

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review at 14a0932. Each finding was verified against the code.

No blocking issues found. 1 non-blocking comment(s) below.

This PR adds the acceptance test acceptance/bundle/override/null-bundle-key. It captures the current failure when bundle: is present but null and a target sets mode, cluster_id or git, with a Badness entry describing the expected behavior. The test is fine as a record of the bug. The one problem is that it filters the JSON output with an inline jq pipeline, which the testing rules ask to replace with the acceptance/bin helpers.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik requested a review from andrewnester November 29, 2026 01:12

@Sankalp-Mittal Sankalp-Mittal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI Generated] Follow-up review by review-factory (Claude Opus 5.5 + Claude Sonnet 5.5 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.

No new issues found.

@denik
denik added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 8defc0e Nov 29, 2026
27 checks passed
@denik
denik deleted the denik/acc-null-bundle-key branch November 29, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues factory-generated test-only-fix PRs that update failing of flaky tests without changing CLI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants