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

Fixing shellcheck warnings in prin #763

Merged
merged 1 commit into from
Jun 30, 2019
Merged

Conversation

pswica
Copy link
Contributor

@pswica pswica commented Jun 30, 2019

Please see: #742 and #726 for more details and context.

Let me know anything else to improve on :)

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 30, 2019
@k8s-ci-robot
Copy link
Contributor

@pswica: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-release-verify d168425 link /test pull-release-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@justaugustus
Copy link
Member

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, pswica

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 Jun 30, 2019
@k8s-ci-robot k8s-ci-robot merged commit 2c9ab88 into kubernetes:master Jun 30, 2019
CP_COMMITS=($(git log --grep "cherry-pick-of-.*#$PR-" \
--all --pretty=format:"%h"))
mapfile -i CP_COMMITS < <(git log --grep "cherry-pick-of-.*#$PR-" \
--all --pretty=format:"%h")
Copy link
Contributor

Choose a reason for hiding this comment

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

@pswica, here I met this error when used mapfile -i :
/Users/llhu/Desktop/test/release/release/prin: line 154: mapfile: -i: invalid option mapfile: usage: mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
Is there some errors in my local side. Thanks

Copy link
Contributor Author

@pswica pswica Jul 1, 2019

Choose a reason for hiding this comment

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

Thanks so much for catching. No this was my bad. I messed up by putting -i instead of -t

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR here

@pswica pswica mentioned this pull request Jul 1, 2019
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

arrays are tricky

@@ -70,7 +72,7 @@ show_tags () {
local pr=$1
local initial_commit=$2
shift 2
local cp_commits=($*)
local cp_commits=("$*")
Copy link
Member

Choose a reason for hiding this comment

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

There is a good chance this should be "$@" instead, ref: https://github.com/koalaman/shellcheck/wiki/SC2086#exceptions


security_layer::hosted_map

show_tags "$PR" $INITIAL_COMMIT ${CP_COMMITS[*]}
show_tags "$PR" "${INITIAL_COMMIT[0]}" "${CP_COMMITS[*]}"
Copy link
Member

Choose a reason for hiding this comment

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

There is a good chance this should be "${CP_COMMITS[@]}" instead, ref: https://github.com/koalaman/shellcheck/wiki/SC2086#exceptions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks a lot for reading these. I'm sure there is a lot of hidden bugs/weirdness from my shellcheck changes. I will create an issue and link this, and other things found, to it

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/release-eng Issues or PRs related to the Release Engineering subproject 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. sig/release Categorizes an issue or PR as relevant to SIG Release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants