Skip to content

Conversation

@fwiesel
Copy link
Contributor

@fwiesel fwiesel commented Dec 19, 2025

If we do not reflect the terminating state right on creation,
controllers might try to onboard the new hypervisor until next reconciliation.

The tests before where partly relying one a global context, which means
the cancelation from ginkgo wasn't really passed down. The leaf
functions can take a context.Context or SpecContext argument. The latter
is already imported, so lets go with that one.
@fwiesel fwiesel requested a review from notandy December 19, 2025 12:57
@fwiesel fwiesel force-pushed the recreate-terminating branch from 96a9d8e to f625a35 Compare December 19, 2025 13:03
If we do not reflect the terminating state right on creation,
controllers might try to onboard the new hypervisor until
the next reconciliation.
@github-actions
Copy link

Merging this branch will increase overall coverage

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

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 65.57% (+1.17%) 61 (+2) 40 (+2) 21 👍

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/decomission_controller_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/eviction_controller_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/gardener_node_lifecycle_controller_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_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_certificate_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/suite_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/traits_controller_test.go

@fwiesel fwiesel merged commit 94973f2 into main Dec 19, 2025
6 checks passed
@fwiesel fwiesel deleted the recreate-terminating branch December 19, 2025 15:14
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