Skip to content

Commit fecc25a

Browse files
Expand comment on accountID override in ToOAuthArgument
1 parent b91565b commit fecc25a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

libs/auth/arguments.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ func (a AuthArguments) ToOAuthArgument() (u2m.OAuthArgument, error) {
6262
return u2m.NewProfileAccountOAuthArgument(host, cfg.AccountID, a.Profile)
6363
}
6464

65-
// Pass a.AccountID (not cfg.AccountID) to avoid env var / discovery
66-
// back-fill from triggering SPOG routing for plain workspace hosts.
65+
// Pass a.AccountID (not cfg.AccountID) because EnsureResolved can
66+
// back-fill cfg.AccountID from two sources: the DATABRICKS_ACCOUNT_ID
67+
// env var (via ConfigAttributes) and .well-known/databricks-config
68+
// discovery (which returns account_id for every host since PR #4809).
69+
// Using cfg.AccountID would cause IsSPOG to misroute plain workspace
70+
// hosts as SPOG simply because their metadata includes an account_id.
6771
if IsSPOG(cfg, a.AccountID) {
6872
return u2m.NewProfileUnifiedOAuthArgument(host, cfg.AccountID, a.Profile)
6973
}

0 commit comments

Comments
 (0)