[release/v7.6.1] Delay update notification for one week to ensure all packages become available#27215
Conversation
There was a problem hiding this comment.
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.
| private const int NotificationDelayDays = 7; | ||
| private const int UpdateCheckBackoffDays = 7; | ||
|
|
There was a problem hiding this comment.
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.
| out DateTime lastUpdateDate) | ||
| && lastUpdateVersion != null) | ||
| { | ||
| DateTime today = DateTime.UtcNow; |
There was a problem hiding this comment.
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.
| DateTime today = DateTime.UtcNow; | |
| DateTime today = DateTime.Now; |
|
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. Attempting to upgrade it, however, does not find 7.6.1. 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? |
|
Cuando este instalado y con el visto bueno de Copiloto ,COMUNICARE. |
|
GRACIAS |
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
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
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.
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.
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.