Skip to content

Deduplicate OAuth token exchange during parallel package fetching#1123

Merged
ericmj merged 1 commit intomainfrom
ericmj/fix-parallel-oauth-exchange
Mar 19, 2026
Merged

Deduplicate OAuth token exchange during parallel package fetching#1123
ericmj merged 1 commit intomainfrom
ericmj/fix-parallel-oauth-exchange

Conversation

@ericmj
Copy link
Copy Markdown
Member

@ericmj ericmj commented Mar 19, 2026

Parallel package fetches each triggered an independent OAuth token exchange for the same repo, causing multiple calls to /api/oauth/token. Use Hex.OnceCache with a keyed fetch to ensure only one exchange per repo+key combination, with concurrent tasks waiting for the result.

Parallel package fetches each triggered an independent OAuth token
exchange for the same repo, causing multiple calls to /api/oauth/token.
Use Hex.OnceCache with a keyed fetch to ensure only one exchange per
repo+key combination, with concurrent tasks waiting for the result.
@ericmj ericmj merged commit 8886724 into main Mar 19, 2026
20 checks passed
@ericmj ericmj deleted the ericmj/fix-parallel-oauth-exchange branch March 19, 2026 19:06
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