Skip to content
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

🌱 Embed ssa.FilterObjectInput into HelperOption to remove duplication #9512

Conversation

musaprg
Copy link
Member

@musaprg musaprg commented Oct 1, 2023

What this PR does / why we need it:
HelperOption is defined with the same fields as ssa.FilterObjectInput, which is redundant. This PR removes the duplication by embedding ssa.FilterObjectInput into HelperOption instead.
The original request of the issue is drop HelperOptions and replace all of it uses with ssa.FilterObjectInput, but that would introduce a lot of diffs. I'd say it would be enough to replace duplicated fields by embedding ssa.FilterObjectInput directly, which makes the diffs small.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #8395

@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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 1, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @musaprg. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

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/test-infra repository.

@musaprg musaprg marked this pull request as ready for review October 1, 2023 16:04
@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 Oct 1, 2023
@musaprg
Copy link
Member Author

musaprg commented Oct 1, 2023

/cc ykakarap

@k8s-ci-robot k8s-ci-robot requested a review from ykakarap October 1, 2023 16:07
@musaprg musaprg force-pushed the 8395-replace-helperoptions-with-filterobjectinput branch 2 times, most recently from 37dead9 to 96ca56a Compare October 1, 2023 16:14
@musaprg
Copy link
Member Author

musaprg commented Oct 1, 2023

/kind cleanup

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Oct 1, 2023
@musaprg
Copy link
Member Author

musaprg commented Oct 1, 2023

/area util

@k8s-ci-robot k8s-ci-robot added area/util Issues or PRs related to utils and removed do-not-merge/needs-area PR is missing an area label labels Oct 1, 2023
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/area clusterclass
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. area/clusterclass Issues or PRs related to clusterclass and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 1, 2023
HelperOption defines the same fields as ssa.FilterObjectInput, which is
redundant. This commit removes its duplication and embed
ssa.FilterObjectInput into HelperOption instead.
@musaprg musaprg force-pushed the 8395-replace-helperoptions-with-filterobjectinput branch from 96ca56a to 6cf2e16 Compare October 1, 2023 18:16
@chrischdi
Copy link
Member

/test help

@k8s-ci-robot
Copy link
Contributor

@chrischdi: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-cluster-api-build-main
  • /test pull-cluster-api-e2e-full-dualstack-and-ipv6-main
  • /test pull-cluster-api-e2e-full-main
  • /test pull-cluster-api-e2e-main
  • /test pull-cluster-api-e2e-mink8s-main
  • /test pull-cluster-api-e2e-workload-upgrade-1-28-latest-main
  • /test pull-cluster-api-test-main
  • /test pull-cluster-api-test-mink8s-main
  • /test pull-cluster-api-verify-main

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-apidiff-main
  • /test pull-cluster-api-e2e-scale-main-experimental

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-apidiff-main
  • pull-cluster-api-build-main
  • pull-cluster-api-e2e-main
  • pull-cluster-api-test-main
  • pull-cluster-api-verify-main

In response to this:

/test help

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/test-infra repository.

@chrischdi
Copy link
Member

/test pull-cluster-api-e2e-full-main

Code seems reasonable. Thx!

/lgtm

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

LGTM label has been added.

Git tree hash: 5845495a3c74a78263fd407069b9f196a3ef5520

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: killianmuldoon

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 2, 2023
@k8s-ci-robot k8s-ci-robot merged commit db30007 into kubernetes-sigs:main Oct 2, 2023
12 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Oct 2, 2023
@musaprg musaprg deleted the 8395-replace-helperoptions-with-filterobjectinput branch October 2, 2023 13:42
@g-gaston
Copy link
Contributor

/remove-area util

@k8s-ci-robot k8s-ci-robot removed the area/util Issues or PRs related to utils label Oct 23, 2023
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/clusterclass Issues or PRs related to clusterclass cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Replace HelperOptions with ssa.FilterObjectInput
5 participants