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
diff --git a/retry-autopkgtest-regressions b/retry-autopkgtest-regressions
index 60f7253..61056f4 100755
--- a/retry-autopkgtest-regressions
+++ b/retry-autopkgtest-regressions
@@ -129,6 +129,8 @@ def already_triggered(release, arch, pkg, triggers, extra_params, running, queue
129 m = re.search('([^ ^{]*) (.*)', queued_pkg)129 m = re.search('([^ ^{]*) (.*)', queued_pkg)
130 queued_pkg = m.group(1)130 queued_pkg = m.group(1)
131 item_params_raw = m.group(2)131 item_params_raw = m.group(2)
132 if queued_pkg == 'private':
133 continue
132 item_params_json = json.loads(item_params_raw)134 item_params_json = json.loads(item_params_raw)
133 queued_triggers = item_params_json['triggers']135 queued_triggers = item_params_json['triggers']
134 queued_extra_params = []136 queued_extra_params = []
@@ -150,6 +152,8 @@ def already_triggered(release, arch, pkg, triggers, extra_params, running, queue
150 continue152 continue
151 for running_arch, running_params in arches.items():153 for running_arch, running_params in arches.items():
152 params = running_params[0]154 params = running_params[0]
155 if not params:
156 continue
153 if not running_arch == arch:157 if not running_arch == arch:
154 continue158 continue
155 # upstream CI builds (systemd, ubuntu-image etc)159 # upstream CI builds (systemd, ubuntu-image etc)

Subscribers

People subscribed via source and target branches