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

add missing create verb to AzureManagedCluster, AzureManagedMachinePool webhooks #3352

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Mar 23, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:
I noticed the validating webhooks for AzureManagedCluster and AzureManagedMachinePool resources were never getting invoked when those resources were created. This PR adds the missing kubebuilder annotation to fix that.

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 #

Special notes for your reviewer: I took a look through all the types to see if any others were missing and these were the only 2 I found.

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Fixed a bug causing validating webhooks for AzureManagedCluster and AzureManagedMachinePool not to be invoked on create

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 23, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 23, 2023
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Mar 23, 2023

/cherry-pick release-1.7

@k8s-infra-cherrypick-robot

@nojnhuh: once the present PR merges, I will cherry-pick it on top of release-1.7 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.7

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.

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Mar 23, 2023

/cherry-pick release-1.8

@k8s-infra-cherrypick-robot

@nojnhuh: once the present PR merges, I will cherry-pick it on top of release-1.8 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.8

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.

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm

Nice catch! Were there any errors in the log, or did it just fail silently to invoke them on create?

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

LGTM label has been added.

Git tree hash: 17a2bb85a690c22e3ce7b0376b9fb6950d4807fb

@jackfrancis
Copy link
Contributor

lol

@jackfrancis
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis

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 Mar 23, 2023
@CecileRobertMichon
Copy link
Contributor

wow

@CecileRobertMichon
Copy link
Contributor

... and the e2e test fails to apply the template now

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 23, 2023
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 23, 2023
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Mar 23, 2023

Nice catch! Were there any errors in the log, or did it just fail silently to invoke them on create?

The only indication from the logs was that the webhook request itself wasn't getting logged. I didn't see any related errors.

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Mar 23, 2023

... and the e2e test fails to apply the template now

Windows node pool name length check was erroneously looking at metadata.name instead of spec.name, just pushed a fix for that.

Copy link
Contributor

@jackfrancis jackfrancis 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 Mar 23, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e473088c5d84ec72fc76e930fca510d51403314d

@k8s-ci-robot k8s-ci-robot merged commit 48a7a57 into kubernetes-sigs:main Mar 23, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Mar 23, 2023
@k8s-infra-cherrypick-robot

@nojnhuh: #3352 failed to apply on top of branch "release-1.7":

Applying: add missing create verb to AzureManagedCluster, AzureManagedMachinePool webhooks
Using index info to reconstruct a base tree...
A	api/v1beta1/azuremanagedcluster_webhook.go
A	api/v1beta1/azuremanagedmachinepool_webhook.go
A	api/v1beta1/azuremanagedmachinepool_webhook_test.go
M	config/webhook/manifests.yaml
Falling back to patching base and 3-way merge...
Auto-merging exp/api/v1beta1/azuremanagedmachinepool_webhook_test.go
Auto-merging exp/api/v1beta1/azuremanagedmachinepool_webhook.go
CONFLICT (content): Merge conflict in exp/api/v1beta1/azuremanagedmachinepool_webhook.go
Auto-merging exp/api/v1beta1/azuremanagedcluster_webhook.go
Auto-merging config/webhook/manifests.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 add missing create verb to AzureManagedCluster, AzureManagedMachinePool webhooks
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.7

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.

@k8s-infra-cherrypick-robot

@nojnhuh: new pull request created: #3355

In response to this:

/cherry-pick release-1.8

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.

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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants