Skip to content

Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext#133904

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
aditigupta96:feat-auth-trust-wait-context
Sep 11, 2025
Merged

Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext#133904
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
aditigupta96:feat-auth-trust-wait-context

Conversation

@aditigupta96
Copy link
Copy Markdown
Contributor

@aditigupta96 aditigupta96 commented Sep 5, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext.

Which issue(s) this PR is related to:

Contributes to #126379

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/feature Categorizes issue or PR as related to a new feature. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 5, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @aditigupta96. Thanks for your PR.

I'm waiting for a kubernetes 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. Regular contributors should join the org to skip this step.

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.

@k8s-ci-robot k8s-ci-robot requested review from jpbetz and sttts September 5, 2025 06:45
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 5, 2025
Copy link
Copy Markdown
Contributor

@itzPranshul itzPranshul left a comment

Choose a reason for hiding this comment

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

As i understand what the issue says is to add alternative APIs<something>WithContext while existing the current one for downstream consumers. Also this change wrapping the c.runWorker() inside a anonymous function seems to ignore the ctx.It technically uses UntilWithContext, but the worker itself is still context-unaware. Althrough i might be wrong about this

@aditigupta96 aditigupta96 force-pushed the feat-auth-trust-wait-context branch from b59d102 to 2367323 Compare September 5, 2025 18:22
@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. labels Sep 5, 2025
@github-project-automation github-project-automation Bot moved this to Needs Triage in SIG Apps Sep 5, 2025
@aditigupta96 aditigupta96 changed the title Use UntilWithContext in clusterauthenticationtrust Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext in bootstrap signer Sep 5, 2025
This is part of the ongoing effort to adopt contextual logging
and utilities throughout the codebase.

Contributes to  kubernetes#126379

Signed-off-by: Aditi Gupta <aditigpta@google.com>
@aditigupta96 aditigupta96 force-pushed the feat-auth-trust-wait-context branch from 2367323 to 7d14367 Compare September 5, 2025 18:50
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/network Categorizes an issue or PR as relevant to SIG Network. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 5, 2025
@aditigupta96 aditigupta96 changed the title Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext in bootstrap signer Change WaitForNamedCacheSync to WaitForNamedCacheSyncWithContext Sep 5, 2025
@Jefftree
Copy link
Copy Markdown
Member

Jefftree commented Sep 5, 2025

/ok-to-test

@Jefftree
Copy link
Copy Markdown
Member

Jefftree commented Sep 5, 2025

/cc @pohly

I'm a bit confused about the function WaitForNamedCacheSyncWithContext. The signature makes it look like a wrapper around WaitForCacheSync while the name indicates it's a wrapper around WaitForNamedCacheSync. Is there precedent on how the controllerName variable gets handled in WaitForNamedCacheSyncWithContext?

@k8s-ci-robot k8s-ci-robot requested a review from pohly September 5, 2025 20:04
@aditigupta96
Copy link
Copy Markdown
Contributor Author

aditigupta96 commented Sep 5, 2025

@Jefftree There's no need to manually add the controller name to the context. kube-controller-manager takes care of this at a higher level, the controller code doesn't have to (and shouldn't) do it again (as discussed on slack).

Code Reference: https://github.com/kubernetes/kubernetes/blob/release-1.34/cmd/kube-controller-manager/app/controllermanager.go#L753

@enj enj moved this to Needs Triage in SIG Auth Sep 6, 2025
@benjaminapetersen
Copy link
Copy Markdown
Member

/assign stlaz

@aditigupta96
Copy link
Copy Markdown
Contributor Author

/assign sig-apps-approvers

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@aditigupta96: GitHub didn't allow me to assign the following users: sig-apps-approvers.

Note that only kubernetes members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

/assign sig-apps-approvers

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.

Copy link
Copy Markdown
Contributor

@pohly pohly left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 8, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 9be8907e943b62ad84727bc950d25b659dfe2426

@Jefftree
Copy link
Copy Markdown
Member

Jefftree commented Sep 9, 2025

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 9, 2025
Copy link
Copy Markdown
Member

@janetkuo janetkuo left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aditigupta96, janetkuo

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:

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 10, 2025
@aditigupta96
Copy link
Copy Markdown
Contributor Author

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 10, 2025
@aditigupta96
Copy link
Copy Markdown
Contributor Author

/retest

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@aditigupta96: 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-kubernetes-integration 7d14367 link unknown /test pull-kubernetes-integration

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

@aditigupta96
Copy link
Copy Markdown
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit bb12fee into kubernetes:master Sep 11, 2025
12 of 13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.35 milestone Sep 11, 2025
@github-project-automation github-project-automation Bot moved this from Needs Triage to Closed / Done in SIG Auth Sep 11, 2025
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in SIG Apps Sep 11, 2025
@aditigupta96 aditigupta96 deleted the feat-auth-trust-wait-context branch September 11, 2025 03:12
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/network Categorizes an issue or PR as relevant to SIG Network. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

Archived in project
Archived in project

Development

Successfully merging this pull request may close these issues.

9 participants