Skip to content

Conversation

@notandy
Copy link
Contributor

@notandy notandy commented Oct 21, 2025

before rollout with selector enable, it's important to delete all related objects (like evictions and hypervisors) since else there will be some strange effects (e.g. hypervisor CROs without the label are not found, but cannot be created because they already exist)

@notandy notandy requested a review from fwiesel October 21, 2025 19:25
return ctrl.Result{}, client.IgnoreNotFound(err)
}

if global.LabelSelector != "" {
Copy link
Contributor

@fwiesel fwiesel Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'd prefer if it would be the hypervisor resource, as my understanding is that should be the primary input for the controller as far as possible (and it is a "lighter" object).
And maybe move it to handlePreflight where it is even used.

But that is just my preference. If you want to merge it as it, that would be fine as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am with you, but I don't want to refactor in this PR.

@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/cmd 0.00% (ø)
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller 33.27% (-0.07%) 👎
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/global 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/cmd/main.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/eviction_controller.go 35.65% (-0.03%) 230 (+3) 82 (+1) 148 (+2) 👎
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_controller.go 61.40% (-2.23%) 57 (+2) 35 22 (+2) 👎
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/global/global.go 0.00% (ø) 0 0 0

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.

@notandy notandy merged commit 40d77fd into main Oct 23, 2025
7 checks passed
@notandy notandy deleted the labelselector branch October 23, 2025 12:00
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