CNF-23094: Propagate context through pkg/utils public API#1187
CNF-23094: Propagate context through pkg/utils public API#1187sebrandon1 wants to merge 1 commit into
Conversation
|
@sebrandon1: This pull request references CNF-23094 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebrandon1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @sebrandon1. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
🤖 To deploy this PR, run the following command: |
Replace context.TODO() with a ctx parameter in all pkg/utils functions that make Kubernetes API calls. Callers that already have context available now pass it through; remaining callers use context.TODO() temporarily until their packages are updated. Additionally: - Wire backoff.WithContext so retries in GetObjectIfFound respect context cancellation - Hoist ValidatePriorityClassExist out of the per-node loop in nodeScanTypeHandler.createScanWorkload to avoid redundant API calls
d9f1925 to
8a46dc4
Compare
|
🤖 To deploy this PR, run the following command: |
|
@yuumasato Could you please |
Summary
Context
This is the first PR in a package-by-package effort to replace context.TODO() with proper context propagation across the compliance-operator (CNF-23094). Starting with pkg/utils since it is the smallest package (5 instances) and its exported functions are called by many other packages.
Callers that do not yet have ctx in their function signatures temporarily use context.TODO() — those will be updated in subsequent per-package PRs.
Test plan