Skip to content

more explicit delete in ci-entrypoint#3213

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
jackfrancis:explicit-kind-mgmt-cluster-kubeconfig
Mar 7, 2023
Merged

more explicit delete in ci-entrypoint#3213
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
jackfrancis:explicit-kind-mgmt-cluster-kubeconfig

Conversation

@jackfrancis
Copy link
Copy Markdown
Contributor

@jackfrancis jackfrancis commented Mar 2, 2023

What type of PR is this?

/kind failing-test

What this PR does / why we need it:

This PR adds more explicit handling mgmt (kind) and workload cluster operations in ci-entrypoint.sh so that we can more reliably clean up after ourselves following runs. Specifically:

  • Persists a kubeconfig file in a well-known location so that downstream scripts can explicitly reference it, rather than rely upon their implicit kubeconfig context pointing at the right place.
  • A more specific consumption of the SKIP_CLEANUP variable: we only skip the cleanup phase if it is explicitly set to the "true" value.
  • A more consistent dispatching of the KIND_CLUSTER_NAME environment variable upstream and downstream of ci-entrypoint, so that can more explicitly track, target, and delete the management cluster.
  • Remove the timeout wrapping around the cluster delete operation, and display a message if the delete operation fails
  • Remove the cleanup func and instead include the two cleanup statements (delete workload cluster and delete management cluster) in the flow of the trapped on_exit func
    • this is due to observed edge cases in my macos environment and speculation that perhaps this is not a fully supported bash runtime composition pattern across all implementations of bash

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 #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. labels Mar 2, 2023
@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 Mar 2, 2023
@jackfrancis jackfrancis force-pushed the explicit-kind-mgmt-cluster-kubeconfig branch from 07940b1 to 61d31ac Compare March 2, 2023 01:18
Copy link
Copy Markdown
Contributor

@sonasingh46 sonasingh46 left a comment

Choose a reason for hiding this comment

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

/lgtm
PS: Have also verified by pulling in the changes.

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

LGTM label has been added.

DetailsGit tree hash: da2e2c61b01a123641ac65ab7115a5abac6d5ad4

Copy link
Copy Markdown
Contributor

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 2, 2023
@jackfrancis
Copy link
Copy Markdown
Contributor Author

/hold

I might want to advocate for another add'l change to the cleanup foo

@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 Mar 2, 2023
@jackfrancis jackfrancis force-pushed the explicit-kind-mgmt-cluster-kubeconfig branch from 61d31ac to 28d80bf Compare March 2, 2023 23:04
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 2, 2023
@jackfrancis jackfrancis changed the title use explicit kind kubeconfig in ci-entrypoint more explicit delete in ci-entrypoint Mar 2, 2023
Comment thread scripts/ci-entrypoint.sh
Comment thread scripts/ci-entrypoint.sh
Comment thread scripts/ci-entrypoint.sh Outdated
Comment thread scripts/kind-with-registry.sh Outdated
Comment thread scripts/ci-entrypoint.sh Outdated
@jackfrancis jackfrancis force-pushed the explicit-kind-mgmt-cluster-kubeconfig branch from 28d80bf to 459e1e4 Compare March 3, 2023 00:00
@jackfrancis jackfrancis force-pushed the explicit-kind-mgmt-cluster-kubeconfig branch from 459e1e4 to 34138ea Compare March 3, 2023 21:00
@CecileRobertMichon
Copy link
Copy Markdown
Contributor

/lgtm
/approve
/cherry-pick release-1.7

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

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

Details

In response to this:

/lgtm
/approve
/cherry-pick release-1.7

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

LGTM label has been added.

DetailsGit tree hash: c6123dc44250c8e14f434e096879aa278f26ca36

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, mboersma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,mboersma]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@CecileRobertMichon
Copy link
Copy Markdown
Contributor

feel free to remove the hold when ready @jackfrancis

@CecileRobertMichon
Copy link
Copy Markdown
Contributor

/retest
/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 Mar 4, 2023
@jackfrancis
Copy link
Copy Markdown
Contributor Author

/retest

@CecileRobertMichon
Copy link
Copy Markdown
Contributor

:(

/retest

@jackfrancis
Copy link
Copy Markdown
Contributor Author

/hold

I prefer that #3105 land first!

@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 Mar 6, 2023
@CecileRobertMichon
Copy link
Copy Markdown
Contributor

/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 Mar 6, 2023
@jackfrancis
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@jackfrancis
Copy link
Copy Markdown
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit f7953f7 into kubernetes-sigs:main Mar 7, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.8 milestone Mar 7, 2023
@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@CecileRobertMichon: new pull request created: #3235

Details

In response to this:

/lgtm
/approve
/cherry-pick release-1.7

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.

@jackfrancis jackfrancis deleted the explicit-kind-mgmt-cluster-kubeconfig branch March 10, 2023 19:36
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. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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.

6 participants