Skip to content

Replace U2M token cache with Store - #6619

Merged
renaudhartert-db merged 1 commit into
mainfrom
delete-token-cache
Sep 11, 2026
Merged

renaudhartert-db merged 1 commit into
mainfrom
delete-token-cache

Conversation

@renaudhartert-db

@renaudhartert-db renaudhartert-db commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Changes

This is a no-op cleanup of CLI OAuth token storage.

U2M previously used its own TokenCache interface while CLI auth used storage.Store, requiring adapters between two abstractions with the same role. This PR removes libs/auth/u2m/cache and makes U2M use storage.Store directly. The in-memory implementation and OAuth-specific wrappers now live in libs/auth/storage.

Token keys, persisted formats, lookup and refresh behavior, not-found hints, and legacy host-key dual writes are unchanged.

Why

The U2M token cache and storage.Store now serve the same role. Keeping both abstractions requires adapters and duplicates token storage behavior without adding separation of responsibility.

Tests

  • Focused auth and storage tests pass.
  • Repository checks and the full unit suite pass (10,035 tests).
  • Changed-file Go lint reports no issues.

This PR was written with Codex.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 9db5ca5

Run: 34524816627

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux 1 275 15 5:09
💚​ aws windows 1 277 13 5:29
💚​ azure linux 1 274 15 5:15
💚​ azure windows 1 276 13 4:22
💚​ gcp linux 1 275 15 5:36
💚​ gcp windows 1 277 13 4:44
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
5:27 aws windows TestAccept
4:43 gcp windows TestAccept
4:15 azure windows TestAccept
2:14 gcp linux TestAccept
2:09 aws linux TestAccept
2:08 azure linux TestAccept

@renaudhartert-db renaudhartert-db changed the title auth: replace U2M token cache with Store Replace U2M token cache with Store Sep 10, 2026
@renaudhartert-db
renaudhartert-db added this pull request to the merge queue Sep 11, 2026
Merged via the queue into main with commit 97d08e1 Sep 11, 2026
34 checks passed
@renaudhartert-db
renaudhartert-db deleted the delete-token-cache branch September 11, 2026 09:54
janniklasrose pushed a commit that referenced this pull request Sep 15, 2026
## Changes

This is a no-op cleanup of CLI OAuth token storage.

U2M previously used its own TokenCache interface while CLI auth used
storage.Store, requiring adapters between two abstractions with the same
role. This PR removes libs/auth/u2m/cache and makes U2M use
storage.Store directly. The in-memory implementation and OAuth-specific
wrappers now live in libs/auth/storage.

Token keys, persisted formats, lookup and refresh behavior, not-found
hints, and legacy host-key dual writes are unchanged.

## Why

The U2M token cache and storage.Store now serve the same role. Keeping
both abstractions requires adapters and duplicates token storage
behavior without adding separation of responsibility.

## Tests

- Focused auth and storage tests pass.
- Repository checks and the full unit suite pass (10,035 tests).
- Changed-file Go lint reports no issues.

_This PR was written with Codex._
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.

3 participants