Commit 5dae11d
committed
fix(machine-sync): backfill missing resource_id from provider state
sync_machines_with_provider only updated fields that already existed in
the update block. If a machine was stored before the handler fix (or via
a code path that omitted resource_id) it would never have resource_id
set, keeping it invisible to group_by_resource on the return path.
Add resource_id to both the needs_update predicate and the update block:
only backfill when provider knows the resource_id and the existing
record is missing it, leaving all other resource_id values untouched.1 parent c1c71a8 commit 5dae11d
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| 292 | + | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
| |||
0 commit comments