Configure Docker authentication for Artifact Registry - #6336
Draft
yolocs wants to merge 2 commits into
Draft
Conversation
yolocs
force-pushed
the
chen-shou_data/stack/dar-configure-docker-setup-2
branch
from
August 20, 2026 19:40
fd47b79 to
30b0188
Compare
yolocs
force-pushed
the
chen-shou_data/stack/dar-configure-docker-setup-2
branch
from
August 20, 2026 22:38
30b0188 to
2f38bce
Compare
Contributor
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🥞 Stacked PR (generated by git ns)
Use this link to review incremental changes.
Changes
Adds
databricks auth configure-docker [PROFILE] --region REGIONand thedocker-credential-databricksshim.The command selects a workspace profile through
[PROFILE],--profile, or the normal default and interactive profile precedence. It rejects the inherited--host,--account-id, and--workspace-idselectors because the selected profile is the durable mapping from the registry host back to authentication. The profile must be a workspace-scoped U2M login created bydatabricks auth login.If the profile has no
workspace_id, the command resolves and saves one without allowing ambient workspace selectors or the CLI-onlynonesentinel to become SDK routing headers.--regionis required and must equal the workspace home region because the CLI cannot currently infer that value reliably.The registry hostname is generated as
<workspace-id>.container.<region>.<databricks-dns-zone>. The DNS zone comes from the workspace host, preserving AWS, Azure, GCP, and non-production environments. The command then:credHelpers[registry-host] = "databricks"into the Docker config without changing unrelated entries;PATHentry can discover it;get.On success, the command prints the registry host, Docker config path, and helper path. Repeated setup is idempotent. It warns when another helper shadows the installed path.
Why
Docker must request a fresh workspace OAuth token for each Artifact Registry operation rather than storing a short-lived token in
~/.docker/config.json. This setup connects Docker's host-based helper lookup to the--format=dockertoken contract in the parent PR while preserving the user's existing Docker configuration.Tests
go test ./libs/dockercredentials ./cmd/auth ./cmd/root -count=1go test ./acceptance -run '^TestAccept/cmd/auth/configure-docker-help$' -count=1databricks auth login TEST_WS_HOSTdatabricks auth configure-docker --profile test --region <home-region>updates~/.docker/config.jsondocker push <test-ws-id>.container.<home-region>.dev.databricks.com/cat/sch/img:tagsucceedsThis PR was written by Codex.