Skip to content

Conversation

@fwiesel
Copy link
Contributor

@fwiesel fwiesel commented Dec 17, 2025

Instead of using Update() this uses Patch with optimistic locking and also sets the field-owner.
That updates the managed-fields then with more descriptive name for the manager.

This change doesn't have an automatic migration path, one would need to either manually delete all custom-objects, or modify the code one-time to force the name-change.

FieldOwner allows us to identify who maintains a field and detect
if there is a conflict between multiple controllers.
FieldOwner allows us to identify who maintains a field and detect
if there is a conflict between multiple controllers.
FieldOwner allows us to identify who maintains a field and detect
if there is a conflict between multiple controllers.
FieldOwner allows us to identify who maintains a field and detect
if there is a conflict between multiple controllers.
FieldOwner allows us to identify who maintains a field and detect
if there is a conflict between multiple controllers.
FieldOwner allows us to identify who maintains a field and detect
if there is a conflict between multiple controllers.
@fwiesel fwiesel requested a review from notandy December 17, 2025 12:27
@notandy notandy merged commit 34b1d17 into main Dec 17, 2025
3 checks passed
@notandy notandy deleted the patch-and-field-owners branch December 17, 2025 19:10
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller 52.77% (+2.67%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/aggregates_controller.go 63.44% (ø) 93 59 34
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/decomission_controller.go 29.27% (-1.90%) 82 (+5) 24 58 (+5) 👎
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/eviction_controller.go 36.80% (ø) 231 85 146
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_controller.go 63.16% (ø) 57 36 21
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_maintenance_controller.go 71.60% (ø) 81 58 23
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_taint_controller.go 72.73% (ø) 11 8 3
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/onboarding_controller.go 55.04% (ø) 258 142 116
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/traits_controller.go 56.90% (ø) 58 33 25

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.

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