Add JSON summary report output to generate_reports.py#1654
Add JSON summary report output to generate_reports.py#1654jonesbusy merged 1 commit intojenkins-infra:mainfrom
Conversation
…iously only generated a Markdown summary (summary.md). This adds a machine-readable summary.json in the same reports directory, containing the same data: migration stats, failures by recipe, plugins with failures, and pull request statistics. A JSON format is more suitable for programmatic consumption, such as a visualization dashboard, compared to the Markdown format.
|
@CodexRaunak Would you help me to review? Thanks! |
|
This issue I was discussing about in informal meet, i have proposed to add logic of converting |
|
LGTM, @Fikri-20 have you tested running the script locally on the metadata? |
|
Please also restore the PR template on this and future PR. And explain the testing done (not by an AI which looks the case here) |
|
@CodexRaunak
Updated it in the "Testing done" section in the PR description. |
|
@jonesbusy Test files were created in a separate local branch (not pushed to this PR) to verify the scripts work without polluting the repo. |
Summary
Adds a
summary.jsonfile alongside the existingsummary.md, providing machine-readable output for programmatic consumption (e.g., dashboards). The JSON contains the same data as the Markdown report:Testing done
Ran
update_metadata.pyandgenerate_reports.pylocally with sample metadata files.Step 1: Update metadata
Step 2: Generate reports
Verified
summary.jsonoutput:{ "generatedOn": "2026-03-23 17:30:23 UTC", "totalMigrations": 3, "failedMigrations": 1, "successRate": 66.67, "failuresByRecipe": [ {"recipeId": "upgrade-to-java17", "failures": 1} ], "pluginsWithFailures": ["sample-plugin"], "pullRequestStats": { "total": 3, "open": 1, "closed": 0, "merged": 2, "openRate": 33.33, "closedRate": 0.0, "mergeRate": 66.67 } }The JSON structure mirrors the existing
summary.mdand follows the same pattern as the per-recipe JSON files inreports/recipes/.Submitter checklist