Skip to content

Stop nagging about "latest" when I'm on "latest LTS" #20210

Closed as not planned
Closed as not planned

Description

@Jaykul

Summary of the new feature / enhancement

As a developer stuck on LTS for compatibility with Microsoft's GitHub and Azure Pipeline agents, I don't want to be nagged about versions I'm not allowed to use.

I really do want to know when there's a new LTS release, but the current implementation means that every time I open a new terminal tab, I'm being nagged to change my mind about using the LTS release!

I've had to disable the POWERSHELL_UPDATECHECK for my sanity, but what I really want is to set it to "LTS"

Proposed technical implementation details (optional)

When a user is on an LTS release, only nag if they are not on the latest LTS.

When a new LTS release comes out, notify about the LTS update, and casually remind us of the other upgrade options.

When a LTS release is end-of-life (and there's a new major (minor) LTS version) then you should make the nag specifically about that and make it very clear what the current LTS release is.

Activity

  1. added
    Issue-Enhancementthe issue is more of a feature request than a bug
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on Sep 6, 2023
  2. Jaykul commented on Sep 6, 2023

    @Jaykul
    ContributorAuthor

    P.S. Using an Environment Variable to control update checks in an app that supports side-by-side and portable installs just does not work as intended. I'm currently running LTS and Preview versions side-by-side at work. I'm avoiding the current release because of compatibility issues with the LTS -- so I use Preview as my daily driver, and test everything in LTS.

    Personally, I can make this work by setting the system environment POWERSHELL_UPDATECHECK = 0 and then setting it to LTS or Default as appropriate in my windows terminal profile (which requires editing the .json), but this doesn't seem like something anyone should need to do -- especially since PowerShell itself controls the defaults in those terminal configs.

  3. spaette commented on Sep 25, 2023

    @spaette
    Contributor

    Why doesn't Default have an LTS entry?

    https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.3/Microsoft.PowerShell.Core/About/

    about_Update_Notifications.md (possible rewrite)

    • Off turns off the update notification feature
    • Default is the same as not defining POWERSHELL_UPDATECHECK:
      • LTS releases notify of updates to lts and stable releases
      • Stable releases notify of updates to stable releases
      • Preview/RC releases notify of updates to stable and preview releases
    • LTS only notifies of updates to long-term-servicing (LTS) releases

    nag specifically about EOL of LTS release

    Were the Default code modified to correspond with the above adding a notification of EOL might complicate things.

    Of course adding to Default such an LTS entry should be consistent with at minimum this among the OP's criteria.

    When a new LTS release comes out, notify about the LTS update, and casually remind us of the other upgrade options.


    Starting from bash here are current messages using an extracted powershell-7.2.13-linux-x64.tar.gz.

    not on the latest LTS

    not using an environment variable or setting to POWERSHELL_UPDATECHECK="Default"

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

    setting to POWERSHELL_UPDATECHECK="LTS"

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

    Starting from bash here is a current message using an extracted powershell-7.4.0-preview.4-linux-x64.tar.gz.

    not on the latest Preview

    setting to POWERSHELL_UPDATECHECK="Default"

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

    Starting from bash here is a current message using an extracted powershell-7.1.0-rc.2-linux-x64.tar.gz.

    not on the latest RC

    setting to POWERSHELL_UPDATECHECK="Default"

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

    https://github.com/PowerShell/PowerShell/releases

    Incidentally are the labels Latest and Pre-release representing GitHub code or Organization code?

    Preview/ RC releases both currently have a Pre-release label.

    If Organization code Stable , Preview and an added RC and LTS would make more sense.

  4. spaette commented on Sep 27, 2023

    @spaette
    Contributor

    Preview/RC releases don't appear to notify of updates to GA releases.

    $ pushd /tmp/PowerShell-Docs/reference/7.3/Microsoft.PowerShell.Core/About
    /tmp/PowerShell-Docs/reference/7.3/Microsoft.PowerShell.Core/About ~
    $ ed -s about_Update_Notifications.md <<<'31,44p'
    PowerShell only return notifications for updated GA releases. Preview and
    Release Candidate (RC) releases notify of updates to preview, RC, and GA
    releases.
    
    The update notification behavior can be changed using the
    `POWERSHELL_UPDATECHECK` environment variable. The following values are
    supported:
    
    - `Off` turns off the update notification feature
    - `Default` is the same as not defining `POWERSHELL_UPDATECHECK`:
      - GA releases notify of updates to GA releases
      - Preview/RC releases notify of updates to GA and preview releases
    - `LTS` only notifies of updates to long-term-servicing (LTS) GA releases
    
    $ popd
    ~
    $ 
    
  5. sassdawe commented on Oct 14, 2023

    @sassdawe

    spaette the problem is that I can't easily set the Stable and the LTS versions to only check their own updates and their own updates only without doing weird stuff with short cuts or by editing the Windows Terminal config.

    Simply put, this is wrong:

    Default is the same as not defining POWERSHELL_UPDATECHECK:

    • LTS releases notify of updates to lts and stable releases

    I don't need LTS to tell me there is a higher version number Stable release.
    image

    The problem is that LTS is checking both versions.

  6. spaette commented on Oct 14, 2023

    @spaette
    Contributor

    It it worthwhile to elaborate on the .md file's mentioned 2 channels and 3 endpoints?

  7. sassdawe commented on Oct 14, 2023

    @sassdawe

    I'm not sure that I understand what you mean - English is not my native language.

  8. spaette commented on Oct 14, 2023

    @spaette
    Contributor

    Absent looking at the code it would seem from the documentation that channels and endpoints are utilised.

    $ pushd /tmp/PowerShell-Docs/reference/7.3/Microsoft.PowerShell.Core/About
    /tmp/PowerShell-Docs/reference/7.3/Microsoft.PowerShell.Core/About ~
    $ ed -s about_Update_Notifications.md <<<'29,33p'
    By default, PowerShell subscribes to one of two different notification channels
    depending on its version/branch. Supported, Generally Available (GA) versions of
    PowerShell only return notifications for updated GA releases. Preview and
    Release Candidate (RC) releases notify of updates to preview, RC, and GA
    releases.
    $ ed -s about_Update_Notifications.md <<<'45,50p'
    The following endpoints are currently used for determining the latest version of
    each channel:
    
    - `LTS`: https://aka.ms/pwsh-buildinfo-lts
    - `Stable`: https://aka.ms/pwsh-buildinfo-stable
    - `Preview`: https://aka.ms/pwsh-buildinfo-preview
    $ popd
    ~
    $ 
    
  9. spaette commented on Oct 15, 2023

    @spaette
    Contributor

    2 channels

    tools/packages.microsoft.com/mapping.json

    the above file lists channels stable and preview

    looking at the code

    I would solicit the opinion of someone more familiar with the code.

    src/Microsoft.PowerShell.ConsoleHost/host/msh/UpdatesNotification.cs

    I would venture to guess the above file is relevant.

  10. kilasuit commented on Nov 3, 2026

    @kilasuit
    Collaborator

    Joel Bennett (@Jaykul) as this feature has now been removed from 7.6.8 onwards via this PR I think this can be closed as not planned.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions