Retry authenticated user lookup after transient failures - #8910
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Copilot I don't see any changed files. |
|
Copilot Please read the issue more carefully. The user tested with that commit and could still repro the issue. |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Addressed in |
There was a problem hiding this comment.
Pull request overview
This PR adjusts GitHubRepository metadata caching so transient failures don’t leave a permanently rejected cached promise, enabling subsequent calls to retry and then cache a successful result (aligning with the PR’s authentication recovery goal where metadata depends on getAuthenticatedUser()).
Changes:
- Clear
this._metadataon non-404 (and SAML 404) failures sogetMetadata()can retry on the next call. - Preserve the existing “mark inaccessible + don’t retry” behavior for non-SAML 404s.
- Add a regression test to ensure a transient failure is followed by a successful retry that is then cached.
Show a summary per file
| File | Description |
|---|---|
| src/github/githubRepository.ts | Resets _metadata cache on retryable failures while keeping non-SAML 404s cached as inaccessible. |
| src/test/github/githubRepository.test.ts | Adds coverage for retry-after-failure and successful caching behavior in getMetadata(). |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
A transient authenticated-user request could remain cached as a rejected promise, leaving Create Pull Request unusable until VS Code restarted.