Skip to content
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

Reconciler needs to provide a filter function for leader election #1891

Open
GregDritschler opened this issue Nov 3, 2020 · 9 comments
Open
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@GregDritschler
Copy link

Expected Behavior

Tekton has created a new custom resource called Run for running custom tasks. Each custom task implementer will provide a reconciler that watches for and processes Run objects that refer to its kind of custom task, through the use of the filter function given to the run informer.

Actual Behavior

We've found a case where a reconciler is given all Run objects, not just the ones it has requested through the filter function given to the run informer. This happens during leader election in this code:

https://github.com/tektoncd/pipeline/blob/master/pkg/client/injection/reconciler/pipeline/v1alpha1/run/controller.go#L72

A custom task implementer will not want to be given Run objects that it isn't written to handle. It needs to be able to pass a filter function to filter the objects on this path.

Steps to Reproduce the Problem

Any controller using leader election goes through this path. Run objects may be the first case though where there may be multiple independent controllers that are only interested in distinct subsets of the objects.

Additional Info

@GregDritschler
Copy link
Author

@n3wscott fyi

@n3wscott
Copy link
Contributor

n3wscott commented Nov 3, 2020

Thanks for the bug report, I think we can fix this quick, but it will need to be in a few days because of the current release.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2021

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 2, 2021
@slinkydeveloper
Copy link
Contributor

/remove-lifecycle-stale

Hitting this issue while developing a secrets reconciler

@slinkydeveloper
Copy link
Contributor

My controller loops indefinitely trying to reconcile every secret in the cluster, although I've set the following filters: https://github.com/slinkydeveloper/control-data-plane-communication/pull/11/files#diff-758961aac53d57d417fc85fa07093ab347dbd01929ebfc54ffe0cf2af64675b6R77

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 3, 2021
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2021

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 5, 2021
@slinkydeveloper
Copy link
Contributor

/remove-lifecycle stale

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 6, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2021

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 5, 2021
@github-actions github-actions bot closed this as completed Sep 5, 2021
@dprotaso
Copy link
Member

/reopen
/lifecycle frozen

@dprotaso dprotaso reopened this Sep 17, 2021
@knative-prow-robot knative-prow-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

5 participants