Skip to content

Fix PrefixSet watch mapper in RoutingPolicy controller - #563

Merged
felix-kaestner merged 1 commit into
mainfrom
fix/prefixset-watch-handler
Sep 16, 2026
Merged

felix-kaestner merged 1 commit into
mainfrom
fix/prefixset-watch-handler

Conversation

@felix-kaestner

Copy link
Copy Markdown
Collaborator

The prefixSetToRoutingPolicy mapper queried the field index using prefixSet.Spec.Name (the device-level name) but the index stores PrefixSetRef.Name (the Kubernetes object name). When these differ, the mapper silently failed to find the RoutingPolicy that references the PrefixSet, preventing re-reconciliation after a PrefixSet is created.

@felix-kaestner
felix-kaestner force-pushed the fix/prefixset-watch-handler branch from e164b5c to e95d2a4 Compare September 14, 2026 13:26
@github-actions

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/internal/controller/core 63.88% (+2.52%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/internal/controller/core/routingpolicy_controller.go 72.46% (+4.39%) 236 (+45) 171 (+41) 65 (+4) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Sep 15, 2026
@hardikdr hardikdr added this to Roadmap Sep 15, 2026
The prefixSetToRoutingPolicy mapper queried the field index
using prefixSet.Spec.Name (the device-level name) but the
index stores PrefixSetRef.Name (the Kubernetes object name).
When these differ, the mapper silently failed to find the
RoutingPolicy that references the PrefixSet, preventing
re-reconciliation after a PrefixSet is created.

Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
@felix-kaestner
felix-kaestner force-pushed the fix/prefixset-watch-handler branch from e95d2a4 to 7d915f8 Compare September 15, 2026 09:55
@felix-kaestner
felix-kaestner merged commit cff56a8 into main Sep 16, 2026
28 of 31 checks passed
@felix-kaestner
felix-kaestner deleted the fix/prefixset-watch-handler branch September 16, 2026 09:41
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations. size/XS

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants