Commit 5cba485
committed
fix(webapp): guard
Symmetric with the BUILDING → DEPLOYING `updateMany` guard. Without this,
two attempts running side-by-side (idempotency lets the retry proceed past
worker creation) can produce: A succeeds and flips to DEPLOYING; B hits a
transient file/resource/schedule error and unconditionally flips to FAILED;
A's subsequent guarded update finds 0 rows; deployment is stuck in FAILED
with a worker registered but never deployed.
Now the failure handler only flips status on rows that are still BUILDING.
The timeout dequeue is also gated on the actual flip so we don't cancel a
sibling attempt's just-enqueued timeout.failBackgroundWorkerDeployment with BUILDING predicate1 parent a3d837f commit 5cba485
1 file changed
Lines changed: 20 additions & 2 deletions
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
| 242 | + | |
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
| |||
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
249 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
250 | 268 | | |
251 | 269 | | |
252 | 270 | | |
| |||
0 commit comments