canonical / ubuntu-pro-client

Ubuntu Pro Client for offerings from Canonical
https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/
GNU General Public License v3.0
55 stars 75 forks source link

Bug: New version hints ignore phasing #3192

Open cpaelzer opened 4 months ago

cpaelzer commented 4 months ago

Description of the bug

I love that we suggest to upgrade if there is a new version, it is helpful to avoid failing due to known issues. But I realized we might be slightly too aggressive.

In case the update is still held back by phasing we are already warning. And while that warning is nice, it is also always a bit of critique like "you haven't updated your things"

Expected behavior

While still held back by phasing of the package do not yet hint at please updating it.

Since unattended upgrades is - by default - only installing security fixes users will still see it. But it avoids the following flow

  1. run pro, see the hint
  2. run apt upgrade see it is held back
  3. uncertainty if they should really install something that is held back

As a bonus, someone updating non -security regularly by unattended-upgrades or other means will more or less never see the suggestion cluttering the output.

Current behavior

Held back on upgrades

paelzer@Keschdeichel 07:49:30   ~  sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
#
# OpenSSH CVE-2024-6387 has been fixed for 22.04 LTS, 23.10 and 24.04 LTS.
# RegreSSHion: Possible RCE Due To A Race Condition In Signal Handling.
# For more details see: https://ubuntu.com/security/notices/USN-6859-1.
#
The following upgrades have been deferred due to phasing:
  file-roller libclang-cpp18 libclang1-18 libllvm18 ubuntu-pro-client ubuntu-pro-client-l10n
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

Seen as in phasing

paelzer@Keschdeichel 07:49:47   ~  apt-cache policy ubuntu-pro-client
ubuntu-pro-client:
  Installed: 32.3~24.04
  Candidate: 32.3.1~24.04
  Version table:
     32.3.1~24.04 500 (phased 60%)
        500 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
 *** 32.3~24.04 100
        100 /var/lib/dpkg/status
     31.2.3 500
        500 http://de.archive.ubuntu.com/ubuntu noble/main amd64 Packages

We hint at "you should upgrade"

paelzer@Keschdeichel 07:49:58   ~  pro status
SERVICE          ENTITLED  STATUS       DESCRIPTION
...

[info] A new version is available: 32.3.1~24.04
Please run:
    sudo apt install ubuntu-pro-client
to get the latest bug fixes and new features.

To Reproduce

  1. Get the situation that the pro client is in -updates but phasing and not yet to be installed on this system
  2. run any pro command

System information:

hfdem commented 3 weeks ago

I think the problem is that phased updates should also apply to unattended upgrades.