Skip to content

Conversation

@notandy
Copy link
Contributor

@notandy notandy commented Dec 16, 2025

Consolidate all condition to their respective API spec, this makes it
easier and clearer for external components to identify condition and
reason, also reuse conditions that are similar (Completed ->
Successful). Also fixes CamelCase requirement for conditionReasons.

Also introducing a new maintenance enum value "terminating", that is
set by the maintenance-operator in case the node is terminating -
removing the need to monitor nodes status.

@notandy notandy force-pushed the refactor-conditions branch from 74434e9 to e65e4eb Compare December 16, 2025 20:52
Consolidate all condition to their respective API spec, this makes it
easier and clearer for external componenets to identify condition and
reason, also reuse conditions that are similar (Complated ->
Successful).

Also introducing a new maintenance enum value "terminating", that is
set by the maintenance-operator in case the node is terminating -
removing the need to monitor nodes status.
@notandy notandy force-pushed the refactor-conditions branch from e65e4eb to 8539456 Compare December 16, 2025 20:52
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1 0.00% (ø)
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller 49.86% (-2.95%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1/eviction_types.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1/hypervisor_types.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/aggregates_controller.go 63.74% (ø) 91 58 33
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/consts.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/eviction_controller.go 36.28% (ø) 226 82 144
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/gardener_node_lifecycle_controller.go 13.56% (-52.54%) 59 8 (-31) 51 (+31) 💀 💀 💀 💀 💀
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/node_eviction_label_controller.go 39.73% (ø) 73 29 44
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/onboarding_controller.go 55.02% (ø) 249 137 112
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/traits_controller.go 58.18% (ø) 55 32 23

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.

Changed unit test files

  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/aggregates_controller_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_maintenance_controller_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/node_eviction_label_controller_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/onboarding_controller_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/traits_controller_test.go

@fwiesel fwiesel merged commit 1c5c027 into main Dec 17, 2025
6 checks passed
@fwiesel fwiesel deleted the refactor-conditions branch December 17, 2025 08:54
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