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

fix vnet in separate resource group #4191

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Oct 26, 2023

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

This PR updates the custom vnet e2e test to use different resource groups for the vnet and the rest of the cluster resources. I was trying to test this same scenario for #3528 and was running into issues that didn't seem related, so I'd like to make sure this scenario works on main first.

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:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Fixed a bug where AzureCluster's spec.networkSpec.vnet.resourceGroup was not always properly honored

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 26, 2023
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Oct 26, 2023

/test pull-cluster-api-provider-azure-e2e-optional

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Oct 26, 2023

/test pull-cluster-api-provider-azure-e2e-optional

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Oct 27, 2023

This should be ready for review!

/retitle use different rg for vnet in custom vnet e2e test

@k8s-ci-robot k8s-ci-robot changed the title [WIP] use different rg for vnet in custom vnet e2e test use different rg for vnet in custom vnet e2e test Oct 27, 2023
@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 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6987809) 57.86% compared to head (c6531c3) 57.99%.
Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4191      +/-   ##
==========================================
+ Coverage   57.86%   57.99%   +0.12%     
==========================================
  Files         187      187              
  Lines       19216    19256      +40     
==========================================
+ Hits        11120    11168      +48     
+ Misses       7468     7458      -10     
- Partials      628      630       +2     
Files Coverage Δ
azure/scope/cluster.go 60.88% <100.00%> (+0.80%) ⬆️

... and 3 files with indirect coverage changes

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

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Oct 27, 2023

@nojnhuh: The following tests 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-azure-conformance-ipv6-with-ci-artifacts c6531c3 link false /test pull-cluster-api-provider-azure-conformance-ipv6-with-ci-artifacts
pull-cluster-api-provider-azure-conformance-dual-stack-with-ci-artifacts c6531c3 link false /test pull-cluster-api-provider-azure-conformance-dual-stack-with-ci-artifacts

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.

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Oct 27, 2023

/test pull-cluster-api-provider-azure-test

@@ -155,6 +156,7 @@ var _ = Describe("Workload cluster creation", func() {
clusterName = getClusterName(clusterNamePrefix, "public-custom-vnet")
By("Creating a custom virtual network", func() {
Expect(os.Setenv(AzureCustomVNetName, "custom-vnet")).To(Succeed())
Expect(os.Setenv(AzureCustomVnetResourceGroup, clusterName+"-vnetrg")).To(Succeed())
Copy link
Contributor

Choose a reason for hiding this comment

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

is everything getting cleaned up as it should now that we're using a separate RG?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, but I'll check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I don't see any extra resource groups around after running the test locally.

@nojnhuh
Copy link
Contributor Author

nojnhuh commented Oct 30, 2023

/test pull-cluster-api-provider-azure-e2e-optional

Copy link
Contributor

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

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2292c477e5f8ad41d78337af9525e0f5aef7bed4

@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, 2023
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Oct 30, 2023

/cherry-pick release-1.11
/cherry-pick release-1.10

@k8s-infra-cherrypick-robot

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

In response to this:

/cherry-pick release-1.11
/cherry-pick release-1.10

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 Oct 30, 2023

/retitle fix vnet in separate resource group
/release-note-edit

Fixed a bug where AzureCluster's spec.networkSpec.vnet.resourceGroup was not always properly honored

/remove-kind cleanup
/kind bug

@k8s-ci-robot k8s-ci-robot changed the title use different rg for vnet in custom vnet e2e test fix vnet in separate resource group Oct 30, 2023
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. labels Oct 30, 2023
@k8s-ci-robot k8s-ci-robot merged commit 72939d6 into kubernetes-sigs:main Oct 30, 2023
26 of 29 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Oct 30, 2023
@k8s-infra-cherrypick-robot

@nojnhuh: new pull request created: #4205

In response to this:

/cherry-pick release-1.11
/cherry-pick release-1.10

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: #4207

In response to this:

/cherry-pick release-1.11
/cherry-pick release-1.10

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 nojnhuh deleted the custom-vnet-rg branch October 30, 2023 23:34
@nawazkh
Copy link
Member

nawazkh commented Oct 31, 2023

lgtm++. Nice fix!

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
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants