Skip to content

Add invalid refresh token error code - #6681

Closed
simonfaltum wants to merge 3 commits into
databricks:mainfrom
simonfaltum:simonfaltum/auth-token-error-code
Closed

simonfaltum wants to merge 3 commits into
databricks:mainfrom
simonfaltum:simonfaltum/auth-token-error-code

Conversation

@simonfaltum

Copy link
Copy Markdown
Member

Changes

Add an INVALID_REFRESH_TOKEN error code when databricks auth token --output json cannot refresh a cached U2M token. The existing text error and reauthentication guidance remain unchanged.

Why

Clients need a machine-readable way to distinguish an invalid or expired refresh token and trigger a new auth login flow.

Tests

  • go test ./cmd/auth ./libs/auth/...
  • go test ./acceptance -run TestAccept/cmd/auth/token/force-refresh-invalid-refresh-token -tail -test.v
  • ./task fmt
  • ./task checks
  • ./task lint
  • ./task test (the auth changes pass; the unrelated bundle/templates/lakeflow-integrations test fails because the local offline uv cache is missing requests dependencies)

This PR was written by Codex.

@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 6681
  • Commit SHA: eef4736705fb76044e160d8e3bf526d0daf03838

Checks will be approved automatically on success.

@simonfaltum
simonfaltum marked this pull request as ready for review September 15, 2026 10:04
@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/cmd/auth/ - needs approval

Files: cmd/auth/token.go, cmd/auth/token_test.go
Suggested: @renaudhartert-db
Also eligible: @mihaimitrea-db, @tanmay-db, @hectorcast-db, @parthban-db, @Divyansh-db, @tejaskochar-db, @chrisst, @rauchy

/libs/auth/ - needs approval

Files: libs/auth/error.go
Suggested: @renaudhartert-db
Also eligible: @mihaimitrea-db, @tanmay-db, @hectorcast-db, @parthban-db, @Divyansh-db, @tejaskochar-db, @chrisst, @rauchy

General files (require maintainer)

Files: .nextchanges/cli/auth-token-error-code.md, acceptance/cmd/auth/token/force-refresh-invalid-refresh-token/output.txt, acceptance/cmd/auth/token/force-refresh-invalid-refresh-token/script
Based on git history:

  • @renaudhartert-db -- recent work in cmd/auth/, .nextchanges/cli/, libs/auth/

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

@simonfaltum

Copy link
Copy Markdown
Member Author

Superseded by #6684, recreated from a branch in databricks/cli so CI can access the required OIDC token.

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.

1 participant