Skip to content

✨ Leverage isInInitialList of ResourceEventHandler.OnAdd, Add IsInInitialList to TypedCreateEvent#3162

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
sbueringer:pr-initial-list
Mar 17, 2025
Merged

✨ Leverage isInInitialList of ResourceEventHandler.OnAdd, Add IsInInitialList to TypedCreateEvent#3162
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
sbueringer:pr-initial-list

Conversation

@sbueringer

@sbueringer sbueringer commented Mar 16, 2025

Copy link
Copy Markdown
Member

Signed-off-by: Stefan Büringer buringerst@vmware.com

Let's start using IsInitialList that is provided in the OnAdd func of ResourceEventHandlers.

This can be leveraged to determine in a clean way if an add/create event came from an initial list.

https://kubernetes.slack.com/archives/C02MRBMN00Z/p1742119089612549?thread_ts=1741482643.357719&cid=C02MRBMN00Z

Reverts the parts of #2223 that we don't need anymore.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 16, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 16, 2025
@sbueringer sbueringer force-pushed the pr-initial-list branch 2 times, most recently from c423650 to 8b4eacb Compare March 16, 2025 10:16
Signed-off-by: Stefan Büringer buringerst@vmware.com
@sbueringer

Copy link
Copy Markdown
Member Author

cc @howardjohn (as this is basically a follow-up to #2223)

@sbueringer

Copy link
Copy Markdown
Member Author

/assign @alvaroaleman @vincepri

@sbueringer sbueringer changed the title [WIP] ✨ Leverage Informer OnAdd IsInInitialList ✨ Leverage Informer OnAdd IsInInitialList Mar 16, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 16, 2025
@sbueringer sbueringer changed the title ✨ Leverage Informer OnAdd IsInInitialList ✨ Use EventHandler with isInInitialList, Add IsInInitialList to TypedCreateEvent Mar 16, 2025
@sbueringer sbueringer changed the title ✨ Use EventHandler with isInInitialList, Add IsInInitialList to TypedCreateEvent ✨ Leverage isInInitialList of ResourceEventHandler.OnAdd, Add IsInInitialList to TypedCreateEvent Mar 16, 2025

@alvaroaleman alvaroaleman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, that is a great simplification

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 16, 2025
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 7e93121436ab7aaecc13f3a2a185bfe6f1cc5b62

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, sbueringer

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [alvaroaleman,sbueringer]

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

@sbueringer

Copy link
Copy Markdown
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 17, 2025
@sbueringer

Copy link
Copy Markdown
Member Author

Thx again @caozhuozi for bringing this one up! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

4 participants