[AAP-92559] XLAB Add on-demand dashboard sync option #523
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 575 lines diff across 7 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.380
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #523"
general
weight: 0.35
kcagran
[AAP-92559] Add on-demand dashboard sync option
Description
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose -->
- added option to be able to manually sync the dashboard at any time (on-demand). It reuses houlry sync record builders, which are now shared helpers.
- Lets developers and operators trigger a dashboard sync manually (backend/API only for now), which can help debugging (and developing).
- by adding a task that can be manually run at any time to trigger dashboard sync
Type of Change
<!-- Mandatory: Check one or more boxes that apply -->
Self-Review Checklist
<!-- These items help ensure quality - they complement our automated CI checks -->
Testing Instructions
Prerequisites
Follow
README.mdto set up a local environment. Make suremetrics_serviceis running onlocalhost:8000.1. Run local AWX and Metrics Service databases with all recent migrations.
2. Create the Django superuser
admin(admin or system auditor):3. Make 4 of the seeded AWX jobs eligible. Jobs 3 and 6 are workflow and must stay excluded. The seeded jobs are all pending , which the dashboard collector skips:
Steps to Test
1. Baseline: both dashboard tables are empty:
2. Trigger the on-demand sync for an explicit range. Note the returned
task_id:3. The scheduler picks it up within about 60 seconds. Poll until status is completed :
4. Verify the synced data:
5. Idempotency: repeat steps 2 to 4 with the same request (new
task_id).6. Failure handling: an invalid range reports an error and writes nothing. Repeat step 2 with
"since":"2025-06-15T00:00:00+00:00","until":"2025-06-13T00:00:00+00:00", wait about a minute, and run the step 3 poll. The task is retried automatically (up to 3 attempts, with a delay).7. Do step 2 as unauthenticated user (add
-kvto thecurlcommand to get more details)Expected Results
status: completed,result_datahasstatus: success,job_count: 4,host_summary_job_count: 4anddate_rangematching the request.completedagain withjob_count: 4; the table counts are unchanged (4 and 8, no duplicates).result_data.errorisInvalid date range: ..., and the DB counts stay 4 and 8.HTTP/1.1 403 Forbidden