Skip to content

[release/v7.6.1] Delay update notification for one week to ensure all packages become available#27215

Merged
daxian-dbw merged 1 commit into
PowerShell:release/v7.6.1from
daxian-dbw:backport/release/v7.6.1/27095-a625d2d45
Apr 9, 2026
Merged

[release/v7.6.1] Delay update notification for one week to ensure all packages become available#27215
daxian-dbw merged 1 commit into
PowerShell:release/v7.6.1from
daxian-dbw:backport/release/v7.6.1/27095-a625d2d45

Conversation

@daxian-dbw
Copy link
Copy Markdown
Member

Backport of #27095 to release/v7.6.1

Triggered by @daxian-dbw on behalf of @daxian-dbw

Original CL Label: CL-General

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Backports the release timing adjustment that delays the update notification window so package availability can settle across release channels before users are prompted to update.

Customer Impact

  • Customer reported
  • Found internally

This avoids users seeing update notifications before all packages for the release are broadly available, reducing confusion and failed update attempts during release rollout.

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Verified by cherry-picking the change onto release/v7.6.1 without conflicts. No local test run was performed; CI on the backport PR will validate the change in the release branch context.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Low risk because the change is narrowly scoped to update notification timing and does not modify core engine or packaging logic. It adjusts a constant/value used for release behavior and cherry-picked cleanly.

@daxian-dbw daxian-dbw added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Apr 9, 2026
Copilot AI review requested due to automatic review settings April 9, 2026 05:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Backports the update-notification timing adjustment to the release/v7.6.1 branch so users aren’t prompted to update until the release has had time to propagate across distribution channels.

Changes:

  • Adds a 7-day delay before showing update notifications after a release publish date.
  • Introduces constants for notification delay and update-check backoff.
  • Replaces the inline “< 7 days” update-check backoff condition with the new constant.

Comment on lines +31 to +33
private const int NotificationDelayDays = 7;
private const int UpdateCheckBackoffDays = 7;

Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

UpdateCheckBackoffDays is still set to 7 days, but the PR description/backport context (#27095) states the update check backoff should be increased from 7 to 14 days. Either update this constant (and the related comment below) to match the intended 14-day backoff, or adjust the PR description if the backport is meant to delay notifications only.

Copilot uses AI. Check for mistakes.
out DateTime lastUpdateDate)
&& lastUpdateVersion != null)
{
DateTime today = DateTime.UtcNow;
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

lastUpdateDate is parsed with DateTimeStyles.AssumeLocal in TryParseUpdateFile, but this new delay logic compares it to DateTime.UtcNow. Subtracting DateTime values with different kinds can skew the day calculation by the local UTC offset, which may show (or suppress) notifications earlier/later than intended. Consider using DateTime.Now here to match the parsed kind, or parse/normalize lastUpdateDate to UTC before comparing.

Suggested change
DateTime today = DateTime.UtcNow;
DateTime today = DateTime.Now;

Copilot uses AI. Check for mistakes.
@daxian-dbw daxian-dbw merged commit b14d502 into PowerShell:release/v7.6.1 Apr 9, 2026
39 checks passed
@daxian-dbw daxian-dbw deleted the backport/release/v7.6.1/27095-a625d2d45 branch April 9, 2026 16:56
@adipose
Copy link
Copy Markdown

adipose commented Apr 22, 2026

I'm curious what the expected result of this would be. As of today, 7.6.0 is reporting that 7.6.1 is available.

PowerShell 7.6.0

   A new PowerShell stable release is available: v7.6.1
   Upgrade now, or check out the release page at:
     https://aka.ms/PowerShell-Release?tag=v7.6.1

Attempting to upgrade it, however, does not find 7.6.1.

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
VERBOSE: About to download package from 'https://github.com/PowerShell/PowerShell/releases/download/v7.6.0/PowerShell-7.6.0-win-x64.msi'

Is this the kind of thing that this particular change was meant to avoid? Will it only avoid it after 7.6.1 is installed?

@Achumango
Copy link
Copy Markdown

Cuando este instalado y con el visto bueno de Copiloto ,COMUNICARE.

@Achumango
Copy link
Copy Markdown

GRACIAS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants