Skip to content

Conversation

@fwiesel
Copy link
Contributor

@fwiesel fwiesel commented Dec 2, 2025

Only syncing on creation introduced a race-condition: The node may have been created, but the labels and annotations get synced later.

To fix that, always sync the annotations, provided they are set. Should another CRD in the cluster manage these specs via another operator, we simply need to remove the annotations first.

@fwiesel fwiesel requested a review from notandy December 2, 2025 13:11
@notandy notandy self-requested a review December 2, 2025 18:41
@fwiesel fwiesel force-pushed the sync-hypervisor-nodes branch 2 times, most recently from 6317213 to 3c16538 Compare December 3, 2025 08:24
@fwiesel fwiesel changed the title Hyperisor: Always reflect node annotations in hypervisor-spec Hypervisor: Always reflect node annotations in hypervisor-spec Dec 3, 2025
@fwiesel fwiesel force-pushed the sync-hypervisor-nodes branch 2 times, most recently from 571110e to ddbce14 Compare December 4, 2025 08:55
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller 39.83% (-0.12%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_controller.go 62.71% (-1.22%) 59 (-2) 37 (-2) 22 👎

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.

Only syncing on creation introduced a race-condition: The node
may have been created, but the labels and annotations get synced
later.

To fix that, always sync the annotations, provided they are set.
Should another CRD in the cluster manage these specs via another
operator, we simply need to remove the annotations first.
@fwiesel fwiesel merged commit 016c808 into main Dec 5, 2025
7 checks passed
@fwiesel fwiesel deleted the sync-hypervisor-nodes branch December 5, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants