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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1,018 changes: 1,018 additions & 0 deletions contrib/completions/bash/oc

Large diffs are not rendered by default.

216 changes: 216 additions & 0 deletions contrib/completions/bash/openshift

Large diffs are not rendered by default.

1,018 changes: 1,018 additions & 0 deletions contrib/completions/zsh/oc

Large diffs are not rendered by default.

216 changes: 216 additions & 0 deletions contrib/completions/zsh/openshift

Large diffs are not rendered by default.

2,380 changes: 2,380 additions & 0 deletions glide.lock

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
package: github.com/openshift/origin
excludeDirs:
- cmd/cluster-capacity
- cmd/service-catalog
- pkg/build/builder
import:
- package: github.com/coreos/etcd
version: v3.2.8
- package: github.com/gonum/graph
version: bde6d0fbd9dec5a997e906611fe0364001364c41
- package: github.com/google/certificate-transparency
repo: [email protected]:openshift/google-certificate-transparency
version: master
- package: github.com/vishvananda/netlink
version: 933b978eae8c18daa1077a0eb7186b689cd9f82d
- package: github.com/google/cadvisor
repo: [email protected]:openshift/google-cadvisor
version: release-0.27.1
- package: github.com/emicklei/go-restful-swagger12
repo: https://github.com/openshift/emicklei-go-restful-swagger12
version: release-1.0.1
- package: google.golang.org/appengine
Copy link
Contributor

Choose a reason for hiding this comment

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

that are more than I expected. It's the minimal set? Would be great to have a comment with the reason why we chose another version than upstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that are more than I expected. It's the minimal set? Would be great to have a comment with the reason why we chose another version than upstream.

Explanations as a followup as we try to prune. This is the minimal set for now.

version: 12d5545dc1cfa6047a286d5e853841b6471f4c19
- package: github.com/docker/docker
version: 4f3616fb1c112e206b88cb7a9922bf49067a7756
- package: github.com/fsouza/go-dockerclient
version: 3f9370a4738ba8d0ed6eea63582ca6db5eb48032
- package: github.com/cloudflare/cfssl
repo: https://github.com/openshift/cloudflare-cfssl
version: stable-20160905
- package: github.com/skynetservices/skydns
repo: https://github.com/openshift/skynetservices-skydns
version: release-2.5.3a
- package: github.com/onsi/ginkgo
repo: [email protected]:openshift/onsi-ginkgo
version: release-v1.2.0
- package: k8s.io/gengo
repo: [email protected]:openshift/kubernetes-gengo
version: openshift-3.8
- package: k8s.io/kube-openapi
version: 868f2f29720b192240e18284659231b440f9cda5
- package: k8s.io/code-generator
repo: [email protected]:openshift/kubernetes-code-generator
version: release-1.8.1
- package: k8s.io/apimachinery
repo: [email protected]:openshift/kubernetes-apimachinery
version: release-1.8.1
- package: k8s.io/api
repo: [email protected]:openshift/kubernetes-api
version: release-1.8.1
- package: k8s.io/client-go
repo: [email protected]:openshift/kubernetes-client-go
version: release-1.8.1
- package: k8s.io/metrics
repo: [email protected]:openshift/kubernetes-metrics
version: release-1.8.1
- package: k8s.io/apiserver
repo: [email protected]:openshift/kubernetes-apiserver
version: release-1.8.1
- package: k8s.io/kube-aggregator
repo: [email protected]:openshift/kube-aggregator
version: release-1.8.1
- package: k8s.io/apiextensions-apiserver
repo: [email protected]:openshift/kubernetes-apiextensions-apiserver
version: release-1.8.1
- 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.

- package: github.com/kubernetes-incubator/cri-o
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.

- package: github.com/vjeantet/ldapserver
version: v1.0
85 changes: 0 additions & 85 deletions hack/godep-restore.sh

This file was deleted.

173 changes: 0 additions & 173 deletions hack/godep-save.sh

This file was deleted.

2 changes: 2 additions & 0 deletions hack/lib/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ function os::util::list_test_packages_under() {
# we need to find all of the kubernetes test suites, excluding those we directly whitelisted before, the end-to-end suite, and
# the go2idl tests which we currently do not support
# etcd3 isn't supported yet and that test flakes upstream
# cmd wasn't done before using glide and constantly flakes
find -L vendor/k8s.io/{apimachinery,apiserver,client-go,kube-aggregator,kubernetes} -not \( \
\( \
-path "${kubernetes_path}/staging" \
-o -path "${kubernetes_path}/cmd" \
-o -path "${kubernetes_path}/test" \
-o -path "${kubernetes_path}/cmd/libs/go2idl/client-gen/testoutput/testgroup/unversioned" \
-o -path "${kubernetes_path}/pkg/storage/etcd3" \
Expand Down
42 changes: 42 additions & 0 deletions hack/update-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

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

# fail early if any of the staging dirs is checked out
for pkg in "$GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/"*; do
dir=$(basename $pkg)
if [ -d "$GOPATH/src/k8s.io/$dir" ]; then
echo "Conflicting $GOPATH/src/k8s.io/$dir found. Please remove from GOPATH." 1>&2
exit 1
fi
done

# 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

# "github.com/elazarl/goproxy"
# "github.com/golang/mock/gomock"
# "github.com/containernetworking/cni/plugins/ipam/host-local"
# "github.com/containernetworking/cni/plugins/main/loopback"
# "k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo"
# "k8s.io/code-generator/cmd/client-gen"
# "k8s.io/kubernetes/pkg/api/testing/compat"
# "k8s.io/kubernetes/test/e2e/generated"
# "github.com/onsi/ginkgo/ginkgo"
# "github.com/jteeuwen/go-bindata/go-bindata"
#)

glide update --strip-vendor

# recreate symlinks after vendoring
for pkg in vendor/k8s.io/kubernetes/staging/src/k8s.io/*; do
dir=$(basename $pkg)
rm -rf 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.

can you add a cd "${BASH_SOURCE}/.." at the top? Otherwise this relative rm -rf is concerning.

Copy link
Contributor

Choose a reason for hiding this comment

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

And as we only delete symlinks, a simple rm -f (or even rm?) should be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And as we only delete symlinks, a simple rm -f (or even rm?) should be enough.

It's for deleting the directories if they exist from a bad run previously. I had some when I ran.

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

done
Loading