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

switch to glide #17391

Merged
merged 8 commits into from
Nov 22, 2017
Merged

switch to glide #17391

merged 8 commits into from
Nov 22, 2017

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Nov 20, 2017

No description provided.

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 20, 2017
@openshift-merge-robot openshift-merge-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. vendor-update Touching vendor dir or related files labels Nov 20, 2017
@deads2k deads2k changed the title [wip] switch to glide switch to glide Nov 20, 2017
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 20, 2017
@deads2k deads2k force-pushed the glide-01 branch 2 times, most recently from ef18ff0 to 0e3c8e2 Compare November 20, 2017 21:57
@deads2k
Copy link
Contributor Author

deads2k commented Nov 20, 2017

@liggitt alright, this builds locally for me and it creates symlinks for the staging folders when you do hack/update-deps.sh

@liggitt
Copy link
Contributor

liggitt commented Nov 21, 2017

it creates symlinks for the staging folders when you do hack/update-deps.sh

running that left a diff in my working dir... that expected?

$ git diff --numstat
4       2       glide.lock
0       2       vendor/github.com/getsentry/raven-go/docs/_sentryext/.gitignore
0       13      vendor/github.com/getsentry/raven-go/docs/_sentryext/README.rst
0       708     vendor/github.com/getsentry/raven-go/docs/_sentryext/sentryext.py
0       113     vendor/github.com/getsentry/raven-go/docs/_sentryext/verify-docs.py
14      8       vendor/google.golang.org/appengine/.travis.yml
26      26      vendor/google.golang.org/appengine/README.md
4       0       vendor/google.golang.org/appengine/aetest/instance.go
3       0       vendor/google.golang.org/appengine/aetest/instance_test.go
23      17      vendor/google.golang.org/appengine/aetest/instance_vm.go
37      0       vendor/google.golang.org/appengine/appengine.go
1       37      vendor/google.golang.org/appengine/appengine_vm.go
1       1       vendor/google.golang.org/appengine/capability/capability.go
4       0       vendor/google.golang.org/appengine/channel/channel.go
1       1       vendor/google.golang.org/appengine/cloudsql/cloudsql.go
1       1       vendor/google.golang.org/appengine/cloudsql/cloudsql_vm.go
2       2       vendor/google.golang.org/appengine/cmd/aebundler/aebundler.go
24      216     vendor/google.golang.org/appengine/cmd/aedeploy/aedeploy.go
3       2       vendor/google.golang.org/appengine/datastore/datastore.go
277     32      vendor/google.golang.org/appengine/datastore/datastore_test.go
26      16      vendor/google.golang.org/appengine/datastore/doc.go
135     40      vendor/google.golang.org/appengine/datastore/load.go
4       5       vendor/google.golang.org/appengine/datastore/metadata.go
81      45      vendor/google.golang.org/appengine/datastore/prop.go
99      156     vendor/google.golang.org/appengine/datastore/prop_test.go
11      0       vendor/google.golang.org/appengine/datastore/query.go
46      19      vendor/google.golang.org/appengine/datastore/save.go
25      5       vendor/google.golang.org/appengine/delay/delay.go
106     0       vendor/google.golang.org/appengine/delay/delay_test.go
1       1       vendor/google.golang.org/appengine/demos/guestbook/app.yaml
1       1       vendor/google.golang.org/appengine/demos/guestbook/guestbook.go
1       1       vendor/google.golang.org/appengine/demos/helloworld/helloworld.go
2       1       vendor/google.golang.org/appengine/internal/aetesting/fake.go
46      9       vendor/google.golang.org/appengine/internal/api.go
35      3       vendor/google.golang.org/appengine/internal/api_classic.go
35      13      vendor/google.golang.org/appengine/internal/api_common.go
24      25      vendor/google.golang.org/appengine/internal/api_test.go
39      9       vendor/google.golang.org/appengine/internal/identity_classic.go
5       1       vendor/google.golang.org/appengine/internal/identity_vm.go
0       34      vendor/google.golang.org/appengine/internal/internal.go
0       58      vendor/google.golang.org/appengine/internal/internal_test.go
580     219     vendor/google.golang.org/appengine/internal/search/search.pb.go
6       0       vendor/google.golang.org/appengine/internal/search/search.proto
2       2       vendor/google.golang.org/appengine/log/log.go
1       1       vendor/google.golang.org/appengine/mail/mail.go
19      15      vendor/google.golang.org/appengine/memcache/memcache_test.go
0       52      vendor/google.golang.org/appengine/namespace_test.go
40      20      vendor/google.golang.org/appengine/remote_api/client.go
19      0       vendor/google.golang.org/appengine/remote_api/client_test.go
1       1       vendor/google.golang.org/appengine/remote_api/remote_api.go
2       2       vendor/google.golang.org/appengine/runtime/runtime.go
8       4       vendor/google.golang.org/appengine/search/doc.go
108     28      vendor/google.golang.org/appengine/search/search.go
378     14      vendor/google.golang.org/appengine/search/search_test.go
12      6       vendor/google.golang.org/appengine/search/struct.go
43      2       vendor/google.golang.org/appengine/search/struct_test.go
1       1       vendor/google.golang.org/appengine/socket/doc.go
2       2       vendor/google.golang.org/appengine/socket/socket_vm.go
45      0       vendor/google.golang.org/appengine/taskqueue/taskqueue.go
57      0       vendor/google.golang.org/appengine/taskqueue/taskqueue_test.go
11      2       vendor/google.golang.org/appengine/user/user_classic.go

for pkg in vendor/k8s.io/kubernetes/staging/src/k8s.io/*; do
dir=$(basename $pkg)
unlink vendor/k8s.io/$dir || true
rm -rf vendor/k8s.io/$dir || true
Copy link
Contributor

Choose a reason for hiding this comment

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

@deads2k will this leave the deps broken when the glide below fails?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@deads2k will this leave the deps broken when the glide below fails?

Yeah. We'll call that something to iterate on.

- package: k8s.io/kubernetes
repo: [email protected]:openshift/kubernetes
version: release-1.8.1
# only used by pkg/build/builder
Copy link
Contributor

Choose a reason for hiding this comment

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

i thought pkg/build/builder is excluded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i thought pkg/build/builder is excluded?

they have an incomplete vendor folder. Go them. Another thing to fix up post-this.

version: a8ee86b1cce0c13bd541a99140682a92635ba9f7
- package: github.com/containers/image
repo: [email protected]:openshift/containers-image
version: openshift-3.8
Copy link
Contributor

Choose a reason for hiding this comment

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

so does this mean that if I want to bump this I will have to bump the fork branch and then re-run update-deps ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so does this mean that if I want to bump this I will have to bump the fork branch and then re-run update-deps ?

Yeah. Or you can find the person who made that ridiculous carry and make them fix it.

@mfojtik
Copy link
Contributor

mfojtik commented Nov 21, 2017

I ended up with same diff as @liggitt but it seems like a progress! :)

UPDATE: The diff is not the same, I don't see changes in vendor/github.com/getsentry/raven-go just the appengine.

@mfojtik
Copy link
Contributor

mfojtik commented Nov 21, 2017

@deads2k @liggitt this fixed the appengine diff: deads2k@e9ee6ff


source "$(dirname "${BASH_SOURCE}")/lib/init.sh"

# fail early if any of the staging dirs is checked out
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we care about this in update script?

Copy link
Contributor

Choose a reason for hiding this comment

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

symlinks

Copy link
Contributor

Choose a reason for hiding this comment

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

how is GOPATH relevant to symlinks which are in vendor folder? vendor takes precedence

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how is GOPATH relevant to symlinks which are in vendor folder? vendor takes precedence

We symlink into vendor. This is pre-existing and it looks correct to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

to me it seems unrelated to the task. If the bellow lines are not affected by stuff present in GOPATH why does it check for whats there? If this is preexisting, that's likely because of Godeps specifics when it worked with your GOPATH. Can't see any relations to glide.

Copy link
Contributor

Choose a reason for hiding this comment

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

We used to have hard to debug re-vendoring errors where the GOPATH version was picked up and the result differed depending on the developer's GOPATH. This was added as a sanity check to avoid this situation.

# "github.com/jteeuwen/go-bindata/go-bindata"
#)

# remove symlinks for glide update
Copy link
Contributor

Choose a reason for hiding this comment

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

glide switches vendor/ and tmp/vendor/ as far as I recall so this shouldn't be needed or am I wrong?

dir=$(basename $pkg)
rm -rf vendor/k8s.io/$dir
ln -s kubernetes/staging/src/k8s.io/$dir vendor/k8s.io/$dir
done
Copy link
Contributor

Choose a reason for hiding this comment

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

\n

for pkg in vendor/k8s.io/kubernetes/staging/src/k8s.io/*; do
dir=$(basename $pkg)
rm -rf vendor/k8s.io/$dir
ln -s kubernetes/staging/src/k8s.io/$dir vendor/k8s.io/$dir
Copy link
Contributor

Choose a reason for hiding this comment

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

I think ln can do this in one step, it was something like ln -sfn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think ln can do this in one step, it was something like ln -sfn

tried, does not work

repo: [email protected]:openshift/containers-image
version: openshift-3.8
- package: github.com/vjeantet/ldapserver
version: v1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

\n

@tnozicka
Copy link
Contributor

+100 for switching to glide.

Since I have been there I don't think the symlinking can ever work properly. The issue is that glide has to resolve all the dependencies in glide update step and if there are some files missing, it fails. So you need have the publishing repository updated first. Putting your faith into probability you could hope that the changes were so small and not changing dependency resolution that you will be fine but even a simple file addition/move/backport in upstream will cause it to fail. But since that establishes the need for the repository being published upfront you can include that repository directly and there is no point for symlinking.

The appropriate staging repo commits for kubernetes commit f6401 can be found by

REPO=client-go && \
git --git-dir=${GOPATH}/src/k8s.io/${REPO}/.git --work-tree=${GOPATH}/src/k8s.io/${REPO} log --all --follow -- kubernetes-sha | grep -B4 f6401

@soltysh
Copy link
Contributor

soltysh commented Nov 21, 2017

The only worrying thing for me is the huge diff here, but I assume it's godep vs glide thing, I'll be looking more into it after tomorrow.

@mfojtik
Copy link
Contributor

mfojtik commented Nov 21, 2017

@soltysh the diff is due to appengine version in pkg/build/builder I have commit that pin the version to the sha256 used in our level, so we should be fine?

@deads2k
Copy link
Contributor Author

deads2k commented Nov 21, 2017

running that left a diff in my working dir... that expected?

Actually yes. I didn't explicitly pin levels. We'll have to decide whether we're really going to pin everything, whether we'll try to find branches, whether we'll try to match kube (which I think happens by inspection of their godep.json), or whether we'll try to stay current when possible.

Pinning levels is heavy, but possible if we want to. I did go ahead and pin that one.

@deads2k deads2k force-pushed the glide-01 branch 3 times, most recently from 5d1f6de to 386e904 Compare November 21, 2017 18:50
@deads2k
Copy link
Contributor Author

deads2k commented Nov 21, 2017

@liggitt @mfojtik alright, see if you can live with what I've done. I disabled some tests we weren't running before, removed the oadm completions a bit early (they looked like the only ones that were broken), and updated some openapi generation excludes.

@deads2k deads2k force-pushed the glide-01 branch 2 times, most recently from 33dccde to 02dcece Compare November 21, 2017 20:41
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, mfojtik

The full list of commands accepted by this bot can be found here.

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

# Some things we want in godeps aren't code dependencies, so ./...
# won't pick them up.
# TODO seems like this should be failing something somewhere
#REQUIRED_BINS=(
Copy link
Contributor

Choose a reason for hiding this comment

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

rm -rf vendor/k8s.io/code-generator &&
git clone --branch master [email protected]:kubernetes/code-generator.git vendor/k8s.io/code-generator &&
pushd vendor/k8s.io/code-generator &>/dev/null &&
git checkout <SHA> &&
rm -rf .git &&
popd >/dev/null

@deads2k deads2k added lgtm Indicates that a PR is ready to be merged. queue/multiple-rebases and removed lgtm Indicates that a PR is ready to be merged. labels Nov 22, 2017
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2017
@deads2k deads2k added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Nov 22, 2017
@@ -152,7 +152,7 @@ func TestCRDShadowGroup(t *testing.T) {
}
}

func TestCRD(t *testing.T) {
func ETestCRD(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

?

Disables a test (when I thought I had one to two) without making a large diff to deal with. I think its a lack of entropy creating new certs problem.

@deads2k deads2k added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Nov 22, 2017
@deads2k
Copy link
Contributor Author

deads2k commented Nov 22, 2017

/retest

1 similar comment
@deads2k
Copy link
Contributor Author

deads2k commented Nov 22, 2017

/retest

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit ef87687 into openshift:master Nov 22, 2017
@openshift-ci-robot
Copy link

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

Test name Commit Details Rerun command
ci/openshift-jenkins/extended_conformance_install_update 9fa7abd link /test extended_conformance_install_update

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.

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. lgtm Indicates that a PR is ready to be merged. queue/multiple-rebases size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. vendor-update Touching vendor dir or related files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants