-
Notifications
You must be signed in to change notification settings - Fork 41.5k
fix shellcheck in cluster/local #73261
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
Conversation
@BenTheElder @jbeda if you have time, can you help review this? Thanks |
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
thanks
/assign @dims |
/retest @dims ping for approval |
KUBE_MASTER=localhost | ||
KUBE_MASTER_IP=127.0.0.1 | ||
KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080" | ||
export KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080" |
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.
hmm why do we need to export
?
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.
IIRC this is sourced and then this env is read by other scripts because :cluster/:. not 100% though
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.
if KUBE_MASTER_URL
is needed by other scripts, shellcheck
suggest we export it. Otherwise we can remove this env if it's safe.
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.
Yeah, hack/ginkgo-e2e.sh
should read this env from cluster/loca/util.sh for local provider case like
KUBE_MASTER_URL="${KUBE_MASTER_URL:-https://${KUBE_MASTER_IP:-}}"
but it cannot do that at this time and hack/ginkgo-e2e.sh
uses a hard-coded default value.
It seems nice to add export
for this case.
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.
Can you add a comment to the above function explaining what it requires, sets and exports? eg:
# Detect the IP for the master
#
# Vars set:
# KUBE_MASTER
# KUBE_MASTER_IP
# Vars exported:
# KUBE_MASTER_URL
function detect-master {
It may seem redundant but it helps us know this is on purpose, and it's the same style used in cluster/gce
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.
@spiffxp sure, PR updated, PTAL
/cc @oomichi |
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.
one nit
KUBE_MASTER=localhost | ||
KUBE_MASTER_IP=127.0.0.1 | ||
KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080" | ||
export KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080" |
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.
Can you add a comment to the above function explaining what it requires, sets and exports? eg:
# Detect the IP for the master
#
# Vars set:
# KUBE_MASTER
# KUBE_MASTER_IP
# Vars exported:
# KUBE_MASTER_URL
function detect-master {
It may seem redundant but it helps us know this is on purpose, and it's the same style used in cluster/gce
/priority important-longterm |
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
/test pull-kubernetes-integration |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder, danielqsj, 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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
fix shellcheck failures in
cluster/local
Which issue(s) this PR fixes:
work towards #72956
Special notes for your reviewer:
Does this PR introduce a user-facing change?: