Stop retrying inaccessible repositories after 404 - #8884
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix handling of dead or inaccessible repos in multi-folder workspace
Stop retrying inaccessible repositories after 404
Aug 11, 2026
Alex Ross (alexr00)
requested changes
Aug 11, 2026
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Alex Ross (alexr00)
approved these changes
Aug 11, 2026
Dmitriy Vasyura (dmitrivMS)
approved these changes
Aug 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses repeated, unproductive retries against repositories that return a non-SAML HTTP 404 when fetching repository metadata, which can exhaust the extension’s shared API-call budget and degrade multi-folder workspaces. It adds session-scoped “inaccessible repo” tracking, removes inaccessible repos from active processing, and improves log diagnostics to identify the failing repository and workspace folder.
Changes:
- Cache non-SAML repository-metadata 404s as “inaccessible” for the current session and suppress further retry/log noise for those repos.
- Isolate failures by removing/disposing inaccessible repositories and preventing their recreation during subsequent update/creation flows.
- Add targeted tests covering 404 caching/logging behavior and ensuring healthy repositories are unaffected.
Show a summary per file
| File | Description |
|---|---|
| src/github/githubRepository.ts | Marks repos inaccessible on non-SAML 404 during metadata fetch; suppresses repeated work/logging and returns false early from resolveRemote. |
| src/github/folderRepositoryManager.ts | Filters known-inaccessible repos during updates, removes/disposing inaccessible repos, and blocks recreation via createGitHubRepository. |
| src/test/github/githubRepository.test.ts | Adds unit tests validating one-time logging + caching of inaccessible repos and preserving SAML behavior. |
| src/test/github/folderRepositoryManager.test.ts | Adds coverage ensuring inaccessible repos are skipped/removed without impacting healthy repos, and that recreation is blocked. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repository metadata 404s left dead remotes active, allowing repeated requests to consume the shared API-call budget and block healthy repositories. Existing warnings did not identify the failing repository or workspace folder.
Terminal failure handling
Repository isolation
Actionable diagnostics