Skip to content

Conversation

@daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Nov 20, 2019

PR Summary

Update the feature to support the notification type that can be configured using the environment variable POWERSHELL_UPDATECHECK.
This is to address the feedback from powershell committee in the RFC review: PowerShell/PowerShell-RFC#162 (comment), quoted below:

Coming out of @PowerShell/powershell-committee review, we want to change the environment variable to no longer be a simple opt-out/in but rather a field that can be used to set the "channel". So e.g. a $env:PSNotificationPreference that can be set to Default, Off, or LTS, where the latter would only provide LTS update notifications in their notifications.

POWERSHELL_UPDATECHECK accepts 3 values: Off, Default, and LTS (case-insensitive), and the behavior is as follows:

  • Off: turn off the udpate notification.
  • Default: give you the default behaviors
    • the preview version 'pwsh' checks for the new preview version and the new GA version.
    • the GA version 'pwsh' checks for the new GA version only.
  • LTS: both preview and GA version 'pwsh' checks for the new LTS version only.

For a specific version of pwsh and a specific notification type, only one update check task, at most, will run to complete per a day. Other tasks should be able to detect "a check is in progress" or "the check has been done for today" and bail out early, to avoid any unnecessary network IO or CPU cycles.

Note that this is a breaking change comparing to preview-5 and preview-6, because the environment variable name and its accepted values are changed.

PR Context

PR Checklist

@daxian-dbw daxian-dbw requested a review from anmenaga as a code owner November 20, 2019 01:02
@daxian-dbw daxian-dbw requested review from TravisEz13, adityapatwardhan and rjmholt and removed request for anmenaga November 20, 2019 01:02
@daxian-dbw daxian-dbw added the Breaking-Change breaking change that may affect users label Nov 20, 2019
@daxian-dbw daxian-dbw added the CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log label Nov 21, 2019
@daxian-dbw daxian-dbw added this to the 7.0-Consider milestone Nov 21, 2019
@daxian-dbw
Copy link
Member Author

@PoshChan please retry windows

@PoshChan
Copy link
Collaborator

@daxian-dbw, successfully started retry of PowerShell-CI-Windows

@daxian-dbw
Copy link
Member Author

@PoshChan please retry windows

@PoshChan
Copy link
Collaborator

PoshChan commented Dec 3, 2019

@daxian-dbw, successfully started retry of PowerShell-CI-Windows

@TravisEz13 TravisEz13 modified the milestones: 7.0-Consider, rc.1-consider Dec 3, 2019
@daxian-dbw
Copy link
Member Author

@PoshChan please retry windows

@PoshChan
Copy link
Collaborator

PoshChan commented Dec 3, 2019

@daxian-dbw, successfully started retry of PowerShell-CI-Windows

@daxian-dbw daxian-dbw closed this Dec 3, 2019
@daxian-dbw daxian-dbw reopened this Dec 3, 2019
@daxian-dbw
Copy link
Member Author

@adityapatwardhan I think this PR is ready to be merged.

@adityapatwardhan adityapatwardhan merged commit 9649a85 into PowerShell:master Dec 10, 2019
@daxian-dbw daxian-dbw deleted the update branch December 10, 2019 18:14
@TravisEz13 TravisEz13 modified the milestones: rc.1-approved, 7.0.0-rc.1 Dec 11, 2019
@ghost
Copy link

ghost commented Dec 16, 2019

🎉v7.0.0-rc.1 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

Breaking-Change breaking change that may affect users CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants