Skip to content

✨ Add ClusterWithContext #109

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 3 commits into from
May 14, 2025

Conversation

ntnn
Copy link
Member

@ntnn ntnn commented May 13, 2025

Summary

Add ClusterWithContext

Related issue(s)

Supersedes #106

Release Notes

Add ClusterWithContext

@kcp-ci-bot kcp-ci-bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 13, 2025
@embik
Copy link
Member

embik commented May 13, 2025

I know this sucks, but I think we might want to wait for #107 to land before we merge new features here.

@ntnn
Copy link
Member Author

ntnn commented May 13, 2025

Oh yeah, absolutely
/hold

@kcp-ci-bot kcp-ci-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 13, 2025
ntnn added 3 commits May 14, 2025 08:46
Signed-off-by: Nelo-T. Wallus <[email protected]>
Signed-off-by: Nelo-T. Wallus <[email protected]>
@ntnn ntnn force-pushed the kcp3350-clusterwithcontext-rebase branch from 4786938 to d883fe5 Compare May 14, 2025 06:50
@kcp-ci-bot kcp-ci-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 14, 2025
@ntnn
Copy link
Member Author

ntnn commented May 14, 2025

/hold cancel

@kcp-ci-bot kcp-ci-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 14, 2025
@gman0
Copy link
Contributor

gman0 commented May 14, 2025

/lgtm

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label May 14, 2025
@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 92674a9676c3e1eb1e104e4757f834dcd23a2f73

@gman0
Copy link
Contributor

gman0 commented May 14, 2025

What's the plan with the non-context Cluster()?

Copy link
Member

@embik embik left a comment

Choose a reason for hiding this comment

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

/approve

@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik

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

The pull request process is described here

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

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2025
@kcp-ci-bot kcp-ci-bot merged commit e635c8b into kcp-dev:kcp-1.32.3 May 14, 2025
9 checks passed
@ntnn
Copy link
Member Author

ntnn commented May 14, 2025

What's the plan with the non-context Cluster()?

I think the non-context Cluster() can be kept as is; we just need the ClusterWithContext for scenarios where the informer needs to be lifecycled.
IIRC we also have scenarios where no context is available so the caller would just call ClusterWithContext(context.Background(), .... If that leaks any resources that should show in tests (ideally).
Also we have situations where an informer is grabbed just to use as a lister, which doesn't produce leaked goroutines.

So overall I'd say just adding ClusterWithContext and (for now) not touching Cluster is a-ok.

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. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm 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