fix(ci): read dashboard JSON from file in grafana-preview #8092
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 204 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.318
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8092"
general
weight: 0.35
tmstff
What
upload_dashboard()inhack/ci/grafana-preview.shbuilds the Grafana API payload by reading the dashboard body from a temp file viajq --slurpfile, instead of passing it as ajqCLI argument.Why
The previous
jq --argjson dashboard "${dashboard_json}" ...passed the whole dashboard JSON as a single command-line argument. On Linux a single argument is capped atMAX_ARG_STRLEN(128 KiB), independent of totalARG_MAX. Dashboards larger than that fail the exec withE2BIG, which the shell reports as:observability/grafana-dashboards/velero/velero.jsonalready exceeds the limit onmain(~149 KB pretty-printed), so any PR that changes a large dashboard breaks the preview step. macOS does not reproduce (1 MiB per-arg limit); reproduced inalpine:3.20linux/amd64 withjq 1.7.1.Example: https://prow.ci.openshift.org/view/gs/test-platform-results-public/pr-logs/pull/Azure_ARO-HCP/7861/pull-ci-Azure-ARO-HCP-main-grafana-preview/2120903758706642944 in #7861
Testing
In
alpine:3.20linux/amd64 with realjq:Argument list too long.velero.json→ exit 0, payload built from file.Failed to parse dashboard JSON.shellcheck(as run by the mega-linter CI job) passes clean on the changed file.Jira: ARO-30718