Skip to content

Infer Docker registry host from workspace profile - #6782

Open
yolocs wants to merge 1 commit into
mainfrom
chen-shou_data/stack/auth-docker-infer-region-hosts
Open

yolocs wants to merge 1 commit into
mainfrom
chen-shou_data/stack/auth-docker-infer-region-hosts

Conversation

@yolocs

@yolocs yolocs commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

🥞 Stacked PR (generated by git ns)

Use this link to review incremental changes.


Changes

Docker setup now needs only a workspace profile. The CLI resolves the workspace ID, obtains the workspace region from its metastore summary, derives the full Artifact Registry hostname, and configures Docker for that host:

$ databricks auth docker configure --profile PROD
Configured Docker credential helper for 1234567890123456.container.us-west-2.cloud.databricks.com
Updated Docker config: /Users/alice/.docker/config.json
Installed Docker credential helper: /usr/local/bin/docker-credential-databricks

Users no longer need to look up and supply the workspace home region. The existing --region flag remains available for compatibility, emits a deprecation warning when used, and is scheduled for removal in the next release.

The new read-only host command returns both the derived registry hostname and whether Docker is already configured to use the Databricks credential helper:

$ databricks auth docker host --profile PROD
Registry host: 1234567890123456.container.us-west-2.cloud.databricks.com
Credential helper configured: YES

Structured output makes the result available to scripts without reconstructing the hostname:

$ databricks auth docker host --profile PROD --output json
{
  "host": "1234567890123456.container.us-west-2.cloud.databricks.com",
  "configured": true
}

Why

Workspace profiles do not expose the home region directly, and asking users to discover it separately made Docker setup unnecessarily error-prone. The workspace metastore already provides the matching region, so the CLI can derive the correct registry host from the selected profile and expose that same result for later commands and automation.

Tests

  • ./task checks
  • go test ./libs/dockercredentials ./cmd/auth ./cmd/root -count=1
  • go test ./acceptance -run '^TestAccept/cmd/auth/docker/help$' -count=1 -timeout=10m

This PR was written by Codex.

@yolocs
yolocs force-pushed the chen-shou_data/stack/auth-docker-infer-region-hosts branch from d4fef20 to 416ca6a Compare September 21, 2026 17:30
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 319effe

Run: 35643072284

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux 276 16 4:20
🔄​ aws windows 3 275 14 4:07
✅​ azure linux 275 16 4:16
✅​ azure windows 277 14 3:25
✅​ gcp linux 276 16 4:29
✅​ gcp windows 278 14 3:21
Test Name aws windows
🔄​ TestFsCpDir/dbfs_to_dbfs 🔄​f
🔄​ TestFsCpDir/dbfs_to_local 🔄​f
🔄​ TestFsCpDir/local_to_dbfs 🔄​f
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:24 aws windows TestAccept
3:24 azure windows TestAccept
3:19 gcp windows TestAccept

@yolocs
yolocs force-pushed the chen-shou_data/stack/auth-docker-infer-region-hosts branch from 416ca6a to 319effe Compare September 21, 2026 19:09
@yolocs
yolocs marked this pull request as ready for review September 21, 2026 19:38
@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/cmd/auth/ - needs approval

6 files changed
Suggested: @simonfaltum
Also eligible: @renaudhartert-db, @hectorcast-db, @parthban-db, @tanmay-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

General files (require maintainer)

6 files changed
Based on git history:

  • @pietern -- recent work in cmd/auth/docker/, libs/dockercredentials/, .nextchanges/cli/

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

This branch has not been deployed

No deployments
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.

2 participants