[Merge] pdbq:pkg-bug-set-milestones into pdbq:main

Bryce Harrington mp+480062 at code.launchpad.net
Fri Jan 24 09:27:48 UTC 2025


The proposal to merge pdbq:pkg-bug-set-milestones into pdbq:main has been updated.

Description changed to:

This branch implements a mechanism for updating the milestones for some or all of a Launchpad bug report's tasks.

Preceding that functionality are a collection of fixes I've accumulated, some refactoring/cleanup, and a few pertinent changes from the "Automatic Merge Board Update" roadmap item that I think are ready to land now with this (main thing of note is support for adding and removing tags).

An obvious omission are test cases; I'm deliberately skipping implementing them for expediency.  I've done testing manually, but not terribly thoroughly, so there could well be more bugs hiding.  I've tried to include code docs and typing for all the new functions, however I've not given them full attention so they may be light or missing in some places.  Error handling and input checking are also rather weak, so don't be surprised if it spits unfriendly stack traces unexpectedly.  Let me know if you spot any obvious areas of improvement; I plan to continue polishing this code in a few subsequent MPs to come.

Note that this branch adds a new convention for referencing the tasks in a bug, inspired by PPA addresses.  Examples:

    lp:2064377/apache2
    lp:2083480/ubuntu/noble/chrony

You can list the tasks for a bug like:

    $ ./scripts/pkg-bug get-tasks 2083480
    lp:2083480/ubuntu/acl
    lp:2083480/ubuntu/apache2
    lp:2083480/ubuntu/attr
    lp:2083480/ubuntu/noble/ruby3.2
    lp:2083480/ubuntu/noble/sqlite3
    lp:2083480/ubuntu/noble/vsftpd

Milestones can be retrieved and specified like this:

    $ ./scripts/pkg-bug get-milestone lp:2064377/ubuntu/plucky/apache2
    $ ./scripts/pkg-bug set-milestone lp:2064377/ubuntu/plucky/apache2 ubuntu-25.02

So, one way you could use this programmatically to update milestones for a bug with many tasks:

    $ for task in $(pkg-bug get-tasks 2083480 | grep ubuntu/noble); do
          pkg-bug set-milestone ${task} ubuntu-24.04.2
      done

Tags can be done via:

    $ ./scripts/pkg-bug tag 2064377 needs-merge
    $ ./scripts/pkg-bug untag 2064377 bitesize

The smoke tests just dump the unformatted dicts; they can be run via:

    $ python3 -m pdbq.bug
    $ python3 -m pdbq.bug_task

For more details, see:
https://code.launchpad.net/~bryce/pdbq/+git/pdbq/+merge/480062
-- 
Your team Ubuntu Server Developers is requested to review the proposed merge of pdbq:pkg-bug-set-milestones into pdbq:main.




More information about the Ubuntu-reviews mailing list