[SRU] ubuntu-upload-permission TypeError crash

Bug #1862372 reported by Andreas Hasenack
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Fix Released
Undecided
Mattia Rizzolo
Focal
Fix Released
Undecided
Mattia Rizzolo

Bug Description

[Impact]

 * ubuntu-upload-permission sometimes crashes.

[Test Plan]

 * `ubuntu-upload-permission --list-uploaders cloud-init`

[Where problems could occur]

 * This is a targeted fix that has been in other releases for more than a year.
 * At most ubuntu-upload-permissions will start erroring out elsewhere (it won't)

[Original text]
(note that what was reported here is already fixed in focal, but there is followup fix for a different case)

focal
ubuntu-dev-tools 0.175

$ ubuntu-upload-permission -a procps
Loading KWallet
Loading SecretService
Loading Windows
Loading chainer
Loading macOS
All upload permissions for procps:

Component (main)
================
* Ubuntu Core Development Team (ubuntu-core-dev) [team]
Traceback (most recent call last):
  File "/usr/bin/ubuntu-upload-permission", line 144, in <module>
    main()
  File "/usr/bin/ubuntu-upload-permission", line 90, in main
    sourcepackagename=package))
TypeError: '<' not supported between instances of 'Packageset' and 'Packageset'

Revision history for this message
Dan Streetman (ddstreet) wrote :

This is a result of the change from python2 -> python3.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.175ubuntu1

---------------
ubuntu-dev-tools (0.175ubuntu1) focal; urgency=medium

  [ Dan Streetman ]
  * lpapicache: remove new requirement to pass arch to getBinaries()
    (LP: #1862286)
  * ubuntu-upload-permission: sort packagesets by name to fix py3
    (LP: #1862372)
  * submittodebian: open with 'b' before writing utf-8 encoded bytes
    (LP: #1863119)

  [ Colin Watson ]
  * Use +sourcefiles URLs where possible (LP: #1860456)

 -- Dan Streetman <email address hidden> Thu, 20 Feb 2020 17:20:23 -0500

Changed in ubuntu-dev-tools (Ubuntu Focal):
status: New → Fix Released
Revision history for this message
Paride Legovini (paride) wrote :

This doesn't seem to be fully fixed. On Focal and Impish:

$ ubuntu-upload-permission --list-uploaders cloud-init
All upload permissions for cloud-init:

Component (main)
================
* Ubuntu Core Development Team (ubuntu-core-dev) [team]

Packagesets
===========

core:

ubuntu-cloud:
* Ubuntu Cloud Uploaders (ubuntu-cloud-uploaders) [team]
Traceback (most recent call last):
  File "/usr/bin/ubuntu-upload-permission", line 144, in <module>
    main()
  File "/usr/bin/ubuntu-upload-permission", line 101, in main
    ppu_uploaders = archive.getUploadersForPackage(
  File "/usr/lib/python3/dist-packages/ubuntutools/lp/lpapicache.py", line 746, in getUploadersForPackage
    self._pkg_uploaders[source_package_name] = sorted(set(
TypeError: '<' not supported between instances of 'PersonTeam' and 'PersonTeam'

Changed in ubuntu-dev-tools (Ubuntu):
status: Fix Released → New
Changed in ubuntu-dev-tools (Ubuntu Focal):
status: Fix Released → New
Revision history for this message
Mattia Rizzolo (mapreri) wrote :

I don't plan to backport this to focal fwiw, so somebody should feel free to pick that piece up if they want to.

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Fix Committed
assignee: nobody → Mattia Rizzolo (mapreri)
Revision history for this message
Mattia Rizzolo (mapreri) wrote :
Revision history for this message
Paride Legovini (paride) wrote :

Thanks Mattia, I applied the fix locally and verified that it fully fixes the issue.

Changed in ubuntu-dev-tools (Ubuntu Focal):
status: New → Triaged
Revision history for this message
Dan Streetman (ddstreet) wrote :

will be handled by bug 1947192

Revision history for this message
Dan Streetman (ddstreet) wrote :

> will be handled by bug 1947192

u-d-t has been updated in focal-backports via that bug, so I'd recommend installing the backports version. I'll leave this bug open in case someone else wants to actually SRU this.

Mattia Rizzolo (mapreri)
description: updated
Changed in ubuntu-dev-tools (Ubuntu):
status: Fix Committed → Fix Released
Changed in ubuntu-dev-tools (Ubuntu Focal):
status: Triaged → In Progress
assignee: nobody → Mattia Rizzolo (mapreri)
Revision history for this message
Mattia Rizzolo (mapreri) wrote :

I uploaded the said fix to focal.

After all it's a crash, so it should be fixed as such :)

summary: - ubuntu-upload-permission TypeError crash
+ [SRU] ubuntu-upload-permission TypeError crash
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Andreas, or anyone else affected,

Accepted ubuntu-dev-tools into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-dev-tools/0.176ubuntu20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-dev-tools (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Mattia Rizzolo (mapreri) wrote :

root@warren:/# apt install ubuntu-dev-tools/focal-proposed
...
Selected version '0.176ubuntu20.04.1' (Ubuntu:20.04/focal-proposed [all]) for 'ubuntu-dev-tools'
...
Setting up ubuntu-dev-tools (0.176ubuntu20.04.1) ...
...
root@warren:/# ubuntu-upload-permission --list-uploaders cloud-init
Please open this authorization page:
 (https://launchpad.net/+authorize-token?oauth_token=QnZKJWv48DK5RZ65Dtl3&allow_permission=DESKTOP_INTEGRATION)
in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Press Enter after authorizing in your browser.

All upload permissions for cloud-init:

Component (main)
================
* Ubuntu Core Development Team (ubuntu-core-dev) [team]

Packagesets
===========

core:

ubuntu-cloud:
* Ubuntu Cloud Uploaders (ubuntu-cloud-uploaders) [team]

Per-Package-Uploaders
=====================

* Chad Smith (chad.smith)
* Ryan Harper (raharper)

You can not upload cloud-init to jammy, yourself.
But you can still contribute to it via the sponsorship process: https://wiki.ubuntu.com/SponsorshipProcess
root@warren:/#

All good! :)

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.176ubuntu20.04.1

---------------
ubuntu-dev-tools (0.176ubuntu20.04.1) focal; urgency=medium

  * lpapicache: fix sorting in Archive.getUploadersForPackage(). LP: #1862372

 -- Mattia Rizzolo <email address hidden> Sun, 05 Dec 2021 16:11:26 +0100

Changed in ubuntu-dev-tools (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ubuntu-dev-tools has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.