Commit d487997
[ci_gen_kustomize_values] Fix 3-run death spiral in edpm-nodeset2-values template
The edpm-nodeset2-values template derives _vm_type by splitting the first
node name from the existing values.yaml (e.g. edpm-compute-0 -> compute).
It then uses _vm_type to find matching instances (startswith compute2-).
This creates a self-poisoning 3-run death spiral:
Run 1: nodes have git placeholder names (edpm-compute-0)
-> _vm_type=compute -> finds compute2-* instances -> writes real
hostnames (edpm-compute2-XXXXX-0) back to values.yaml
Run 2: nodes now have real CI hostnames (edpm-compute2-XXXXX-0)
-> _vm_type=compute2 -> searches for compute22-* (does not exist)
-> instances_names=[] -> writes nodes: null back to values.yaml
Run 3: nodes is null (Python None)
-> None | default({}) returns None (default only fires for Undefined)
-> None.keys() -> CRASH: None has no attribute keys
Fix with two changes:
1. Replace | default({}) with explicit None-safe conditional so that
an explicit YAML null does not sneak through as Python None.
2. Strip trailing digits from the derived _vm_type so that after run 1
rewrites node names, compute2 strips back to compute and the instance
lookup continues to find compute2-* entries correctly on all subsequent
runs.
Signed-off-by: Ade Lee <alee@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 15a93c0 commit d487997
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments