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

Removing hack/udpate-staging* from update-all.sh #44829

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion hack/godep-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ source "${KUBE_ROOT}/hack/lib/util.sh"
kube::util::ensure_godep_version v79

echo "Starting to download all kubernetes godeps. This takes a while"
GOPATH=${GOPATH}:${KUBE_ROOT}/staging godep restore "$@"
if ! GOPATH=${GOPATH}:${KUBE_ROOT}/staging godep restore "$@"; then
echo "\"godep restore\" failed. Removing the packages that caused the failure from your GOPATH might solve the problem."
Copy link
Contributor

Choose a reason for hiding this comment

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

which are "the packages"?

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 error messages of godep restore will indicate which packages cause the failure, so i think it's ok to refer them as "the packages" here.

Copy link
Member

Choose a reason for hiding this comment

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

This isn't helpful. Like it or not, go encourages a shared GOPATH - I am not going to nuke my changes in other repos to satisfy this tool.

Copy link
Member

Choose a reason for hiding this comment

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

If we EVER expect ANYONE outside of the people on this PR to run these scripts, they MUST be self-contained. We can make a temporary GOPATH and restore into that, for example.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for the temporary gopath in _output which is kept (until make clean).

Copy link
Member Author

Choose a reason for hiding this comment

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

Caching in _output sounds promising. I don't have time to try it until later this week though.

exit 1
fi

echo "Download finished"
2 changes: 0 additions & 2 deletions hack/update-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ BASH_TARGETS="
update-openapi-spec
update-api-reference-docs
update-federation-openapi-spec
update-staging-client-go
update-staging-godeps
update-bazel"

for t in $BASH_TARGETS; do
Expand Down
5 changes: 4 additions & 1 deletion hack/update-staging-godeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ for repo in $(ls ${KUBE_ROOT}/staging/src/k8s.io); do
updateGodepManifest "${repo}"

if [ "${FAIL_ON_DIFF}" == true ]; then
diff --ignore-matching-lines='^\s*\"GoVersion\":' --ignore-matching-line='^\s*\"GodepVersion\":' --ignore-matching-lines='^\s*\"Comment\"' -u "${KUBE_ROOT}/staging/src/k8s.io/${repo}/Godeps" "${TMP_GOPATH}/src/k8s.io/${repo}/Godeps/Godeps.json"
if ! diff --ignore-matching-lines='^\s*\"GoVersion\":' --ignore-matching-line='^\s*\"GodepVersion\":' --ignore-matching-lines='^\s*\"Comment\"' -u "${KUBE_ROOT}/staging/src/k8s.io/${repo}/Godeps" "${TMP_GOPATH}/src/k8s.io/${repo}/Godeps/Godeps.json"; then
echo "staging/src/k8s.io/${repo}/Godeps is out of date. Please run hack/update-staging-godeps.sh. Note that the script is NOT included in hack/update-all.sh."
exit 1
fi
fi
if [ "${DRY_RUN}" != true ]; then
cp "${TMP_GOPATH}/src/k8s.io/${repo}/Godeps/Godeps.json" "${KUBE_ROOT}/staging/src/k8s.io/${repo}/Godeps"
Expand Down
2 changes: 1 addition & 1 deletion staging/copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ if [ "${FAIL_ON_CHANGES}" = true ]; then
echo "${CLIENT_REPO} up to date."
exit 0
else
echo "${CLIENT_REPO} is out of date. Please run hack/update-staging-client-go.sh"
echo "${CLIENT_REPO} is out of date. Please run hack/update-staging-client-go.sh. Note that the script is NOT included in hack/update-all.sh."
exit 1
fi
fi
Expand Down