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

🏃E2e delete resources #1915

Merged
merged 7 commits into from
Dec 23, 2019

Conversation

wfernandes
Copy link
Contributor

What this PR does / why we need it:

  • Adds a DeleteCluster test to the e2e test framework.
  • It also uses that test in the CAPD e2e tests.
  • Includes refactors.

Created multiple commits for easier review process.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Ref #1732

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 17, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 17, 2019
test/framework/clean_up.go Outdated Show resolved Hide resolved
test/framework/clean_up.go Outdated Show resolved Hide resolved
test/framework/delete_cluster.go Outdated Show resolved Hide resolved
test/infrastructure/docker/e2e/docker_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@chuckha chuckha left a comment

Choose a reason for hiding this comment

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

I'm inclined to agree that we shouldn't add a separate delete test but we should be testing for cleanup after every (at least for now) test. This should keep the time the test suite runs to a minimum while still exercising the delete code written here.

test/framework/clean_up.go Outdated Show resolved Hide resolved
test/framework/delete_cluster.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 18, 2019
Copy link
Contributor

@chuckha chuckha left a comment

Choose a reason for hiding this comment

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

I really like the consolidation but I want to keep the framework provider agnostic. The providers should be maintaining their provider specific code outside of this framework

test/framework/control_plane.go Outdated Show resolved Hide resolved
test/framework/control_plane.go Outdated Show resolved Hide resolved
test/framework/control_plane.go Outdated Show resolved Hide resolved
Copy link
Contributor

@chuckha chuckha left a comment

Choose a reason for hiding this comment

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

looks great!

/approve

Just need to get the tests passing

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chuckha, wfernandes

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 Dec 19, 2019
Copy link
Member

@detiber detiber left a comment

Choose a reason for hiding this comment

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

Minor nit, otherwise lgtm

test/infrastructure/docker/e2e/docker_suite_test.go Outdated Show resolved Hide resolved
@wfernandes
Copy link
Contributor Author

/retest

@detiber
Copy link
Member

detiber commented Dec 20, 2019

lgtm, but should probably squash some of these commits before we merge.

test/framework/control_plane.go Outdated Show resolved Hide resolved
test/framework/go.mod Outdated Show resolved Hide resolved
sigs.k8s.io/cluster-api v0.2.6-0.20191216153338-db9baf9ade0c
sigs.k8s.io/controller-runtime v0.4.0
)

replace (
k8s.io/client-go => k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
Copy link
Member

Choose a reason for hiding this comment

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

What replaces this directive? Kind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH I'm not sure I understand the question. I added the replace directive to match the version in cluster-api and test/infrastructure/docker.

test/framework/go.mod Outdated Show resolved Hide resolved
test/infrastructure/docker/e2e/docker_suite_test.go Outdated Show resolved Hide resolved
test/infrastructure/docker/e2e/docker_test.go Outdated Show resolved Hide resolved
test/infrastructure/docker/go.mod Show resolved Hide resolved
Warren Fernandes added 5 commits December 20, 2019 13:51
Update ginkgo/gomega dependencies
Remove usage of OneNodeClusterInput
Bump test/e2e module to go 1.13
Refactor MultiNodeControlplaneClusterInput
Refactor CleanUp to assert artifacts are deleted

Signed-off-by: Warren Fernandes <[email protected]>
@wfernandes wfernandes force-pushed the e2e-delete-resources branch 3 times, most recently from 315cc44 to 97725fa Compare December 20, 2019 22:31
@wfernandes
Copy link
Contributor Author

@detiber I squashed some of the commits to reduce noise but still keep the independent ones separate. Let me know if this looks good or if you'd like me to squash em all the way down to one.

test/e2e/go.mod Outdated Show resolved Hide resolved
@wfernandes wfernandes force-pushed the e2e-delete-resources branch 3 times, most recently from 0d7f075 to 25441a7 Compare December 23, 2019 18:14
@chuckha
Copy link
Contributor

chuckha commented Dec 23, 2019

Thanks for addressing the major concerns. I'm fine merging this and refactoring anything that isn't working out.

/assign @detiber

for final lgtm. I believe the policy is "one PR for a big change but many commits is fine". please correct me if I've misunderstood

@detiber
Copy link
Member

detiber commented Dec 23, 2019

lgtm, however it looks like the verify job is failing

@wfernandes
Copy link
Contributor Author

Yup...when I run make modules on my machine, it updates a bunch of the go.mod deps. I'm looking into this. My bad.

@detiber
Copy link
Member

detiber commented Dec 23, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 23, 2019
@k8s-ci-robot k8s-ci-robot merged commit 98e2b5a into kubernetes-sigs:master Dec 23, 2019
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants