Log Dispatcher operation failures and finished jobs from their own component #25491
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 379 lines diff across 4 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.355
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #25491"
general
weight: 0.35
HadhemiDD
What does this PR do?
Makes Dispatcher failures and finished jobs findable in logs by the component, operation and target they belong to.
Operation failures. Every failed operation now logs one record from the component that owns it, carrying
dispatcher.operationand the error. It is logged at error level when the failure escapes the processor, and at warning level when the processor recovers and continues (refresh_jobskeeping the jobs it already fetched, degradedcollect_artifacts, a PR comment that was not published).MetricsHelper.log_failed_operationkeeps the operation field and the level choice in one place. The orchestrator's owndispatcherrecord is unchanged and stays as the bus-level entry.Finished jobs. The test-runner reports what it reads from GitHub, and the test-gatherer reports only what it infers:
Job <name> completed: <status> in <n>sand emitsjob.duration. Movingjob.durationhere means it no longer depends on result gathering succeeding.Job <name> has no confirmed final state: reported as <status>warning, for jobs whose finish was never observed, now carries the job's fields and the inferred status.job_fields(job, workflow_job=None)describes the job from the plan and, when given, from GitHub's workflow job:| Attribute | Value |
| --- | --- |
|
dispatcher.batch.job.target,environment,platform, ... | From the plan, as before ||
dispatcher.batch.job.status| Internal status ||
dispatcher.batch.job.conclusion| GitHub conclusion ||
dispatcher.batch.job.id/.url| GitHub job ||
dispatcher.batch.job.duration_seconds| Execution time, numeric ||
dispatcher.batch.job.queue_duration_seconds| Time waiting for a runner, numeric |Only
dispatcher.batch.job.statusis a metric tag among the new fields, sojob.durationkeeps its tags. Itsdispatcher.componenttag is nowtest-runner.Motivation
Operation failure metrics are tagged with the failing component, but the matching log came from the orchestrator under
dispatcher.component:dispatcher, or from the GitHub client, so filtering logs by component and operation found nothing. Job completion logs had only the job name and status, so@dispatcher.batch.job.target:postgresmatched no logs and there was no way to find a slow job through logs. Jobs first seen finished in the final listing were not logged at all.Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged