-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove scaffolding fields that were not used #1219
Remove scaffolding fields that were not used #1219
Conversation
Hi @Adirio. 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 Once the patch is verified, the new status will be reflected by the 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. |
&webhook.Server{Resource: o.res, Config: webhook.Config{Server: o.server, Type: o.webhookType, Operations: o.operations}}, | ||
&webhook.AddServer{Resource: o.res, Config: webhook.Config{Server: o.server, Type: o.webhookType, Operations: o.operations}}, | ||
&webhook.Server{Config: webhook.Config{Server: o.server, Type: o.webhookType, Operations: o.operations}}, | ||
&webhook.AddServer{Config: webhook.Config{Server: o.server, Type: o.webhookType, Operations: o.operations}}, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The v1 is deprecated then I am not sure if we should do refractories on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the changes project-wide. Removing all fields that were not used. As I am not changing any functionality, I don't think v1 being deprecated should be a stopper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following my review:
Regards v1
The v1 is deprecated then I am not sure if we should do refractories on it. So, I'd probably recommend revert it but I will let this to team members decide.
Regards v2
I could check that the golden is using a group domain with .
(see here)and the integration test is checking the webhooks (see here).
The changes show fine 👍
@mengqiy @pwittrock could we move with this one? WDYT?
/assign @pwittrock |
/assign @camilamacedo86 |
Signed-off-by: Adrian Orive <adrian.orive.oneca@gmail.com>
8c42e7e
to
99f5668
Compare
Rebased (no changes) |
/lgtm code cleanups to v1 are fine-ish. I think this isn't a big deal. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Adirio, DirectXMan12 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 |
|
||
ctrlImportCodeFragment := fmt.Sprintf(`"%s/controllers" | ||
`, a.Repo) | ||
apiImportCodeFragment := fmt.Sprintf(`%s%s "%s/%s" | ||
`, a.Resource.GroupImportSafe, a.Resource.Version, a.ResourcePackage, a.Resource.Version) | ||
`, a.Resource.GroupImportSafe, a.Resource.Version, resourcePackage, a.Resource.Version) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The a.ResourcePackage
is used in this case.
You are replacing the attribute of the struct for the usage of local var instead of.
IMO, the previous code has a better approach and follows the same impl of conttroller.go as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has already been merged. We do not need that field in the struct. The struct represents a file object. The file does not require the ResourcePackage
field for anything. When updating this file we do need it, so we compute it locally there. This was applied to all the files. Every field that is not needed for the file has been removed. controller.go
does need it for the file (you can make a search for .ResourcePackage
in the template to see where it is used.
Removes some fields that
File
structs had but are not being used.This PR is part of a bigger change tracked in #1218 but can be applied rightaway.
/kind cleanup