Skip to content

feat: add upgrade delay setting for upgrade --all#6179

Draft
mdevolde wants to merge 1 commit intomicrosoft:masterfrom
mdevolde:feature/upgrade_delay
Draft

feat: add upgrade delay setting for upgrade --all#6179
mdevolde wants to merge 1 commit intomicrosoft:masterfrom
mdevolde:feature/upgrade_delay

Conversation

@mdevolde
Copy link
Copy Markdown

@mdevolde mdevolde commented Apr 25, 2026


This pull request contains the full implementation of the feature, but is under "draft" status until a maintainer agreed with my related issue (and potentially with a spec to write).

feat: add upgrade delay setting for upgrade --all

Summary

Add a new user setting installBehavior.upgradeDelayInDays (default: 0) to delay winget upgrade --all until an update is at least N days old, and permit to reduce risks to download a very recent release that could be part of a supply chain attack or contains bugs.

Changes

  • During winget upgrade --all, winget reads ReleaseDate (preferred: selected applicable installer, fallback: manifest.DefaultInstallerInfo.ReleaseDate).
  • If the update is newer than the configured delay, it is skipped and a summary message is shown indicating how many upgrades were skipped due to the upgrade delay (upgrades with missing ReleaseDate are also skipped if installBehavior.upgradeDelayInDays > 0).
  • Users can still upgrade a specific package individually to bypass the “--all” delay behavior.

Testing

  • Added/updated AppInstallerCLITests coverage for eligible vs too recent upgrades and verified UpdateFlow_UpdateAllApplicable_UpgradeDelay passes.

Closes #6178

Microsoft Reviewers: Open in CodeFlow

@github-actions

This comment has been minimized.

@mdevolde mdevolde force-pushed the feature/upgrade_delay branch from 65fed58 to 32cf37d Compare April 26, 2026 00:01
@mdevolde
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Comment thread doc/Settings.md Outdated
@mdevolde mdevolde force-pushed the feature/upgrade_delay branch from 32cf37d to 494be8e Compare April 26, 2026 10:57
@mdevolde mdevolde requested a review from Trenly April 26, 2026 12:40
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.

Upgrade delay setting for 'winget upgrade --all'

2 participants