golang / dep

Go dependency management tool experiment (deprecated)
https://golang.github.io/dep/
BSD 3-Clause "New" or "Revised" License
12.85k stars 1.05k forks source link

grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to export k8s.io/apiserver: unable to update repository: From https://github.com/kubernetes/apiserver #2107

Closed filmil closed 4 years ago

filmil commented 5 years ago

What version of dep are you using (dep version)?

╰─>$ dep version
dep:
 version     : v0.5.0
 build date  : 2018-07-26
 git hash    : 224a564
 go version  : go1.10.3
 go compiler : gc
 platform    : linux/amd64
 features    : ImportDuringSolve=false

What dep command did you run?

dep ensure -v

(after having removed the vendor/ directory completely, because if I don't I get a different error simllar to issue #1439)

What did you expect to see?

dep ensure -v succeeds.

What did you see instead?

╰─>$ dep ensure -v
(1/91) Wrote github.com/davecgh/go-spew@v1.1.1
(2/91) Wrote github.com/beorn7/perks@master
(3/91) Wrote github.com/coreos/etcd@v3.3.11
(4/91) Wrote github.com/emicklei/go-restful@v2.8.1
(5/91) Wrote github.com/appscode/jsonpatch@1.0.0
(6/91) Wrote github.com/gobuffalo/envy@v1.6.13
(7/91) Wrote github.com/go-logr/zapr@v0.1.0
(8/91) Wrote github.com/google/gofuzz@master
(9/91) Wrote github.com/opencontainers/go-digest@v1.0.0-rc1
(10/91) Wrote github.com/blang/semver@v3.5.1
(11/91) Wrote github.com/coreos/go-semver@v0.2.0
(12/91) Wrote google.golang.org/appengine@v1.4.0
(13/91) Wrote github.com/docker/distribution@v2.7.1
(14/91) Wrote sigs.k8s.io/yaml@v1.1.0
(15/91) Wrote github.com/go-logr/logr@master
(16/91) Wrote github.com/pborman/uuid@v1.2
(17/91) Wrote github.com/google/uuid@v1.1.0
(18/91) Wrote github.com/googleapis/gnostic@v0.2.0
(19/91) Wrote github.com/GoogleCloudPlatform/k8s-cluster-bundle@v0.4.0
(20/91) Wrote github.com/ghodss/yaml@v1.0.0
(21/91) Wrote k8s.io/code-generator@master
(22/91) Wrote github.com/coreos/bbolt@v1.3.2
(23/91) Wrote cloud.google.com/go@v0.36.0
(24/91) Wrote github.com/dgrijalva/jwt-go@v3.2.0
(25/91) Wrote github.com/golang/glog@master
(26/91) Wrote k8s.io/api@kubernetes-1.13.1
(27/91) Wrote github.com/coreos/go-systemd@v18
(28/91) Wrote github.com/gregjones/httpcache@master
(29/91) Wrote github.com/coreos/pkg@v4
(30/91) Wrote google.golang.org/genproto@master
(31/91) Wrote google.golang.org/grpc@v1.18.0
(32/91) Wrote github.com/gogo/protobuf@v1.2.0
(33/91) Wrote github.com/modern-go/reflect2@1.0.1
(34/91) Wrote sigs.k8s.io/controller-runtime@v0.1.10
(35/91) Wrote golang.org/x/tools@master
(36/91) Wrote github.com/petar/GoLLRB@master
(37/91) Wrote github.com/matttproud/golang_protobuf_extensions@v1.0.1
(38/91) Wrote github.com/json-iterator/go@v1.1.5
(39/91) Wrote github.com/peterbourgon/diskv@v2.0.1
(40/91) Wrote github.com/hashicorp/golang-lru@v0.5.0
(41/91) Wrote gopkg.in/inf.v0@v0.9.1
(42/91) Wrote k8s.io/apimachinery@kubernetes-1.13.1
(43/91) Wrote k8s.io/client-go@kubernetes-1.13.1
(44/91) Wrote sigs.k8s.io/testing_frameworks@v0.1.1
(45/91) Wrote k8s.io/utils@master
(46/91) Wrote k8s.io/apiextensions-apiserver@kubernetes-1.13.1
(47/91) Wrote gopkg.in/fsnotify.v1 (from https://github.com/fsnotify/fsnotify.git)@v1.4.7
(48/91) Wrote github.com/modern-go/concurrent@1.0.3
(49/91) Wrote github.com/google/btree@master
(50/91) Wrote sigs.k8s.io/controller-tools@v0.1.9
(51/91) Wrote github.com/pkg/errors@v0.8.1
(52/91) Wrote github.com/google/go-cmp@v0.2.0
(53/91) Wrote github.com/markbates/inflect@v1.0.4
(54/91) Wrote k8s.io/kube-openapi@master
(55/91) Wrote github.com/jinzhu/copier@master
(56/91) Wrote github.com/onsi/gomega@v1.4.3
(57/91) Wrote github.com/xiang90/probing@0.0.2
(58/91) Failed to write k8s.io/apiserver@master
(59/91) Failed to write k8s.io/klog@v0.1.0
(60/91) Failed to write k8s.io/kubernetes@v1.13.3
(61/91) Failed to write sigs.k8s.io/cluster-api@0.0.0-alpha.4
(62/91) Failed to write github.com/prometheus/client_golang@v0.9.2
(63/91) Failed to write github.com/kubernetes-sigs/application@51c1b68e024fd1ddad509060d80e52935cfb19a2
(64/91) Failed to write k8s.io/gengo@master
(65/91) Failed to write go.uber.org/atomic@v1.3.2
(66/91) Failed to write gopkg.in/tomb.v1@v1
(67/91) Failed to write github.com/golang/protobuf@v1.2.0
(68/91) Failed to write gopkg.in/yaml.v2@v2.2.2
(69/91) Failed to write golang.org/x/sys@master
(70/91) Failed to write golang.org/x/net@master
(71/91) Failed to write golang.org/x/crypto@master
(72/91) Failed to write github.com/hpcloud/tail@v1.0.0
(73/91) Failed to write github.com/onsi/ginkgo@v1.7.0
(74/91) Failed to write go.uber.org/zap@v1.9.1
grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to export k8s.io/apiserver: unable to update repository: From https://github.com/kubernetes/apiserver
 ! [rejected]          kubernetes-1.12.0        -> kubernetes-1.12.0  (would clobber existing tag)
 ! [rejected]          kubernetes-1.12.0-beta.2 -> kubernetes-1.12.0-beta.2  (would clobber existing tag)
 ! [rejected]          kubernetes-1.12.0-rc.1   -> kubernetes-1.12.0-rc.1  (would clobber existing tag)
 ! [rejected]          kubernetes-1.12.0-rc.2   -> kubernetes-1.12.0-rc.2  (would clobber existing tag)
 ! [rejected]          kubernetes-1.12.1-beta.0 -> kubernetes-1.12.1-beta.0  (would clobber existing tag)
: command failed: [git fetch --tags --prune origin]: exit status 1
kevinburke commented 5 years ago

Can you post your Gopkg.toml file or the repository you're attempting to use?

It seems like the Kubernetes download already has Git tags, and now the remote is saying there are new tags, and we don't handle that situation well. You could try pointing at a revision, or clobbering the cached version of Kubernetes, which should be somewhere in $GOPATH/pkg/dep.

filmil commented 5 years ago

Sadly, no, I can not disclose the Gopkg.toml. SRY.

Given the information you requested, I suppose that some of the prior errors (like issue #1439) may have left the cached repos in $GOPATH/pkg/dep/sources a state where tags were already downloaded.

While it's a far cry from a resolution, I think it would help tremendously if the error message also disclosed the local filesystem path to the failing repository. Otherwise, without knowing the internals of dep, I will as user have no clue to which repo is failing.

kevinburke commented 5 years ago

So basically "unable to update repository" should be replaced with an error message that points to where it exists on disk?

filmil commented 5 years ago

I totally wouldn't mind having that extra bit of information there!

shakeelmohamed commented 5 years ago

Just ran into a similar issue, deleting $GOPATH/pkg/dep/sources solved it for me.

Fatahir commented 4 years ago

i am also facing this issue, grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to export google.golang.org/genproto: searched a lot about this, almost everyone says delete vendor directory or source directory. I am facing this error while running Dockerfile. Dont know how to delete it from docker containers.

mvdan commented 4 years ago

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!