Commit cafdbff
Add batch and job progress aggregate to the test gatherer (#24774)
* Add batch and job progress aggregate to the test gatherer
The gatherer now publishes a DispatcherProgress -> BatchProgress ->
JobProgress -> JobAttemptProgress snapshot on every UpdatePRComment, so
the upcoming PR updater renders a complete immutable view of the run
without touching GitHub API models or pipeline internals.
The gatherer is initialized with the complete batch plan and emits
revision 0 through build_initial_update(), and TestBatch/BatchFinished
now carry an explicit batch_id instead of overloading BaseMessage.id as
the logical batch identity.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Add changelog entry
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Apply ruff formatting
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Address review themes from the gatherer PR
Derive done from the aggregate instead of a received-batch counter, so a
batch that reports no jobs no longer blocks completion, and key every
registry and the duplicate guard on batch_id rather than the message id.
Merge a finished batch into its registered plan instead of rebuilding it
from the message: jobs are preserved and executions are appended to each
job's history, which is what a failed-job rerun needs.
Model conclusion as WorkflowJobConclusion and errors as a ProgressError
enum, make the attempt status non-optional, drop the invented "timed out"
step name, and share one batch_status rule between the flat view and the
aggregate.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Carry only the snapshot on UpdatePRComment
The message shipped done and four counter properties that the progress
snapshot it also shipped already answered. Keep revision, which is
ordering metadata the snapshot deliberately does not carry, and progress,
which is everything else.
WorkflowStatus and JobResult stay: they are built from the same sources as
the aggregate rather than from it, and remain the gatherer's local registry
of what each batch reported. They are just no longer published.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Shorten the comments and docstrings
Same content, fewer words: multi-paragraph docstrings collapse to one or
two sentences and the three-line inline comments to one. No logic change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Address the review comments
Take the batch status from the workflow instead of rolling it up from the
tracked jobs: a workflow also runs setup and finalization steps that can
fail while every job passes. That makes BatchFinished.status the source of
truth and leaves batch_status without a caller, so it goes and
WorkflowStatus.status returns to counting.
Validate the batch before gathering, so an unplanned or already-gathered
message cannot organize artifacts into the shared output tree, where the
names carry no batch and could overwrite a planned job's coverage.
Keep jobs the plan never mentioned out of the totals, log them instead.
Rename jobs to jobs_progress so it cannot be read as a tuple of BatchJob,
collapse the workflow_job conditionals, and cut the comments back.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 26b9a6d commit cafdbff
9 files changed
Lines changed: 1113 additions & 151 deletions
File tree
- ddev
- changelog.d
- src/ddev/cli/ci/tests
- tests/cli/ci/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
| 167 | + | |
167 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
174 | 180 | | |
175 | | - | |
| 181 | + | |
176 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
177 | 188 | | |
178 | 189 | | |
179 | 190 | | |
| |||
186 | 197 | | |
187 | 198 | | |
188 | 199 | | |
189 | | - | |
190 | | - | |
191 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
192 | 203 | | |
193 | 204 | | |
194 | 205 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 206 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
0 commit comments