Skip to content

Add invalid refresh token error code - #6684

Open
simonfaltum wants to merge 4 commits into
mainfrom
simonfaltum/auth-token-error-code
Open

simonfaltum wants to merge 4 commits into
mainfrom
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 charset-normalizer)

This PR was written by Codex.

@simonfaltum
simonfaltum marked this pull request as ready for review September 15, 2026 11:10
@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.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 7882430

Run: 34961875705

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux 1 275 16 4:09
💚​ aws windows 1 277 14 6:23
💚​ azure linux 1 274 16 4:08
💚​ azure windows 1 276 14 4:18
💚​ gcp linux 1 275 16 4:21
💚​ gcp windows 1 277 14 4:01
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
6:20 aws windows TestAccept
4:15 azure windows TestAccept
3:58 gcp windows TestAccept

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