Registry Mirror
Skip to content

Conversation

@Elvand-Lie

Copy link
Copy Markdown
Contributor

/kind bug

Fixes #2526

Leader promotion currently queues every resource, even when the generated reconciler skips resources assigned to another class. Use the same class annotation lookup during promotion in NewImpl and NewReconciler. An explicit PromoteFilterFunc takes precedence in NewImpl.

Testing

  • The generator regression fails on upstream and passes with this patch.
  • Generator, controller, reconciler, and injection tests passed. Tests of generated ConfigMap reconcilers covered single and multiple annotation keys and explicit filter precedence.
Class-aware generated reconcilers now enqueue only resources matching their configured class by default when they become leader.

Use the reconciliation class lookup during leader promotion to avoid enqueuing resources assigned to another class. Use an explicit promotion filter when the controller supplies one.

Signed-off-by: Elvand Lie Nababan <elvandlie@gmail.com>
@knative-prow knative-prow Bot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 30, 2026
@knative-prow
knative-prow Bot requested review from Leo6Leo and skonto November 30, 2026 10:31
@knative-prow knative-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 30, 2026
@knative-prow

knative-prow Bot commented Nov 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Elvand-Lie
Once this PR has been reviewed and has the lgtm label, please assign dsimansk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 30, 2026
@knative-prow

knative-prow Bot commented Nov 30, 2026

Copy link
Copy Markdown

Hi @Elvand-Lie. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@codecov

codecov Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.41%. Comparing base (138f169) to head (c31e497).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3450   +/-   ##
=======================================
  Coverage   75.41%   75.41%           
=======================================
  Files         189      189           
  Lines        8387     8387           
=======================================
  Hits         6325     6325           
  Misses       1818     1818           
  Partials      244      244           

☔ View full report in Codecov by Harness.
📢 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.

Signed-off-by: Elvand Lie Nababan <elvandlie@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LeaderAwareFuncs in genreconciler do not respect classValue

1 participant