Skip to content

⚠ Move arguments from Watch() & Start() to Source objects#2315

Closed
inteon wants to merge 3 commits intokubernetes-sigs:mainfrom
inteon:refactor_source
Closed

⚠ Move arguments from Watch() & Start() to Source objects#2315
inteon wants to merge 3 commits intokubernetes-sigs:mainfrom
inteon:refactor_source

Conversation

@inteon
Copy link
Copy Markdown
Member

@inteon inteon commented May 10, 2023

⚠️ depends on #2686

This PR removes the argument pass-through that happens when starting a Source watch.
Now, the eventhandler is passed directly to the Source constructor function.
Additionally, the predicates are now passed to the handler.WithPredicates which returns a "filtered handler".

This UX change makes the setup of Sources more intuitive, makes it much easier to create a custom Source and makes Sources easier to reason about.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 10, 2023
@inteon inteon force-pushed the refactor_source branch 2 times, most recently from 583bc74 to 56f1c12 Compare May 10, 2023 16:13
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 17, 2023
@sbueringer
Copy link
Copy Markdown
Member

@inteon Are you still interested in this PR?

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: inteon
Once this PR has been reviewed and has the lgtm label, please assign fillzpp for approval. For more information see the Kubernetes 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

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 6, 2024
@inteon inteon force-pushed the refactor_source branch 2 times, most recently from 4e8bec2 to 916d5db Compare January 6, 2024 12:11
@inteon
Copy link
Copy Markdown
Member Author

inteon commented Jan 6, 2024

@sbueringer I rebased the PR.

@inteon inteon force-pushed the refactor_source branch 2 times, most recently from 2951ef5 to 53f7e5d Compare January 6, 2024 13:04
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@inteon inteon force-pushed the refactor_source branch 4 times, most recently from d9f1cbe to 1e343fa Compare February 13, 2024 21:40
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@inteon: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-controller-runtime-apidiff 9894401 link false /test pull-controller-runtime-apidiff

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 26, 2024
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

PR needs rebase.

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/test-infra repository.

@inteon
Copy link
Copy Markdown
Member Author

inteon commented Jun 5, 2024

A similar change has been merged in #2783

@inteon inteon closed this Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants