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

馃悰 Fix clusterctl upgrade test (v1-0 => main) #5689

Conversation

sbueringer
Copy link
Member

Signed-off-by: Stefan B眉ringer buringerst@vmware.com

What this PR does / why we need it:
The recently added clusterctl upgrade test v1-0 to main is currently broken: https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api#capi-e2e-upgrade-v1-0-to-main

This PR adds the configuration to make it work.

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 #

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 17, 2021
@sbueringer sbueringer changed the title 馃悰 Fix clusterctl upgrade test (v1-0 => main) [WIP] 馃悰 Fix clusterctl upgrade test (v1-0 => main) Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 17, 2021
@sbueringer sbueringer force-pushed the pr-fix-clusterctl-v1beta-to-main-e2e-test branch from d6f747c to 32e22a7 Compare November 17, 2021 10:04
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 17, 2021
stdErr = string(exitErr.Stderr)
}
}
Expect(err).ToNot(HaveOccurred(), "failed to run clusterctl init:\nstdout:\n%s\nstderr:\n%s", string(out), stdErr)
Copy link
Member Author

Choose a reason for hiding this comment

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

This way we can read the stdErr and don't have to convert the byte array which is printed by printing the err

out, err := exec.Command(clusterctlBinaryPath, "version").Output()
Expect(err).ToNot(HaveOccurred(), "error running clusterctl version")
var clusterctlSupportsGenerateCluster bool
if strings.Contains(string(out), "Major:\"1\"") {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not really happy with this detection, but not sure what better alternatives would be

Maybe it's good enough given that we can drop it when we drop v0.3.x support.

@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-full-main
(to verify the "regular" clusterctl upgrade test still works)

@fabriziopandini
Copy link
Member

Thanks for fixing this!
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2021
@fabriziopandini
Copy link
Member

/hold
/retest

@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 Nov 17, 2021
@sbueringer
Copy link
Member Author

I'll have to take a closer look

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Nov 17, 2021

@sbueringer: 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-e2e-full-main 32e22a7 link false /test pull-cluster-api-e2e-full-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.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 17, 2021
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-full-main

Signed-off-by: Stefan B眉ringer buringerst@vmware.com
@sbueringer sbueringer force-pushed the pr-fix-clusterctl-v1beta-to-main-e2e-test branch from b04e489 to defe75e Compare November 17, 2021 12:37
@@ -1,6 +1,9 @@
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
kind: Metadata
releaseSeries:
- major: 1
Copy link
Member Author

Choose a reason for hiding this comment

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

@fabriziopandini I forgot that part

@sbueringer sbueringer changed the title [WIP] 馃悰 Fix clusterctl upgrade test (v1-0 => main) 馃悰 Fix clusterctl upgrade test (v1-0 => main) Nov 17, 2021
@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 Nov 17, 2021
@sbueringer
Copy link
Member Author

sbueringer commented Nov 17, 2021

/test pull-cluster-api-e2e-full-main
Let's wait until the tests are green, but I think they should work now (upgrade v1-0=>main and ClusterClass were green locally)

@fabriziopandini
Copy link
Member

/lgtm
/approve
/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 Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 17, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 merged commit 20c2db4 into kubernetes-sigs:main Nov 17, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Nov 17, 2021
@sbueringer sbueringer deleted the pr-fix-clusterctl-v1beta-to-main-e2e-test branch November 17, 2021 13:28
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

3 participants