Code review comment for ~chad.smith/software-properties:ua-status-from-json

Revision history for this message
Chad Smith (chad.smith) wrote :

Testing performed
   1. launched desktop install of Jammy daily desktop images
   2. confirmed failure path from LP: #1939732

jammy-desktop:~$ dpkg-query --show software-properties-gtk
software-properties-gtk 0.99.13
jammy-desktop:~$ software-properties-gtk
No ua status file written:
[Errno 2] No such file or directory: '/var/lib/ubuntu-advantage/status.json'
No ua status file written:
[Errno 2] No such file or directory: '/var/lib/ubuntu-advantage/status.json'
No ua status file written:
[Errno 2] No such file or directory: '/var/lib/ubuntu-advantage/status.json'

jammy-desktop:~$ sudo cp utils.py /usr/lib/python3/dist-packages/softwareproperties/gtk/utils.py

jammy-desktop:~$ dpkg-query --show software-properties-gtk

# no error on gtk dialog load on absent /var/lib/ubuntu-advantage/status.json
jammy-desktop:~$ [ -f /var/lib/ubuntu-advantage/status.json ] && echo "status.json exists"
jammy-desktop:~$ software-properties-gtk
# click "Updates" table in dialog and see "Basic Security Maintenance"

# Attach to a subscription
jammy-desktop:~$ ua attach <mytoken>

jammy-desktop:~$ software-properties-gtk
# no errors
# click "Updates" table in dialog and see "Extended Security Maintenance" with an expiry from my contract: 12/31/1999
# no errors printed to console

# editing _schema_version to print informational messages on CLI
jammy-desktop:~$ sudo sed -i 's/"_schema_version": "0.1"/"_schema_version": "0.3"/' /var/lib/ubuntu-advantage/status.json
jammy-desktop:~$ software-properties-gtk
UA status schema version change: 0.3

« Back to merge proposal