Pause plugin auto-updates on metered connections - #331694
Draft
Dmitriy Vasyura (dmitrivMS) wants to merge 7 commits into
Draft
Pause plugin auto-updates on metered connections#331694Dmitriy Vasyura (dmitrivMS) wants to merge 7 commits into
Dmitriy Vasyura (dmitrivMS) wants to merge 7 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
August 19, 2026 19:10
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Pauses automatic agent-plugin update checks and installs on metered connections while preserving queued work.
Changes:
- Suspends and resumes periodic marketplace checks.
- Cancels in-flight automatic updates and retains queued IDs.
- Adds metered-connection lifecycle tests.
Show a summary per file
| File | Description |
|---|---|
pluginMarketplaceService.ts |
Gates periodic checks on connection state. |
pluginAutoUpdate.ts |
Pauses, cancels, and resumes automatic updates. |
pluginMarketplaceService.test.ts |
Tests periodic-check pause and resume. |
pluginAutoUpdate.test.ts |
Tests queue retention and cancellation. |
Review details
💡 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: 2
- Review effort level: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
August 19, 2026 19:41
View session
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts:426
- This unmetered path can bypass the existing startup-idle gate: if the service starts metered and the connection becomes unmetered before the
runWhenGlobalIdlecallback runs, it schedules an overdue repository check immediately and can start git/network work during startup. Register this listener inside the idle callback; the initial_scheduleUpdateCheck()already observes the latest metered state, so transitions before idle do not need a separate listener.
this._scheduleUpdateCheck();
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
August 20, 2026 00:11
View session
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
August 20, 2026 02:10
View session
| const delay = delayOverride ?? Math.max(0, PLUGIN_UPDATE_CHECK_INTERVAL_MS - elapsed); | ||
|
|
||
| this._updateCheckTimer = setTimeout(() => this._runUpdateCheck(), delay); | ||
| void this._updateCheckDelayer.trigger(async () => { |
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.
Uh oh!
There was an error while loading. Please reload this page.