[release/v7.5.6] Delay update notification for one week to ensure all packages become available#27220
Conversation
There was a problem hiding this comment.
Pull request overview
Backport to release/v7.5.6 adjusting the update-notification behavior so users aren’t prompted immediately after a new release, reducing cases where a notification appears before packages are broadly available across channels.
Changes:
- Add a 7-day minimum age requirement (based on the update publish date) before showing update notifications at startup.
- Replace the inline “< 7 days” update-check backoff comparison with a named constant.
There was a problem hiding this comment.
This PR is described as a backport of #27095, which (per the linked PR summary) also increases the update-check backoff from 7 to 14 days. In this backport, UpdateCheckBackoffDays is still set to 7, so either the backport is incomplete or the PR description/linkage should be updated to reflect that only the notification delay is being backported.
| DateTime today = DateTime.UtcNow; | ||
| if ((today - lastUpdateDate).TotalDays < NotificationDelayDays) |
There was a problem hiding this comment.
lastUpdateDate is parsed from the update file name using DateTimeStyles.AssumeLocal (see TryParseUpdateFile), but this logic compares it against DateTime.UtcNow. That UTC/local mismatch can skew the effective delay by up to ~1 day depending on timezone/DST. Consider normalizing both to the same basis (e.g., compare DateTime.UtcNow.Date to lastUpdateDate.ToUniversalTime().Date, or parse the date as UTC) so the 7-day notification delay is consistent across locales.

Backport of #27095 to release/v7.5.6
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
Customer Impact
Adjusts the update notification timing so users are not prompted before all v7.5.6 packages are expected to be available. Expected behavior is that update prompts appear only after package distribution has settled across channels; previously the prompt could appear too early.
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Cherry-pick applied cleanly to release/v7.5.6. The change is a narrowly scoped update to the update notification backoff logic in UpdatesNotification.cs and was previously validated by CI on the original PR. Backport validation relies on backport PR CI for the release branch.
Risk
REQUIRED: Check exactly one box.
Low risk because the change only adjusts the update notification delay constant and related logic in a single code path without affecting package installation or runtime execution.