Merge ubuntu-archive-tools:rar-add-trigger into ubuntu-archive-tools:main

Proposed by Brian Murray
Status: Merged
Merge reported by: Brian Murray
Merged at revision: 202fd22923f92fd942c0f67f2d90521245786e20
Proposed branch: ubuntu-archive-tools:rar-add-trigger
Merge into: ubuntu-archive-tools:main
Diff against target: 33 lines (+8/-0)
1 file modified
retry-autopkgtest-regressions (+8/-0)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Skia (community) Needs Information
Ubuntu Package Archive Administrators Pending
Review via email: mp+459204@code.launchpad.net

Description of the change

This is useful if tests are failing with an unknown version because they require a specific newer version of a package from -proposed e.g. liblocale-gettext-perl during the noble development cycle. It's particularly helpful with the --run-autopkgtest argument as that command is harder to edit.

This also allows for a more targeted approach then all-proposed.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

I tested this both with and without the `--run-autopkgtest` switch.

Revision history for this message
Skia (hyask) wrote (last edit ):

Shouldn't that argument actually be an accumulator to allow specifying it multiple times?

review: Needs Information
Revision history for this message
Paride Legovini (paride) wrote :

I was going to suggest the same:

  parser.add_argument("--additional-trigger", action="append", ...)

then args.additional_trigger will be a list of additional triggers, specified by passing --additional-trigger one or more times.

However @Brian if you think this is not going to be useful in practice, I'm +1 for the proposed implementation.

ubuntu-archive-tools:rar-add-trigger updated
9aa045d... by Brian Murray

retry-autopkgtest-regressions: allow for one or more triggers

f6a5fb7... by Brian Murray

retry-autopkgtest-regressions: also fix arguments for run-autopkgtest

Revision history for this message
Brian Murray (brian-murray) wrote :

I've modified the number of times you can call `--additional-trigger` per reviewer feedback.

Revision history for this message
Graham Inggs (ginggs) wrote :

I used this branch on the weekend to trigger perl autopkgtests with --additional-trigger and it worked well! Although, only tried with one additional trigger.

Revision history for this message
Steve Langasek (vorlon) wrote :

looks fine to me!

My only comment is that '--additional-trigger' is a quite a long name to have to type. Would it make sense to just call this '--trigger'?

review: Approve
Revision history for this message
Brian Murray (brian-murray) wrote (last edit ):

retry-autopkgtest-regressions can already create a url with a trigger argument in it so we are adding another trigger but let's make the argument `--add-trigger`.

ubuntu-archive-tools:rar-add-trigger updated
202fd22... by Brian Murray

Rename the argument add-trigger and save 7 characters

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/retry-autopkgtest-regressions b/retry-autopkgtest-regressions
2index 859758a..f9b9f51 100755
3--- a/retry-autopkgtest-regressions
4+++ b/retry-autopkgtest-regressions
5@@ -58,6 +58,8 @@ def parse_args():
6 help='Ubuntu series (default: %(default)s)')
7 parser.add_argument('--all-proposed', action='store_true',
8 help='run tests against all of proposed, i. e. with disabling apt pinning')
9+ parser.add_argument('--add-trigger', action='append',
10+ help='add trigger(s) with a $PKG/$VERSION combo')
11 parser.add_argument('--state', default=[],
12 help='Generate commands for given test state (default: %(default)s). '
13 '--state=RUNNING also enables triggering already queued and running tests',
14@@ -269,6 +271,9 @@ args = parse_args()
15 extra_params = []
16 if args.all_proposed:
17 extra_params.append(('all-proposed', '1'))
18+if args.add_trigger:
19+ for add_trigger in args.add_trigger:
20+ extra_params.append(('trigger', add_trigger))
21
22 if args.log_regex:
23 # expire old cache
24@@ -313,6 +318,9 @@ for release, pkgmap in regressions.items():
25 url = request_url + '?' + urllib.parse.urlencode(params)
26 print(url)
27 else:
28+ if args.add_trigger:
29+ for add_trigger in args.add_trigger:
30+ triggers.append(add_trigger)
31 print("run-autopkgtest {allproposed}-s {release} -a {arch} {triggers} {pkg}".format(
32 allproposed='--all-proposed ' if args.all_proposed else '',
33 arch=arch,

Subscribers

People subscribed via source and target branches