-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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 failures on ginkgo-e2e.sh #76937
Fix shellcheck failures on ginkgo-e2e.sh #76937
Conversation
update pull request update pull request
/assign @fejta |
@@ -48,11 +48,13 @@ source "${KUBE_ROOT}/cluster/kube-util.sh" | |||
function detect-master-from-kubeconfig() { | |||
export KUBECONFIG=${KUBECONFIG:-$DEFAULT_KUBECONFIG} | |||
|
|||
local cc=$("${KUBE_ROOT}/cluster/kubectl.sh" config view -o jsonpath="{.current-context}") | |||
if [[ ! -z "${KUBE_CONTEXT:-}" ]]; then | |||
local cc |
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.
Ref: https://github.com/koalaman/shellcheck/wiki/SC2155
[1]
cc="${KUBE_CONTEXT}" | ||
fi | ||
local cluster=$("${KUBE_ROOT}/cluster/kubectl.sh" config view -o jsonpath="{.contexts[?(@.name == \"${cc}\")].context.cluster}") | ||
local cluster |
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.
[1]
export PATH=$(dirname "${e2e_test}"):"${PATH}" | ||
# Add path for things like running kubectl binary. | ||
PATH=$(dirname "${e2e_test}"):"${PATH}" | ||
export 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.
[1]
@@ -86,8 +88,8 @@ fi | |||
if [[ "${KUBERNETES_PROVIDER}" == "gce" ]]; then | |||
set_num_migs | |||
NODE_INSTANCE_GROUP="" | |||
for ((i=1; i<=${NUM_MIGS}; i++)); do | |||
if [[ ${i} == ${NUM_MIGS} ]]; then | |||
for ((i=1; i<=NUM_MIGS; i++)); do |
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.
Ref: https://github.com/koalaman/shellcheck/wiki/SC2004
for ((i=1; i<=${NUM_MIGS}; i++)); do | ||
if [[ ${i} == ${NUM_MIGS} ]]; then | ||
for ((i=1; i<=NUM_MIGS; i++)); do | ||
if [[ ${i} == "${NUM_MIGS}" ]]; then |
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.
Ref: https://github.com/koalaman/shellcheck/wiki/SC2053
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.
Please remove the shellcheck exception if you're going to update this file
kubernetes/hack/.shellcheck_failures
Line 24 in 36ccff1
./hack/ginkgo-e2e.sh |
82f44a4
to
e18a44e
Compare
@fejta Thank you. I forgot to delete it |
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.
/lgtm
/approve
/retest
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fejta, xichengliudui 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 |
/test pull-kubernetes-e2e-gce-100-performance |
A |
Thanks for the warning. |
/retest |
e18a44e
to
2fb859d
Compare
Resolved file conflicts. |
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.
/lgtm
/kind cleanup
/priority backlog
/kind cleanup
/sig testing
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Which issue(s) this PR fixes:
Ref #72956
Special notes for your reviewer:
Does this PR introduce a user-facing change?: