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 shellcheck for godep scripts in hack #74332
Fix shellcheck for godep scripts in hack #74332
Conversation
Hi @mattjmcnaughton. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/assign @cblecker thanks :) |
/sig testing |
Thanks! quick look over looks good. /ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to fix a failure, and this still feels like it's vulnerable to spaces
hack/godep-save.sh
Outdated
@@ -78,7 +78,9 @@ GOPATH="${GOPATH}:$(pwd)/staging" ${KUBE_GODEP:?} save "${REQUIRED_BINS[@]}" | |||
|
|||
# create a symlink in vendor directory pointing to the staging client. This | |||
# let other packages use the staging client as if it were vendored. | |||
for repo in $(ls staging/src/k8s.io); do | |||
for full_repo_path in staging/src/k8s.io/*; do | |||
repo=$(basename ${full_repo_path}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're hitting another shellcheck failure:
In ./hack/godep-save.sh line 82:
repo=$(basename ${full_repo_path})
^---------------^ SC2086: Double quote to prevent globbing and word splitting.
More to the point, what was the original failure you were addressing, and why do it this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question! I was fixing https://github.com/koalaman/shellcheck/wiki/SC2045, which says to prefer shell globs over iterating over ls
. I'll also fixed the additional shellcheck failure - thanks for catching that :)
/priority important-longterm |
f8429f9
to
de319da
Compare
/test pull-kubernetes-kubemark-e2e-gce-big |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattjmcnaughton, spiffxp 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 |
/hold |
/hold cancel |
/retest Review the full test history for this PR. Silence the bot with an |
10 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
Fix errors highlighted by `shellcheck` for `hack/godep-restore.sh` and `hack/godep-save.sh`.
de319da
to
2cef2af
Compare
New changes are detected. LGTM label has been removed. |
/test pull-kubernetes-integration |
@spiffxp mind LGTM'ing? Your previous lgtm got deleted when I rebased. thanks! |
@mattjmcnaughton: PR needs rebase. 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. |
Closing this because Godep is no more 💯 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fix errors highlighted by
shellcheck
forhack/godep-restore.sh
andhack/godep-save.sh
. Part of the effort tracked in #72956.Does this PR introduce a user-facing change?: