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
52 stars 73 forks source link

Bug: pinned packages are reported as available updates in the Pro API #3184

Closed renanrodrigo closed 38 minutes ago

renanrodrigo commented 3 months ago

Description of the bug

If a package is installed from ESM, but there is a new version in the archive, the u.pro.packages.updates.v1 API will report this new version as an available update. This is not wrong, as it is an available update indeed, but APT will not pick it up due to pinning, causing a) a reported update that never gets installed, and b) customer confusion because of a)

Expected behavior

The Pro Client could identify, using the status field of the update, that it won't be installed by default somehow.

Current behavior

"status": "upgrade_available" and lots of questions.

To Reproduce

Mocking is the easiest way, as the security team should be taking care of those corner cases, and the one package that triggered this issue - it happened recently with distro-info-data - is already fixed (copied to ESM with a higher version so it's installable).

System information:

irrelevant