Skip to content

maestro: add JSON validation reports and --fail-on-mismatch flag#275

Merged
aliceinwire merged 1 commit into
kernelci:mainfrom
nuclearcat:maestro-validate-json
Jun 19, 2026
Merged

maestro: add JSON validation reports and --fail-on-mismatch flag#275
aliceinwire merged 1 commit into
kernelci:mainfrom
nuclearcat:maestro-validate-json

Conversation

@nuclearcat

Copy link
Copy Markdown
Member

Add machine-readable JSON output to kci-dev maestro validate builds and boots so automation can verify Maestro and Dashboard consistency without parsing human-readable CLI output.

This supports kernelci/kernelci-pipeline#1125, Validate maestro build results consistency. KernelCI users need stable build and boot counts with no silent result loss, missing records, or mismapped statuses on the dashboard. The structured summary lets daily validation jobs compare Dashboard API data,Maestro API data, and recent checkout expectations, then decide policy from summary.ok.

The JSON mode emits a single JSON object on stdout, redirects incidental progress output away from stdout, and exits 0 for successful validation runs even when mismatches are reported.

Runtime/API errors still exit nonzero. An optional --fail-on-mismatch flag is also added for workflows that want the command itself to fail when validation finds inconsistencies.

Tests cover JSON output for builds, boots, and build history mismatch cases; stdout cleanliness; missing ID and status mismatch summaries; mismatch exit behavior; and runtime failure handling.

Add machine-readable JSON output to kci-dev maestro validate builds and boots
so automation can verify Maestro and Dashboard consistency without parsing
human-readable CLI output.

This supports kernelci/kernelci-pipeline#1125, Validate maestro build results consistency.
KernelCI users need stable build and boot counts with no silent result loss,
missing records, or mismapped statuses on the dashboard.
The structured summary lets daily validation jobs compare
Dashboard API data,Maestro API data, and recent checkout expectations, then decide policy from summary.ok.

The JSON mode emits a single JSON object on stdout,
redirects incidental progress output away from stdout,
and exits 0 for successful validation runs even when mismatches are reported.

Runtime/API errors still exit nonzero. An optional --fail-on-mismatch flag is also
added for workflows that want the command itself to fail when validation finds inconsistencies.

Tests cover JSON output for builds, boots, and build history mismatch cases;
stdout cleanliness; missing ID and status mismatch summaries; mismatch exit behavior;
and runtime failure handling.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@aliceinwire

Copy link
Copy Markdown
Member

please fix tox errors

@nuclearcat

Copy link
Copy Markdown
Member Author

ci error is not relevant to the PR, kcidev/libs/dashboard.py retry wrapper calls time.sleep(...) but does not import time.
(It only shows up when Dashboard returns a retryable status like 504)
I will retry CI check.

@aliceinwire

Copy link
Copy Markdown
Member

thanks

@aliceinwire aliceinwire merged commit 52c8084 into kernelci:main Jun 19, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants