Skip to content

Do not write a dotted profile's keys into its parent section - #7266

Merged
maksim-zuev-db merged 4 commits into
mainfrom
databrickscfg-save-own-section-keys
Nov 3, 2026
Merged

maksim-zuev-db merged 4 commits into
mainfrom
databrickscfg-save-own-section-keys

Conversation

@maksim-zuev-db

@maksim-zuev-db maksim-zuev-db commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Changes

SaveToProfile and SaveResourcesToProfile now write keys with section.NewKey instead of section.Key, so they only touch the target section's own keys.

Why

Follow-up to this review comment on #7196.

go-ini treats [team.prod] as a child of [team], and section.Key returns the parent's key when the child doesn't have it. So saving a new team.prod profile wrote the missing keys into [team]: databricks auth login rewrote its host, and databricks configure rewrote its host and token. SaveResourcesToProfile overwrote the parent's resources the same way.

Tests

  • TestSaveToProfile_DottedNameDoesNotWriteParentSection saves to team.prod next to an existing [team] and checks both sections. It fails without the fix.
  • libs/databrickscfg/..., cmd/auth and cmd/configure unit tests pass.

This pull request and its description were written by Isaac.

maksim-zuev-db and others added 2 commits October 30, 2026 15:10
go-ini treats [team.prod] as a child of [team], and Section.Key returns
the parent's key when the child doesn't have it. So saving host to a new
[team.prod] next to an existing [team] rewrote [team]'s host and left
[team.prod] without it. SaveResourcesToProfile had the same problem.
Section.NewKey only looks at the section's own keys.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 11832c8

Run: 41628015045

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 15 5:26
✅​ aws-windows-latest-4core-16gb 283 13 3:20
✅​ azure linux-2core-8gb 280 15 5:23
✅​ azure-windows-latest-4core-16gb 282 13 3:37
✅​ gcp linux-2core-8gb 281 15 5:27
✅​ gcp-windows-latest-4core-16gb 283 13 3:26
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:10 gcp linux-2core-8gb TestAccept
4:10 aws linux-2core-8gb TestAccept
4:07 azure linux-2core-8gb TestAccept
3:29 azure-windows-latest-4core-16gb TestAccept
3:19 gcp-windows-latest-4core-16gb TestAccept
3:14 aws-windows-latest-4core-16gb TestAccept

Co-authored-by: Isaac <no-reply@databricks.com>
@maksim-zuev-db
maksim-zuev-db marked this pull request as ready for review November 2, 2026 12:08
@maksim-zuev-db
maksim-zuev-db requested review from a team as code owners November 2, 2026 12:09

@simonfaltum simonfaltum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The section-local writes fix dotted profiles overwriting their parent's keys and preserve existing merge behavior. No blocking issues found.

Validation: go test -count=1 ./libs/databrickscfg/... ./cmd/auth/... ./cmd/configure passed locally; CI is green.

Non-blocking nit in libs/databrickscfg/ops_test.go:218-243: please use https://team.test and https://prod.test throughout the new fixture, per the reserved test-domain rule in AGENTS.md.

Co-authored-by: Isaac <no-reply@databricks.com>
@maksim-zuev-db
maksim-zuev-db added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 050b89d Nov 3, 2026
28 checks passed
@maksim-zuev-db
maksim-zuev-db deleted the databrickscfg-save-own-section-keys branch November 3, 2026 12:00
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 050b89d

Run: 41632357113

Env ❌​FAIL 🔄​flaky ✅​pass 🙈​skip Time
❌​ aws linux-2core-8gb 2 1502 1230 279:21
❌​ aws-windows-latest-4core-16gb 1 7 1421 1255 347:47
🔄​ azure linux-2core-8gb 3 1348 1282 259:34
✅​ azure-windows-latest-4core-16gb 1276 1307 269:48
✅​ gcp linux-2core-8gb 1338 1287 272:38
✅​ gcp-windows-latest-4core-16gb 1263 1312 292:13
10 interesting tests: 8 flaky, 2 FAIL
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb
❌​ TestAccept ❌​F 🔄​f 🔄​f
🔄​ TestAccept/bundle/dms/deployment-metadata-change ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/dms/deployment-metadata-change/DMS=true ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/grants/catalogs ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/grants/catalogs/DMS= ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/grants/schemas/all_privileges ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/grants/schemas/all_privileges/DMS=true ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/grants/schemas/all_privileges_manage ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/grants/schemas/all_privileges_manage/DMS=true ✅​p 🔄​f ✅​p
❌​ TestAccept/bundle/resources/postgres_projects/factcheck/update_mask_spec ❌​F ❌​F 🙈​s
Top 50 slowest tests (at least 2 minutes):
duration env testname
11:23 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
11:20 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:32 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
10:19 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
10:11 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
9:56 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:33 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:26 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
9:17 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
9:08 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
8:41 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:39 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:33 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
8:32 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:24 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
8:22 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:22 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:21 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:03 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
7:47 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:39 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:28 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:26 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:09 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
7:09 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:05 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
6:57 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/update-after-create/DMS=
6:54 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:50 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:46 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:44 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
6:37 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
6:37 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
6:34 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
6:24 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
6:21 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:08 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
6:07 aws-windows-latest-4core-16gb TestAccept/bundle/deploy/immutable/destroy-redeploy/DMS=
6:03 aws-windows-latest-4core-16gb TestAccept/bundle/deploy/spark-jar-task/DMS=
6:02 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
5:52 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
5:49 aws-windows-latest-4core-16gb TestAccept/bundle/deploy/spark-jar-task/DMS=true
5:48 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=job.yml.tmpl/READPLAN=1
5:42 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
5:41 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=
5:35 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
5:33 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
5:32 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
5:32 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=app.yml.tmpl/READPLAN=1
5:29 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true

deco-sdk-tagging Bot added a commit that referenced this pull request Nov 4, 2026
## Release v1.24.0

### Notable Changes

 * A variable used as the value of a secret is now sensitive: referencing it from any other field, such as a job parameter or a secret's `comment`, is an error because the value would be used in plain text. Mark other secret-holding variables with `sensitive: true` to get the same protection. ([#7288](#7288))

### CLI

 * Fix `databricks auth login` and `databricks configure` overwriting the parent profile's host and token when saving a profile with a dotted name such as `team.prod` next to an existing `[team]`. ([#7266](#7266))
 * `databricks auth login` and `databricks auth token` now reject the name of an existing profile after "Create a new profile" instead of logging in to that profile. ([#7196](#7196))
 * `databricks auth login` and `databricks auth token` now reject a host that is not a URL with a hostname, such as `/`, `?o=123` or `https://`, instead of falling back to `DATABRICKS_HOST` or failing later. An empty host after "Enter a host URL manually" in the login profile picker no longer starts discovery login. ([#7195](#7195))
 * Prompts that validate their input, such as the `databricks configure` host prompt, no longer open with a red cross before anything is typed. ([#7314](#7314))
 * `databricks ssh connect` now documents `--environment-version` for choosing the serverless environment version, starts a separate default-named server for each version, and rejects the flag together with `--cluster`. Default connection names also include the environment version in their hash, so the default name when `--environment-version` is not specified changes with this release. Configuration associated with the old connection name (secret scope, SSH keys and known hosts in your local `.databricks` folder) will no longer be used and can be safely removed. ([#7310](#7310))

### AI Runtime

 * Show workspace-supported accelerator types in `databricks air run -h config.compute.accelerator_type`. ([#7275](#7275))
 * `air list` now reports `No active runs found.` for an empty active-only result. ([#7276](#7276))
 * Stop printing a retry notice on every `air run --watch`; retries are still reported when they happen. ([#7270](#7270))

### Bundles

 * Fix `bundle plan` reporting an update to an app's `config.env` values on every run, which also redeployed the app on every `bundle deploy`. The Apps API returns environment variable names only, so `value` and `value_from` are no longer compared against the remote deployment. ([#7326](#7326))
 * Add the `data_quality_monitors` resource for data quality monitors on Unity Catalog schemas and tables (direct engine only). ([#7094](#7094))
 * `bundle deploy` now asks for confirmation before recreating or deleting a Feature View, and `bundle deploy` and `bundle destroy` warn that FeatureSpecs using a Feature View are not checked. ([#7164](#7164))
 * Accept grant `privileges` values that the SDK enum does not list yet: `bundle validate` no longer warns (or errors under `--strict`) on them, and the PyDABs `Privilege` enum accepts unknown strings instead of raising. The JSON schema and PyDABs still advertise the known values for completion. ([#7315](#7315))
 * Add the `materialization_sets` resource, which materializes Feature Store Feature Views to offline and online stores. ([#7164](#7164))
 * Detect notebooks with the same rule as the workspace: a `.py`, `.sql`, `.scala` or `.r` file is a notebook when its first line contains `Databricks notebook source`, for example after a byte order mark. Previously such a file was tracked as a plain file, so removing it locally left the remote notebook behind. ([#7290](#7290))
 * Add `sensitive: true` for bundle variables. A variable used as the value of a secret is sensitive by default. `bundle validate -o json` redacts only sensitive variables instead of every string variable, and a sensitive variable can only be referenced from a sensitive resource field (such as a secret's `value`) or from another sensitive variable. ([#7288](#7288))

### Dependency Updates

 * Bump dependencies with known vulnerabilities. ([#7305](#7305))
 * Bump dependencies with known vulnerabilities. ([#7327](#7327))
 * Update the Go SDK to [v0.191.1](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.191.1). ([#7277](#7277))
 * Update the Go SDK to [v0.193.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.193.0). ([#7303](#7303))
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

Successfully merging this pull request may close these issues.

3 participants