Skip to content

Pause plugin auto-updates on metered connections - #331694

Draft
Dmitriy Vasyura (dmitrivMS) wants to merge 7 commits into
mainfrom
dev/dmitriv/metered-plugin-auto-update
Draft

Pause plugin auto-updates on metered connections#331694
Dmitriy Vasyura (dmitrivMS) wants to merge 7 commits into
mainfrom
dev/dmitriv/metered-plugin-auto-update

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator
  • pause the periodic agent-plugin marketplace update check while the connection is metered
  • preserve the startup-idle gate when the connection becomes unmetered during startup
  • preserve queued plugin updates and resume them when the connection becomes unmetered
  • allow checks and updates that were already in flight to finish, while blocking new automatic work
  • leave manual plugin update commands unchanged

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 19, 2026 19:10
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added the network Network related issues label Aug 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.ts Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 runWhenGlobalIdle callback 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

Comment thread src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.ts Outdated
Comment thread src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Comment thread src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

const delay = delayOverride ?? Math.max(0, PLUGIN_UPDATE_CHECK_INTERVAL_MS - elapsed);

this._updateCheckTimer = setTimeout(() => this._runUpdateCheck(), delay);
void this._updateCheckDelayer.trigger(async () => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

network Network related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants