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

Conversation

caesarxuchao
Copy link
Member

Addressing #36770 (comment)

More discussion at #44519 (comment)

A summary of the discussion: godep restore doesn't work reliably when the GOPATH is not clean. The two update-staging* scripts rely on godep restore, thus causing troubles to developers. This PR removes the two scripts from update-all.sh, but keeps the coresonding verification in the verify-all.sh, so developers only have to run the update-staging* scripts when necessary.

cc @thockin @Kargakis

rewording the failure message in verify-staging* scripts;
adding instruction to hack/godep-restore.sh failure message
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 24, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: caesarxuchao
We suggest the following additional approver: @smarterclayton

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Apr 24, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@caesarxuchao caesarxuchao added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Apr 24, 2017
@cblecker
Copy link
Member

I think this is okay in the interim, but calls out the need for a better solution for go dependency management.

cc: @kubernetes/sig-contributor-experience-misc

@@ -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.

@0xmichalis
Copy link
Contributor

0xmichalis commented Apr 25, 2017 via email

@thockin
Copy link
Member

thockin commented Apr 25, 2017 via email

@eparis
Copy link
Contributor

eparis commented Apr 25, 2017

How far back in time do you want to go? older versions of godep could fail on an empty gopath. And you can have a failure when github, or gopkg.in, or other servers go down.

although with modern versions of godep I've never seen it fail on an emtpy gopath...

@cblecker
Copy link
Member

As far as godep versioning goes, the hack/ scripts are currently pinned to v79 so the outputs should be predictable.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 18, 2017
@k8s-github-robot
Copy link

@caesarxuchao PR needs rebase

@k8s-github-robot
Copy link

This PR hasn't been active in 36 days. It will be closed in 53 days (Jul 24, 2017).

cc @caesarxuchao @sttts

You can add 'keep-open' label to prevent this from happening, or add a comment to keep it open another 90 days

@caesarxuchao
Copy link
Member Author

update-staging-client.sh will run much faster after #44784, because it doesn't run godep anymore.

I'll look into optimizing update-staging-godeps.sh later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. 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.

None yet

9 participants