Repository navigation
Conversation
yolocs
force-pushed
the
stack/docker-shared-workspace-profiles
branch
from
November 5, 2026 21:25
849da49 to
71222b5
Compare
Contributor
|
Commit: Regression test reportSelected 4 changed tests (limit=20, 0 not selected) 4 tests: regression=3 unreleased=0 coverage=1 failing=0
TestAccept/cmd/auth/docker/configure: branch ✅ | main (c461a8f) ❌ | latest (v1.24.0) ❌main (c461a8f): latest (v1.24.0): TestAccept/cmd/auth/docker/help: branch ✅ | main (c461a8f) ❌ | latest (v1.24.0) ❌main (c461a8f): latest (v1.24.0): same output as main (c461a8f) TestAccept/cmd/auth/docker/token: branch ✅ | main (c461a8f) ❌ | latest (v1.24.0) ❌main (c461a8f): latest (v1.24.0): |
Collaborator
✅ Integration test reportCommit: 79702a7
Top 3 slowest tests (at least 2 minutes):
|
auth docker configure now prints a warning instead of failing when several databricks-cli profiles match the workspace. auth docker token uses the first logged-in matching profile, skipping only profiles with no cached login or a rejected refresh token; any other error is returned so the helper never switches identity on a transient failure. Co-authored-by: Isaac <no-reply@databricks.com>
yolocs
force-pushed
the
stack/docker-shared-workspace-profiles
branch
from
November 5, 2026 22:12
71222b5 to
79702a7
Compare
yolocs
marked this pull request as ready for review
November 5, 2026 22:13
pietern
reviewed
Nov 6, 2026
pietern
left a comment
Contributor
There was a problem hiding this comment.
This can have unintended side effects. Let's say you configure Docker assuming profile B, but profile A is earlier in the .databrickscfg for the same workspace host. What happens? Does a docker push use profile A?
I recommend using the "default profile" switcher (run databricks auth switch to see what happens) to be the tie-breaker, if it exists, and keep the error otherwise.
This branch has not been deployed
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.
Changes
databricks auth docker configureno longer fails when several databricks-cli profiles match the selected workspace. It configures Docker and prints a warning:databricks auth docker token(the Docker credential helper) tries the matching profiles in profile order ([DEFAULT]first, then file order) and uses the first one that is logged in. It skips a profile only when it has no cached login, no refresh token, or a rejected refresh token. Any other error (network, server, timeout, cancellation) is returned, so the helper never switches identity because of a transient failure. A single matching profile behaves as before, including its error text.To tell a cache miss apart from other errors,
loadTokennow keepsstorage.ErrNotFoundin its error chain viastorage.NewNotFoundHint.databricks auth tokenmessages are unchanged.Why
Docker gives the credential helper only the registry host, which encodes the workspace ID, so the helper maps it back to a profile by
workspace_id.auth loginnow savesworkspace_idon every profile, so two logins to the same workspace were enough to blockauth docker configure.This replaces the "remove the duplicate profile" hint from #7363, which has not been released, so that changelog fragment is removed.
Tests
TestProfilesForRegistryandTestTokenForRegistrycover first-wins, skipping each logged-out case, stopping on other errors and on cancellation, and the unchanged single-profile path.TestToken_loadTokennow asserts thatErrNotFoundandErrMissingRefreshTokenstay in the error chain.cmd/auth/docker/{configure,configure-errors,token,help}. Configure warns and succeeds when profiles share a workspace. Token picks the first logged-in profile (the two profiles have different cached tokens), skips a logged-out profile on the default force-refresh path, and lists every profile when none is logged in.go test ./cmd/auth/... ./libs/dockercredentials/... ./libs/auth/... ./libs/databrickscfg/...andgo test ./acceptance -run TestAccept/cmd/authpass. Lint, deadcode, and whitespace checks pass.This pull request and its description were written by Isaac.