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

Simple upgrade test using kubetest2 framework #10523

Merged
merged 1 commit into from
Jan 9, 2021

Conversation

justinsb
Copy link
Member

@justinsb justinsb commented Jan 4, 2021

Starting very simple and hard-coded!

@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 Jan 4, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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 Jan 4, 2021
@justinsb
Copy link
Member Author

justinsb commented Jan 4, 2021

cc @rifelpet I think this is the right way to do things?

/assign rifelpet

if [[ "${CLOUD_PROVIDER}" == "aws" ]]; then
ZONES=`kops get cluster ${CLUSTER_NAME} -ojson | jq -r .spec.subnets[].zone`
CLUSTER_TAG="${CLUSTER_NAME}"
TEST_ARGS="${TEST_ARGS} --provider=aws --gce-zone=${ZONES[0]} --cluster-tag=${CLUSTER_TAG}"
Copy link
Member

Choose a reason for hiding this comment

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

Might be worthy of a comment that --gce-zone is actually provider agnostic (this tripped me up for a minute)

https://github.com/kubernetes/test-infra/blob/1a5044709fb8b5350c99a2a8e5ac208827a04c07/kubetest/kops.go#L692-L697

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call - added


kops validate cluster

kubetest2 kops ${KUBETEST2_COMMON_ARGS} --down
Copy link
Member

Choose a reason for hiding this comment

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

any reason not to just let the trap function run every time? You could remove these last 3 lines and simplify the two functions above.

Copy link
Member Author

Choose a reason for hiding this comment

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

My thought was that we wanted to preserve the error, but actually I think that you're right and it's just over-complicating things - we want to know if down failed and there's still a lingering cluster!

@justinsb justinsb force-pushed the test_upgrade branch 2 times, most recently from 2e2a4b5 to 63cf5ff Compare January 9, 2021 22:05
Starting very simple and hard-coded!

Co-authored-by: Peter Rifel <rifelpet@users.noreply.github.com>
@justinsb
Copy link
Member Author

justinsb commented Jan 9, 2021

Thanks @rifelpet - I incorporated your change!

@rifelpet
Copy link
Member

rifelpet commented Jan 9, 2021

👍🏻
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 9, 2021
@k8s-ci-robot k8s-ci-robot merged commit 7df2521 into kubernetes:master Jan 9, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Jan 9, 2021
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants