Skip to content

Conversation

@furkatgofurov7
Copy link
Member

What this PR does / why we need it:
This PR refactors the runtime client to eliminate code duplication in two places:

  1. Extension filtering: CallAllExtensions now uses GetAllExtensions instead of duplicating the filtering logic
  2. Response validation: Extracted common response status checking into a validateResponseStatus helper function

Addresses: #12857 (comment)
Part of: #12291

/area runtime-sdk

… duplication

Previously, CallAllExtensions duplicated the extension filtering logic
(namespace matching, registry listing, GVK lookup) that already existed
in GetAllExtensions. This refactoring makes CallAllExtensions call
GetAllExtensions to get the list of matching handlers.

Signed-off-by: Furkat Gofurov <[email protected]>
@k8s-ci-robot k8s-ci-robot added area/runtime-sdk Issues or PRs related to Runtime SDK cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 28, 2025
@furkatgofurov7 furkatgofurov7 moved this to PR to be reviewed in CAPI / Turtles Oct 28, 2025
@sbueringer
Copy link
Member

/test pull-cluster-api-e2e-main

@sbueringer
Copy link
Member

Thank you!

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: 32e7ae2023a9a5f429726c521ac1636b907c1537

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 30, 2025
@k8s-ci-robot k8s-ci-robot merged commit caddc7d into kubernetes-sigs:main Oct 30, 2025
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Oct 30, 2025
@github-project-automation github-project-automation bot moved this from PR to be reviewed to Done in CAPI / Turtles Oct 30, 2025
@furkatgofurov7 furkatgofurov7 deleted the dedup-CallAllExtensions-code branch October 30, 2025 18:44
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. area/runtime-sdk Issues or PRs related to Runtime SDK 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants