When completing any work, make sure that the following is completed:
- All potential regressions are accounted for
- "pre-commit" has been ran on the codebase.
src/immutable_fields.rshas a resolver that reads the existingOpenStackClusterspec and overrides topology variables to preserve fields that CAPO's admission webhook considers immutable. Adding a newFieldMappingis only half the fix.- The Python
Cluster.get_objectbuilder inmagnum_cluster_api/resources.pymust source every resolver-owned key from thevariablesdict returned byself.rust_driver.resolve_immutable_fields(...), the wayapiServerLoadBalancerdoes atresources.py:1048. Recomputing the value from labels orutils.*helpers silently discards the resolver output. - This applies to companion/gating flags too (e.g.
disableAPIServerFloatingIPManaged), not just the primary field. - The
mock_rust_driverfixture inmagnum_cluster_api/tests/unit/conftest.pystubsrust_driver.resolve_immutable_fieldsas an identity function, so any Python unit test that uses it will not fail when builder wiring is missing. Cover the wiring with a Rust-side test, or a Python test that does not rely on that fixture.