Skip to content

fix: labelSelector emptiness check #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

porridge
Copy link
Member

@porridge porridge commented Jul 16, 2025

Unfortunately, this test is mostly useless, both for testing this fix and in general 😢 because whether we set the selector predicate on the watch has no influence on the explicit ("manual") execution of Reconcile() that this test does.
In order to test whether WithSelector has any effect, we'd have to invoke the controller manager, because that is where the filtering happens.
Probably something like this test does.

However this is a more involved undertaking than I have time for right now, so just sending this fix alone at this time.

cc @kurlov

Fixes: #458

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.49%. Comparing base (08ab7fb) to head (c5472b3).
Report is 96 commits behind head on main.

Files with missing lines Patch % Lines
pkg/reconciler/reconciler.go 0.00% 0 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (08ab7fb) and HEAD (c5472b3). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (08ab7fb) HEAD (c5472b3)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
- Coverage   85.06%   78.49%   -6.58%     
==========================================
  Files          19       31      +12     
  Lines        1346     2520    +1174     
==========================================
+ Hits         1145     1978     +833     
- Misses        125      452     +327     
- Partials       76       90      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@perdasilva perdasilva added this pull request to the merge queue Jul 23, 2025
Merged via the queue into operator-framework:main with commit 0b184b4 Jul 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect check for WithSelector emptiness
3 participants