Commit 21ff00d
committed
fix: memoize outputs null in steps and dag templates
When a steps or DAG template with memoize and outputs completes,
the node is only re-fetched inside the 'if outputs != nil' block.
The subsequent c.Save() call uses the same local node variable,
so if outputs is nil, node.Outputs is stale/nil and 'outputs:null'
gets written to the ConfigMap cache.
Fix: always re-fetch the node unconditionally before the outputs
assignment and cache save, so c.Save() always uses the latest
node.Outputs from the store.
Fixes: steps.go and dag.go
Signed-off-by: om7057 <kulkarniom7057@gmail.com>1 parent cac474d commit 21ff00d
2 files changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
369 | 374 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
202 | 206 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
0 commit comments