./g/workflows: Add test reporter output to `spread-results-reporter`
This PR adds a section to the spread results reporter which queries the test-predictors /predict endpoint, and formats the test data as a table to present to developers.
From minimal shell script to reproduce on PS7:
RESULTS_JSON="$PWD/spread-artifact-28948770370/results.json" PREDICTOR_URL="http://10.152.181.185:5000" ATTEMPT=1 bash ~/verify-test-predictor-report.sh
## Test Predictor Analysis
Results: /home/rnfudge02/spread-artifact-28948770370/results.json
Predictor: http://10.152.181.185:5000
Attempt: 1
Preparing
| Test | Retries | Predictor |
|---|---|---|
| openstack:ubuntu-24.04-64:tests/main/lxd-postrm-purge | 0 | π’ 90.0% |
Executing
| Test | Retries | Predictor |
|---|---|---|
| openstack:ubuntu-24.04-64:tests/main/interfaces-auditd-support | 0 | π’ 99.0% |
| openstack:ubuntu-24.04-64:tests/main/lxd:snapd_cgroup_both | 0 | π’ 90.0% |
| openstack:ubuntu-24.04-64:tests/main/lxd:snapd_cgroup_just_outside | 0 | π’ 90.0% |
| openstack:ubuntu-24.04-64:tests/main/lxd:snapd_cgroup_neither | 0 | π’ 90.0% |
| openstack:ubuntu-24.04-64:tests/main/proxy-no-core | 0 | π‘ 56.9% |
| openstack:ubuntu-24.04-64:tests/smoke/find-info | 0 | π’ 90.0% |
Thu Jul 16 20:07:06 UTC 2026 The following results are from: https://github.com/canonical/snapd/actions/runs/29529239330
Failures:
Skipped tests from snapd-testing-skip
If you wish to have any of the below tests run in your PR, in your PR description, add 'unskip:' followed by a copy-and-pasted list of the below tests you wish to run (unskip plus test list must be valid yaml)
- openstack:ubuntu-24.04-64:tests/main/i18n
- openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-flag-restart
- openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-integration-tests
- openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-prompt-restoration
- openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-smoke
- openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-snapd-startup
- openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-support
- openstack:ubuntu-26.04-64:tests/main/i18n
- openstack:ubuntu-26.04-64:tests/main/interfaces-requests-activates-handlers
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 78.87%. Comparing base (2ca8f43) to head (4e76c48).
:warning: Report is 45 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #17342 +/- ##
==========================================
- Coverage 79.09% 78.87% -0.22%
==========================================
Files 1395 1400 +5
Lines 195174 195995 +821
Branches 2466 2466
==========================================
+ Hits 154365 154599 +234
- Misses 31536 32126 +590
+ Partials 9273 9270 -3
| Flag | Coverage Ξ | |
|---|---|---|
| unittests | 78.87% <ΓΈ> (-0.22%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
LLM revisions:
- Commit 1: Move script from workflow file to dedicated
.shfile. Use shfmt to ensure the shell script has proper formatting. - Commit 2: Extract jq logic out of the
.shfile and convert it to python3 for easier reading. Use py_compile and pylint to verify correct syntax. Check the parser against an actual artifact downloaded from GH. - Commit 3: Fix shellcheck and run shfmt.