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

🐛 Handle missing VSphereFailureDomain on VSphereDeploymentZone deletion #2351

Conversation

killianmuldoon
Copy link
Contributor

Reorder the reconcile function of the VSphereDeploymentZone in order to ensure deletion can proceed even if the failureDomain does not exist.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 12, 2023
Copy link
Contributor Author

@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.

/cherry-pick release-1.8

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 12, 2023
@killianmuldoon
Copy link
Contributor Author

/cherry-pick release-1.7

@k8s-infra-cherrypick-robot

@killianmuldoon: 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.

@killianmuldoon killianmuldoon force-pushed the pr-fix-vpsheredeploymentzone-deletion branch from 7eb3f77 to c6be22c Compare September 15, 2023 17:21
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 15, 2023
@killianmuldoon killianmuldoon changed the title 🐛 Reorder VSphereDeploymentZone reconcile to fix deletion 🐛 Handle missing VSphereFailureDomain on VSphereDeploymentZone deletion Sep 15, 2023
@killianmuldoon
Copy link
Contributor Author

/cherry-pick release-1.8

@k8s-infra-cherrypick-robot

@killianmuldoon: 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.

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (c92270a) 60.74% compared to head (448c4c4) 60.81%.
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2351      +/-   ##
==========================================
+ Coverage   60.74%   60.81%   +0.07%     
==========================================
  Files         164      164              
  Lines        9473     9475       +2     
==========================================
+ Hits         5754     5762       +8     
+ Misses       3301     3297       -4     
+ Partials      418      416       -2     
Files Coverage Δ
pkg/context/vspheredeploymentzone_context.go 84.61% <ø> (-2.06%) ⬇️
pkg/taggable/get.go 64.70% <100.00%> (ø)
controllers/vspheredeploymentzone_controller.go 76.75% <92.85%> (-1.38%) ⬇️
...rollers/vspheredeploymentzone_controller_domain.go 47.79% <85.00%> (+2.94%) ⬆️

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@killianmuldoon
Copy link
Contributor Author

Patch coverage: 100.00% and project coverage change: +10.11% 🎉

🤔

Copy link
Member

@chrischdi chrischdi 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 Sep 18, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a0e62a3ae7aeb48672c0b95c8e63ce7d08f94ec3

@chrischdi
Copy link
Member

/approve

/hold if others want to review, feel free to unhold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 18, 2023
@sbueringer
Copy link
Member

Would it be feasible to add unit tests for this controller? (maybe as a follow-up)

@killianmuldoon killianmuldoon force-pushed the pr-fix-vpsheredeploymentzone-deletion branch from c6be22c to a14a0fc Compare September 20, 2023 15:56
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 20, 2023
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 20, 2023
@sbueringer
Copy link
Member

Thank you!

/lgtm
/approve cancel
/hold cancel

/assign @chrischdi

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 21, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 21, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7d2b82824737ae303b4f6b9d615170b02bd124ae

@sbueringer
Copy link
Member

sbueringer commented Sep 21, 2023

/hold

Turns out I can't cancel approval from others :) (which makes sense)

@chrischdi PTAL before merge

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 21, 2023
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
@killianmuldoon killianmuldoon force-pushed the pr-fix-vpsheredeploymentzone-deletion branch from 8f80718 to 71c9d67 Compare September 27, 2023 10:13
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 27, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 27, 2023
@killianmuldoon
Copy link
Contributor Author

/hold

For squash

Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
@killianmuldoon killianmuldoon force-pushed the pr-fix-vpsheredeploymentzone-deletion branch from 71c9d67 to 448c4c4 Compare September 27, 2023 10:21
@k8s-ci-robot
Copy link
Contributor

@killianmuldoon: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-apidiff-main 448c4c4 link false /test pull-cluster-api-provider-vsphere-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@killianmuldoon
Copy link
Contributor Author

@chrischdi would be good to get some eyes on this when you have time

Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

Optional nit

/lgtm

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

LGTM label has been added.

Git tree hash: e8f95014558b6e96f245050bee15f80bedcc2ef1

@chrischdi
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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

@killianmuldoon
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 28, 2023
@k8s-ci-robot k8s-ci-robot merged commit 1b3caae into kubernetes-sigs:main Sep 28, 2023
15 of 16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Sep 28, 2023
@k8s-infra-cherrypick-robot

@killianmuldoon: #2351 failed to apply on top of branch "release-1.7":

Applying: Reorder VSphereDeploymentZone reconcile to fix deletion
Using index info to reconstruct a base tree...
M	controllers/vspheredeploymentzone_controller.go
M	controllers/vspheredeploymentzone_controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging controllers/vspheredeploymentzone_controller_test.go
Auto-merging controllers/vspheredeploymentzone_controller.go
CONFLICT (content): Merge conflict in controllers/vspheredeploymentzone_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Reorder VSphereDeploymentZone reconcile to fix deletion
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

@killianmuldoon: #2351 failed to apply on top of branch "release-1.8":

Applying: Reorder VSphereDeploymentZone reconcile to fix deletion
Using index info to reconstruct a base tree...
M	controllers/vspheredeploymentzone_controller.go
M	controllers/vspheredeploymentzone_controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging controllers/vspheredeploymentzone_controller_test.go
Auto-merging controllers/vspheredeploymentzone_controller.go
CONFLICT (content): Merge conflict in controllers/vspheredeploymentzone_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Reorder VSphereDeploymentZone reconcile to fix deletion
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.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.

@killianmuldoon
Copy link
Contributor Author

Not going to be able to cherry-pick this one the way it turned out - given the context changes.

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants