[SRU] plasma-distro-release-notifier gets EOL data from git.launchpad.net

Bug #2039492 reported by Erich Eickmeyer
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
plasma-distro-release-notifier (Ubuntu)
Status tracked in Mantic
Jammy
In Progress
High
Erich Eickmeyer
Lunar
In Progress
High
Erich Eickmeyer
Mantic
In Progress
High
Erich Eickmeyer

Bug Description

[Impact]

This isn't really an impact to users, but is certainly an impact to Launchpad's servers. plasma-distro-release-notifier is an upgrade notifier for plasma desktops and is seeded in Kubuntu and Ubuntu Studio. Its primary function is to notify users of a new upgrade available and when they will no longer receive updates to their current Ubuntu version. Since this impacts two flavors, for LTS versions, this is 3 years.

However, in its present form, plasma-distro-release-notifier gets its information from https://git.launchpad.net/plasma-distro-release-notifier/plain/eol.json?h=eol and checks that exact URL every login. This may have an impact on Launchpad's git servers.

Simon Quigley has been kind enough to patch plasma-distro-release-notifier to use Ubuntu's distro-info-data to grab the information from /usr/share/distro-info/ubuntu.csv while subtracting two years for LTS releases since Kubuntu and Ubuntu Studio only support LTS releases for three years. Simon has also sent this patch upstream.

[Test Case]

 * Simply install Ubuntu Studio or Kubuntu, any supported version.

 * Upon login, plasma-distro-release-notifier will grab eol.json from git.launchpad.net via the above URL. This is not desired.

 * Simon's patch removes this requirement and uses on-disk distro-info-data instead.

[What could go wrong]

This notifier was originally used in KDE Neon, and as such, had to be patched to work with Ubuntu. KDE Neon still would pull from KDE's servers to get the json file to calculate the EOL dates This patch does rewrite a lot of that code, but seems to be solid nonetheless.

Attached is a screenshot of 22.04 in a VM, set to normal upgrades, and being "tricked" into thinking it's about to go EOL via date rewrites in /usr/share/distro-info/ubuntu.csv and it seems to work wonderfully.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Simon's original patch. I will be doing the upload, so this is just here for informational purposes.

description: updated
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Some small notes, just for reference.

Yes, this is my patch, and with the notable exception of the (testing) changelog entry, the patch is up to date. Thank you for taking care of the paperwork and additional testing.

We could totally clean up the QtNetworkReply headers, either in this upload or the next one. The impact there is negligible, since this is the only usage of such headers.

Also, this removes some MOCK_RELEASE functionality. This Is Fine, because the package has no autopkgtests (this was a pain to test manually, so I will be fixing this!) and as such, that conditional was only used for local testing.

My patch doesn't have traction upstream yet, but besides $past_issues I don't see why they'd reject it: https://invent.kde.org/system/distro-release-notifier/-/merge_requests/6

Side note: I noticed only the C++11 standard is enforced, when all of KDE and Qt use C++17 (this is worth double checking). **This will cause issues when those libraries start using newer features.** (I dealt with this bug last cycle in LXQt.)

Thanks.

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Aww, I forgot DEP-3 headers :/ that would block me from sponsoring an upload, why I forgot it in my own is beyond me.

Changed in plasma-distro-release-notifier (Ubuntu Lunar):
status: New → In Progress
Changed in plasma-distro-release-notifier (Ubuntu Jammy):
status: New → In Progress
importance: Undecided → High
Changed in plasma-distro-release-notifier (Ubuntu Lunar):
importance: Undecided → High
Changed in plasma-distro-release-notifier (Ubuntu Jammy):
assignee: nobody → Erich Eickmeyer (eeickmeyer)
Changed in plasma-distro-release-notifier (Ubuntu Lunar):
assignee: nobody → Erich Eickmeyer (eeickmeyer)
Revision history for this message
Simon Quigley (tsimonq2) wrote :

sitter did a (quite impressive) code review upstream. While this code does work, and his comments are more "we use camelCase" and "this is the right method," I'd really like to get this right.

Erich, what say you?

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

I have no problem with that and have asked for a reject of the current uploads pending new uploads.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.