Merge ubuntu-archive-tools:skip-privates into ubuntu-archive-tools:main

Proposed by Brian Murray
Status: Merged
Merged at revision: 92ef8a564233810f03f2719b49fb87b9abad88d7
Proposed branch: ubuntu-archive-tools:skip-privates
Merge into: ubuntu-archive-tools:main
Diff against target: 22 lines (+4/-0)
1 file modified
retry-autopkgtest-regressions (+4/-0)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Ubuntu Package Archive Administrators Pending
Review via email: mp+439287@code.launchpad.net

Description of the change

I was trying to use retry-autopkgtests with some stable releases and ran into some tracebacks trying to parse the json. This resolves those.

Traceback (most recent call last):
  File "/home/bdmurray/source-trees/ubuntu-archive-tools/ubuntu-archive-tools/./retry-autopkgtest-regressions", line 398, in <module>
    and already_triggered(release, arch, pkg, triggers,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bdmurray/source-trees/ubuntu-archive-tools/ubuntu-archive-tools/./retry-autopkgtest-regressions", line 224, in already_triggered
    running_triggers = params['triggers']
                       ~~~~~~^^^^^^^^^^^^
KeyError: 'triggers'

Traceback (most recent call last):
  File "/home/bdmurray/source-trees/ubuntu-archive-tools/ubuntu-archive-tools/./retry-autopkgtest-regressions", line 392, in <module>
    and already_triggered(release, arch, pkg, triggers,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bdmurray/source-trees/ubuntu-archive-tools/ubuntu-archive-tools/./retry-autopkgtest-regressions", line 191, in already_triggered
    item_params_json = json.loads(item_params_raw)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) :
review: Approve

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 60f7253..61056f4 100755
3--- a/retry-autopkgtest-regressions
4+++ b/retry-autopkgtest-regressions
5@@ -129,6 +129,8 @@ def already_triggered(release, arch, pkg, triggers, extra_params, running, queue
6 m = re.search('([^ ^{]*) (.*)', queued_pkg)
7 queued_pkg = m.group(1)
8 item_params_raw = m.group(2)
9+ if queued_pkg == 'private':
10+ continue
11 item_params_json = json.loads(item_params_raw)
12 queued_triggers = item_params_json['triggers']
13 queued_extra_params = []
14@@ -150,6 +152,8 @@ def already_triggered(release, arch, pkg, triggers, extra_params, running, queue
15 continue
16 for running_arch, running_params in arches.items():
17 params = running_params[0]
18+ if not params:
19+ continue
20 if not running_arch == arch:
21 continue
22 # upstream CI builds (systemd, ubuntu-image etc)

Subscribers

People subscribed via source and target branches