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 preCreateCluster hook and CNIPath to e2e clusterctl upgrade test #6636

Conversation

mboukhalfa
Copy link
Member

@mboukhalfa mboukhalfa commented Jun 13, 2022

What this PR does / why we need it:
Adds a PreWaitForCluster hook after creating the target management cluster to allow adding any custom resources that might be needed by some providers.
Adds CNIManifestPath as an input parameter.

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 #6465

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 13, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mboukhalfa / name: Mohammed BOUKHALFA (4652cb7)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jun 13, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @mboukhalfa!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @mboukhalfa. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 13, 2022
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 13, 2022
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 13, 2022
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.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 13, 2022
test/e2e/clusterctl_upgrade.go Outdated Show resolved Hide resolved
test/e2e/clusterctl_upgrade.go Outdated Show resolved Hide resolved
@mboukhalfa mboukhalfa force-pushed the clusterclt-upgrade-test-hook/mohammed branch from 4652cb7 to 3598d7c Compare June 14, 2022 17:35
@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 Jun 14, 2022
@mboukhalfa mboukhalfa force-pushed the clusterclt-upgrade-test-hook/mohammed branch from 3598d7c to 6da970e Compare June 14, 2022 17:50
@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 Jun 14, 2022
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 26, 2022
@mboukhalfa mboukhalfa force-pushed the clusterclt-upgrade-test-hook/mohammed branch from 6da970e to ed2953d Compare August 30, 2022 15:00
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 30, 2022
@mboukhalfa mboukhalfa force-pushed the clusterclt-upgrade-test-hook/mohammed branch from ed2953d to 7a1f173 Compare August 30, 2022 15:07
@mboukhalfa
Copy link
Member Author

st approved the linter, not sure if it has finding

How can run the linter check ?

@sbueringer
Copy link
Member

sbueringer commented Sep 28, 2022

How can run the linter check ?

You can't run it on PRs. Unfortunately on PRs of new contributors this can be approved only by someone with write access to the repo. This is a limitation in Prow today (/ok-to-test only works on ProwJobs not on golangci-lint actions).

Locally you can run it with make lint.

@sbueringer
Copy link
Member

/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, 2022
Copy link
Member

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

Let's merge as it is to unblock work, but in future we might want to revisit this in order to split waiters for the management cluster from waiters for the workload cluster (names are randomly generated and with the current solution we can really detect when being called for one and when for the other).

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 29, 2022
@mboukhalfa
Copy link
Member Author

mboukhalfa commented Sep 29, 2022

/lgtm /approve

Let's merge as it is to unblock work, but in future we might want to revisit this in order to split waiters for the management cluster from waiters for the workload cluster (names are randomly generated and with the current solution we can really detect when being called for one and when for the other).

Thanks @fabriziopandini from the provider side I am using managementClusterProxy name to check if it is the source cluster or not based on that I can separate the two calls but as you mentioned it can be redesigned to better separate the two call if it is fine to have more hooks

@mboukhalfa mboukhalfa force-pushed the clusterclt-upgrade-test-hook/mohammed branch from c59ee5b to 8e30ce0 Compare September 29, 2022 15:10
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 29, 2022
@mboukhalfa
Copy link
Member Author

@sbueringer I have rebased since #7244 just got merged can you please re LGTM

@mboukhalfa mboukhalfa force-pushed the clusterclt-upgrade-test-hook/mohammed branch from 8e30ce0 to 29e9d69 Compare September 29, 2022 15:22
@sbueringer
Copy link
Member

sbueringer commented Sep 29, 2022

@sbueringer I have rebased since #7244 just got merged can you please re LGTM

In general, yes. Just took another look at it and found something I was missing before.

I would run the full e2e tests after this one is fixed and then merge afterwards (per default on PRs we just run a few tests and those don't include the clusterctl upgrade test)

@mboukhalfa mboukhalfa force-pushed the clusterclt-upgrade-test-hook/mohammed branch from 29e9d69 to c5a7611 Compare September 29, 2022 15:44
@sbueringer
Copy link
Member

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

/cherry-pick release-1.2
(to make it available earlier)

@k8s-infra-cherrypick-robot

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

In response to this:

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

/cherry-pick release-1.2
(to make it available earlier)

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.

@fabriziopandini
Copy link
Member

/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 Sep 29, 2022
@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

@sbueringer
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit dca818a into kubernetes-sigs:main Sep 29, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.3 milestone Sep 29, 2022
@k8s-infra-cherrypick-robot

@sbueringer: #6636 failed to apply on top of branch "release-1.2":

Applying: add PreWaitForCluster hook and CNIPath to e2e clusterctl upgrade test
Using index info to reconstruct a base tree...
M	test/e2e/clusterctl_upgrade.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/clusterctl_upgrade.go
CONFLICT (content): Merge conflict in test/e2e/clusterctl_upgrade.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 add PreWaitForCluster hook and CNIPath to e2e clusterctl upgrade test
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:

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

/cherry-pick release-1.2
(to make it available earlier)

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

[e2e tests] Add CNIManifestPath and namespaces as inputs to ClusterctlUpgradeSpec
7 participants