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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 Add back flavor to Waiter interface #9166

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

CecileRobertMichon
Copy link
Contributor

What this PR does / why we need it: As part of caaa744#diff-7084fa27f2b10b8d2472295c14187d21ea186aae39efa12e051f340562a4cca4, the Waiter interface input type in the e2e test framework was changed from ApplyClusterTemplateAndWaitInput to ApplyCustomClusterTemplateAndWaitInput, however this is breaking for providers that use the Waiter interface outside of scale.go.

When bumping CAPI to v1.5.0 in CAPZ, we ran into an issue where Flavor is no longer available from that input type (see here).

This PR adds Flavor to the new struct which should have no negative impacts for tests that don't use it but allows tests who need it to keep using it.

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 #

/area e2e-testing

@k8s-ci-robot k8s-ci-robot added area/e2e-testing Issues or PRs related to e2e testing cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 10, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 10, 2023
Copy link
Contributor Author

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

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

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

LGTM label has been added.

Git tree hash: 3ada2b0252d0874bcfa1750e37f85e6f87630086

@@ -333,6 +334,7 @@ type ApplyCustomClusterTemplateAndWaitInput struct {
ClusterName string
Copy link
Member

Choose a reason for hiding this comment

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

@CecileRobertMichon I could be mixing up some thing. But why are you moving from ApplyClusterTemplateAndWaitInput to ApplyCustomClusterTemplateAndWaitInput in CAPZ?

/hold

Copy link
Member

Choose a reason for hiding this comment

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

xref: kubernetes-sigs/cluster-api-provider-azure#3707 (comment)
(Not sure if you're referring to this)

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, now understood that you had to align because you use the interface. Should have seen it the first time

Copy link
Member

Choose a reason for hiding this comment

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

I'll answer in CAPZ. The link to the CAPZ conversation didn't work the first time for me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbueringer we're not moving from one to the other, we're implementing the Waiter interface https://github.com/kubernetes-sigs/cluster-api/blob/main/test/framework/clusterctl/clusterctl_helpers.go#L227 as part of ControlPlaneWaiters. I don't understand if you're saying there's another way around this?

Copy link
Member

Choose a reason for hiding this comment

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

I'm basically wondering if you have to move to the ApplyCustomClusterTemplateAndWaitInput struct in all cases where you did (because not all of them are for the Waiters interface). And then if in the cases you had to move you require the flavor

I'm not very familiar with the CAPZ code, I'm just seeing that this input struct is passed around in a lot of places

Copy link
Member

Choose a reason for hiding this comment

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

Okay took a closer look and saw that all starts with EnsureControlPlaneInitialized which takes the input struct and then calls InstallCalicoAndCloudProviderAzureHelmChart where the flavor is needed

Copy link
Member

Choose a reason for hiding this comment

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

I think there are ways around it basically with closure, but looking at how you use the flavor it seems reasonable to require the flavor in this struct. So I would say let's add it

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 11, 2023
@sbueringer
Copy link
Member

/lgtm

/hold cancel

/assign @fabriziopandini

@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 Aug 14, 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.

/lgtm

@sbueringer happy to approve this one unless you specifically want @fabriziopandini to take a look.

@sbueringer
Copy link
Member

sbueringer commented Aug 14, 2023

I think we can go ahead
(also considering Fabrizio's backlog)

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 Aug 14, 2023
@sbueringer
Copy link
Member

/cherry-pick release-1.5
So the change can be picked up via v1.5.1 in ~ 2 weeks

@k8s-infra-cherrypick-robot

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

In response to this:

/cherry-pick release-1.5
So the change can be picked up via v1.5.1 in ~ 2 weeks

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-ci-robot k8s-ci-robot merged commit c3a2e86 into kubernetes-sigs:main Aug 14, 2023
19 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Aug 14, 2023
@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #9177

In response to this:

/cherry-pick release-1.5
So the change can be picked up via v1.5.1 in ~ 2 weeks

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. area/e2e-testing Issues or PRs related to e2e testing 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants