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 E2E test for MachineSet Preflight checks #8698

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

ykakarap
Copy link
Contributor

What this PR does / why we need 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 #

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 19, 2023
@ykakarap ykakarap changed the title [DO_NOT_REVIEW][WIP] add E2E test for MachineSet Preflight checks 🌱 [DO_NOT_REVIEW][WIP] add E2E test for MachineSet Preflight checks May 19, 2023
test/framework/machinedeployment_helpers.go Outdated Show resolved Hide resolved
test/framework/machinedeployment_helpers.go Outdated Show resolved Hide resolved
test/e2e/cluster_upgrade_runtimesdk.go Outdated Show resolved Hide resolved
test/e2e/cluster_upgrade_runtimesdk.go Outdated Show resolved Hide resolved
test/e2e/cluster_upgrade_runtimesdk.go Show resolved Hide resolved
@sbueringer
Copy link
Member

sbueringer commented May 23, 2023

@killianmuldoon When you have some time, can you do a sanity check on the changes to the test/e2e folder in this PR?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 26, 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 Jun 2, 2023
Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

Just a few nits + golangci-lint has some findings

test/e2e/cluster_upgrade_runtimesdk.go Outdated Show resolved Hide resolved
test/e2e/cluster_upgrade_runtimesdk.go Outdated Show resolved Hide resolved
test/e2e/cluster_upgrade_runtimesdk.go Outdated Show resolved Hide resolved
@ykakarap ykakarap changed the title 🌱 [DO_NOT_REVIEW][WIP] add E2E test for MachineSet Preflight checks 🌱 add E2E test for MachineSet Preflight checks Jun 2, 2023
@ykakarap
Copy link
Contributor Author

ykakarap commented Jun 3, 2023

/hold until #8628 and #8669 are merged.

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

/test pull-cluster-api-e2e-main

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

Last round of nits from my side

test/e2e/cluster_upgrade_runtimesdk.go Outdated Show resolved Hide resolved
test/e2e/cluster_upgrade_runtimesdk.go Outdated Show resolved Hide resolved
@sbueringer
Copy link
Member

Lgtm pending underlying PRs are merged + squash/rebase

@jackfrancis
Copy link
Contributor

This PR looks like it includes actual implementation of these checks and not just E2E, should we retitle?

@sbueringer
Copy link
Member

Those commits will be dropped. We have to merge underlying PRs first which is also the reason why the PR is on hold. xref #8698 (comment)

@sbueringer
Copy link
Member

sbueringer commented Jun 7, 2023

@jackfrancis If you want to review, everything in test/ will stay in this PR.

// should be blocked because the preflight checks should not pass (kubeadm version skew preflight check should fail).
func machineSetPreflightChecksTestHandler(ctx context.Context, c client.Client, clusterRef types.NamespacedName) {
// Verify that the hook is called and the topology reconciliation is blocked.
hookName := "AfterControlPlaneUpgrade"
Copy link
Contributor

Choose a reason for hiding this comment

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

I almost wonder if this check for the AfterControlPlaneUpgrade hook should be generalized as part of every control plane upgrade flow, and not incorporated into this MachineDeployment validation. Is that a good idea, and viable?

(I'm assuming that this hook is always called after a control plane upgrade, as its name suggests.)

Copy link
Member

@sbueringer sbueringer Jun 9, 2023

Choose a reason for hiding this comment

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

It is only called if there is a Runtime Extension deployed. This test is the only one who uses Runtime Extensions.

To be honest, I"m not sure I understand what you mean with "generalized as part of every control plane upgrade flow"

@sbueringer
Copy link
Member

@ykakarap Just merged the underlying PR, can you please rebase this PR?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 9, 2023
@ykakarap
Copy link
Contributor Author

@ykakarap Just merged the underlying PR, can you please rebase this PR?

Will do.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 12, 2023
@ykakarap
Copy link
Contributor Author

Rebased.

@sbueringer
Copy link
Member

/lgtm

/assign @fabriziopandini

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

LGTM label has been added.

Git tree hash: 1e7e06df9d05131473eb3039f30a2742e8c362c0

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 14, 2023
@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 Jun 14, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4ffe9094da9a4579c932021f4597605f0969a664

@sbueringer
Copy link
Member

/assign @fabriziopandini

@fabriziopandini
Copy link
Member

/hold cancel
/lgtm
/approve

@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 Jun 14, 2023
@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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit 74e7bd2 into kubernetes-sigs:main Jun 14, 2023
10 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jun 14, 2023
@johannesfrey
Copy link
Contributor

/area e2e-testing

@k8s-ci-robot k8s-ci-robot added the area/e2e-testing Issues or PRs related to e2e testing label Jun 16, 2023
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/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.

6 participants