lp:~bryce/ubuntu-helpers

Owned by Bryce Harrington
Get this repository:
git clone https://git.launchpad.net/~bryce/ubuntu-helpers
Only Bryce Harrington can upload to this repository. If you are Bryce Harrington please log in for upload directions.

Branches

Name Last Modified Last Commit
lp-test-get-show-api-refac 2022-08-17 02:46:14 UTC
lp-test-ppa: Use fstrings for url construction

Author: Bryce Harrington
Author Date: 2022-08-17 02:46:14 UTC

lp-test-ppa: Use fstrings for url construction

Previously, the formatting string urlfmt was only partially filled in,
leaving %s markers for arch and trigger version. Instead, construct a
valid url that simply omits the arch and trigger url args, and then
append those parameters inside showTriggers().

lp-test-fix-args 2022-08-04 00:53:59 UTC
lp-test-ppa: Fix docs to clarify --subtest takes a single value

Author: Bryce Harrington
Author Date: 2022-08-04 00:53:59 UTC

lp-test-ppa: Fix docs to clarify --subtest takes a single value

Unlike other options, --subtest only permits a single value to be
specified.

lp-test-triggers-refac 2022-07-26 02:24:21 UTC
lp-test-ppa: Reorder showTriggers() arguments using Trigger class

Author: Bryce Harrington
Author Date: 2022-07-26 01:57:09 UTC

lp-test-ppa: Reorder showTriggers() arguments using Trigger class

The 'test_name' variable is a bit confusing in that it doesn't refer to
tests but rather to additional source packages we want to run the given
trigger against. Rename to 'package_name'.

Also, in the autopkgtest URL, this value is specified by the 'package='
URL keyword which is generally displayed early in the URL, with the
triggers included at the end. It will be more intuitive to follow a
similar ordering.

Finally, pass the trigger package and version as an actual Trigger
object to simplify the number of parameters being passed.

add-trigger-class 2022-07-14 00:46:05 UTC
lp-test-ppa: Add Trigger class

Author: Bryce Harrington
Author Date: 2022-07-14 00:46:05 UTC

lp-test-ppa: Add Trigger class

For now this class simply holds data elements and formats them into
strings and urls.

get_triggers() is just a wrapper around the triggers property that
provides the data as Trigger objects. But this gives an api more
consistent with get_subtests().

lp-test-results-refac 2022-07-08 02:03:46 UTC
lp-test-ppa: Improve overall status reporting

Author: Bryce Harrington
Author Date: 2022-07-08 01:29:14 UTC

lp-test-ppa: Improve overall status reporting

This fixes a bug where the overall_status was being reset for each
subtest, so really was only accurate about the final subtest's status.

A secondary bug tracking overall_status could crop up if using --subtest
to limit the display of results; this would cause overall_status to miss
failures of non-displayed subtests.

We now track the overall status in Result.status by iterating over all
subtests, separately from the subtest display.

Further, this splits (overall) status and status_icon for Result
objects, like done for Subtests. Status of Subtest and Result objects
are distinguished design-wise by using solid buttons for the former, and
colorful symbols for the latter. Both use the same symbol to indicate
error conditions, to avoid ambiguity that something's broken.

lp-test-optimizations 2022-06-24 00:18:28 UTC
lp-test-*: Fix lint/flake issues

Author: Bryce Harrington
Author Date: 2022-06-23 23:44:56 UTC

lp-test-*: Fix lint/flake issues

lp-test-refactoring 2022-06-16 16:15:25 UTC
lp-test-ppa: Skip private jobs

Author: Bryce Harrington
Author Date: 2022-06-16 03:04:37 UTC

lp-test-ppa: Skip private jobs

Fixes an exception thrown if there are jobs labeled 'private job' in the
waiting queue. The error looks like:

    Traceback (most recent call last):
      File "/home/bryce/bin/lp-test-ppa", line 421, in <module>
        showActive(release, ppa_user, ppa_name)
      File "/home/bryce/bin/lp-test-ppa", line 128, in showActive
        waiting = getWaiting()
      File "/home/bryce/bin/lp-test-ppa", line 60, in getWaiting
        jobinfo = json.loads(json_data)
      File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
        return _default_decoder.decode(s)
      File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.8/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)

The data being processed looks like:

    ...
    key = 'minilla
    {"submit-time": "2022-06-16 01:58:54", "triggers": ["libmodule-runtime-perl/0.016-2"]}'
    key = 'perlimports
    {"submit-time": "2022-06-16 01:58:54", "triggers": ["libmodule-runtime-perl/0.016-2"]}'
    key = 'private job'

The code attempts to split key, which normally gives a package name and
json object:

    (pkg, json_data) = key.split(maxsplit=1)

We get pkg="private" and json_data="job", which is invalid.

For our purposes we can simply skip private jobs.

17 of 7 results
This repository contains Public information 
Everyone can see this information.

Subscribers