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

fix test/e2e_node/gubernator.sh shellcheck failures #79317

Merged
merged 1 commit into from
Jun 25, 2019

Conversation

BenTheElder
Copy link
Member

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it: fixes shellcheck failures in test/e2e_node/gubernator.sh

Which issue(s) this PR fixes:

Part of #72956

Special notes for your reviewer: I was hoping nobody used this script still, but it seems the node e2e tests may invoke it :|
Since the fixes are trivial enough, I just went ahead and fixed it. If we can eliminate all failing files we can dramatically speedup and simplify the shellcheck verify script.

Does this PR introduce a user-facing change?:

NONE

/sig node
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added 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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/node Categorizes an issue or PR as relevant to SIG Node. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 24, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Jun 24, 2019
Copy link
Contributor

@mattjmcnaughton mattjmcnaughton left a comment

Choose a reason for hiding this comment

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

/lgtm

Confirming that you ran this script (either locally or via the test suite) and it succeeded?



if [[ $# -eq 0 || ! $1 =~ ^[Yy]$ ]]; then
read -p "Do you want to run gubernator.sh and upload logs publicly to GCS? [y/n]" yn
read -r -p "Do you want to run gubernator.sh and upload logs publicly to GCS? [y/n]" yn
Copy link
Contributor

Choose a reason for hiding this comment

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

For my own knowledge - why is -r necessary here?

Copy link
Member Author

Choose a reason for hiding this comment

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

without -r read will mangle escape sequences. technically it shouldn't matter in this context, but it's a good habit and a correctness fix unless you actually wanted that behavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

the shellcheck wiki has a good entry on this https://github.com/koalaman/shellcheck/wiki/SC2162

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 24, 2019
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@BenTheElder
Copy link
Member Author

Confirming that you ran this script (either locally or via the test suite) and it succeeded?

So actually I did not run it directly as it needs to be part of the suite, I'm not positive that we're still running it but:

  • the changes should be safe
  • if it does break we'll actually find out where it is being used!

I'm tempted to just delete it as CI shouldn't be using scripts here to craft these uploads, it should be letting Prow do that, but it was quick enough to just fix it.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@BenTheElder
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit 38e95b1 into kubernetes:master Jun 25, 2019
@BenTheElder BenTheElder deleted the yikeshell branch June 25, 2019 08:24
@mattjmcnaughton
Copy link
Contributor

mattjmcnaughton commented Jun 25, 2019 via email

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/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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

4 participants