Masterminds / glide

Package Management for Golang
https://glide.sh
Other
8.15k stars 540 forks source link

"no such file or directory" on cache directory #791

Open atombender opened 7 years ago

atombender commented 7 years ago

We're experiencing a complete Glide meltdown. We have not made any changes to our glide.yaml or glide.lock, and every single package is pinned to a specific commit. Glide is randomly failing with all sorts of weird errors.

Occasionally we can get glide install to run to completion without errors, but at that point it's lacking a bunch of packages, so builds fail.

Here's what I get if I attempt a complete reset:

$ /bin/rm -rf vendor/* ~/.glide/* glide.lock && glide install 
[INFO]  Lock file (glide.lock) does not exist. Performing update.
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Fetching github.com/pborman/uuid.
[INFO]  --> Fetching github.com/jackc/pgx.
[INFO]  --> Fetching github.com/rs/xmux.
[INFO]  --> Fetching github.com/dgrijalva/jwt-go.
[INFO]  --> Fetching github.com/stretchr/testify.
[INFO]  --> Fetching github.com/jmcvetta/randutil.
[INFO]  --> Fetching github.com/nats-io/nats.
[INFO]  --> Fetching github.com/gorilla/mux.
[INFO]  --> Fetching github.com/vektra/mockery.
[INFO]  --> Fetching github.com/nats-io/gnatsd.
[INFO]  --> Fetching gopkg.in/readline.v1.
[INFO]  --> Fetching github.com/Masterminds/squirrel.
[INFO]  --> Fetching github.com/nats-io/nuid.
[INFO]  --> Fetching golang.org/x/net.
[INFO]  --> Fetching github.com/pkg/errors.
[INFO]  --> Fetching github.com/op/go-logging.
[INFO]  --> Fetching github.com/rs/cors.
[INFO]  --> Fetching github.com/rs/xhandler.
[INFO]  --> Fetching gopkg.in/olivere/elastic.v5.
[INFO]  --> Fetching github.com/cenk/backoff.
[INFO]  --> Fetching github.com/olekukonko/tablewriter.
[INFO]  --> Fetching github.com/kpawlik/geojson.
[INFO]  --> Fetching github.com/mohae/deepcopy.
[INFO]  --> Fetching google.golang.org/grpc.
[INFO]  --> Fetching github.com/davecgh/go-spew.
[INFO]  --> Fetching github.com/golang/protobuf.
[INFO]  --> Fetching github.com/gogo/protobuf.
[INFO]  --> Fetching github.com/jessevdk/go-flags.
[INFO]  --> Fetching gopkg.in/yaml.v2.
[INFO]  --> Fetching github.com/prometheus/client_golang.
[INFO]  --> Fetching github.com/atombender/xprometheus.
[INFO]  --> Fetching github.com/sergi/go-diff.
[INFO]  --> Fetching github.com/tylerb/graceful.
[INFO]  --> Fetching golang.org/x/sync.
[INFO]  --> Setting version for github.com/jackc/pgx to 8c76baabbd6d3a2c03dc2791a05e04a9465a0cc3.
[INFO]  --> Setting version for github.com/pborman/uuid to c55201b036063326c5b1b89ccfe45a184973d073.
[INFO]  --> Setting version for github.com/nats-io/nuid to a5152d67cf63cbfb5d992a395458722a45194715.
[INFO]  --> Setting version for github.com/Masterminds/squirrel to e21b13aa472ea70fe2e8172d668d1fee4028d2fd.
[INFO]  --> Setting version for github.com/rs/xhandler to ed27b6fd65218132ee50cd95f38474a3d8a2cd12.
[INFO]  --> Setting version for github.com/vektra/mockery to 47a058062601e235731714f89d7ec95c1ec47a5e.
[INFO]  --> Setting version for github.com/rs/xmux to 447ce20d8516cc0d2564fc3de70b5d078e0b816e.
[INFO]  --> Setting version for github.com/jmcvetta/randutil to 2bb1b664bcff821e02b2a0644cd29c7e824d54f8.
[INFO]  --> Setting version for github.com/stretchr/testify to 18a02ba4a312f95da08ff4cfc0055750ce50ae9e.
[INFO]  --> Setting version for github.com/rs/cors to 3ca2b550f6a4333b63c845850f760a7d00412cd6.
[INFO]  --> Detected semantic version. Setting version for github.com/dgrijalva/jwt-go to v2.6.0.
[INFO]  --> Setting version for github.com/mohae/deepcopy to d5a94469974f7ae1fe06ca82aa38d2ef3170e38d.
[INFO]  --> Setting version for github.com/golang/protobuf to 98fa357170587e470c5f27d3c3ea0947b71eb455.
[INFO]  --> Detected semantic version. Setting version for github.com/cenk/backoff to v1.0.0.
[INFO]  --> Detected semantic version. Setting version for github.com/nats-io/nats to v1.2.0.
[INFO]  --> Detected semantic version. Setting version for github.com/pkg/errors to v0.5.1.
[INFO]  --> Setting version for github.com/op/go-logging to 970db520ece77730c7e4724c61121037378659d9.
[INFO]  --> Setting version for github.com/kpawlik/geojson to 06aeea8c5561aef0aee9ec036a1fd3fb55aea653.
[INFO]  --> Setting version for github.com/gogo/protobuf to 50d1bd39ce4e7a96b75e3e040be9caf79dbb4c61.
[INFO]  --> Detected semantic version. Setting version for github.com/gorilla/mux to v1.1.
[INFO]  --> Setting version for github.com/jessevdk/go-flags to 4cc2832a6e6d1d3b815e2b9d544b2a4dfb3ce8fa.
[INFO]  --> Setting version for github.com/sergi/go-diff to 552b4e9bbdca9e5adafd95ee98c822fdd11b330b.
[INFO]  --> Setting version for golang.org/x/net to 8b4af36cd21a1f85a7484b49feb7c79363106d8e.
[INFO]  --> Detected semantic version. Setting version for github.com/prometheus/client_golang to v0.8.0.
[INFO]  --> Setting version for github.com/olekukonko/tablewriter to bdcc175572fd7abece6c831e643891b9331bc9e7.
[INFO]  --> Detected semantic version. Setting version for github.com/nats-io/gnatsd to v0.8.0.
[INFO]  --> Detected semantic version. Setting version for github.com/tylerb/graceful to v1.2.15.
[INFO]  --> Detected semantic version. Setting version for github.com/atombender/xprometheus to v0.0.5.
[INFO]  --> Setting version for google.golang.org/grpc to b7f1379d3cbbbeb2ca3405852012e237aa05459e.
[INFO]  --> Detected semantic version. Setting version for github.com/davecgh/go-spew to v1.1.0.
[INFO]  --> Detected semantic version. Setting version for gopkg.in/readline.v1 to v1.2.
[INFO]  --> Setting version for gopkg.in/yaml.v2 to a5b47d31c556af34a302ce5d659e6fea44d90de0.
[INFO]  --> Detected semantic version. Setting version for gopkg.in/olivere/elastic.v5 to v5.0.30.
[INFO]  Resolving imports
[INFO]  --> Fetching golang.org/x/tools.
[WARN]  Unable to set version on golang.org/x/tools/go/ast/astutil to . Err: Unable to retrieve checked out version
[INFO]  --> Fetching google.golang.org/appengine.
[INFO]  --> Fetching github.com/vektra/errors.
[INFO]  --> Fetching golang.org/x/crypto.
[WARN]  Unable to checkout golang.org/x/crypto
[ERROR] Error looking for golang.org/x/crypto/acme/autocert: https://golang.org/x/crypto Not Found
[WARN]  Unable to set version on golang.org/x/crypto to . Err: Unable to retrieve checked out version
[ERROR] Error scanning golang.org/x/tools/go/ast/astutil: open /Users/alex/.glide/cache/src/https-golang.org-x-tools-go-ast-astutil: no such file or directory
[ERROR] This error means the referenced package was not found.
[ERROR] Missing file or directory errors usually occur when multiple packages
[ERROR] share a common dependency and the first reference encountered by the scanner
[ERROR] sets the version to one that does not contain a subpackage needed required
[ERROR] by another package that uses the shared dependency. Try setting a
[ERROR] version in your glide.yaml that works for all packages that share this
[ERROR] dependency.
[INFO]  --> Fetching github.com/mattn/go-runewidth.
[INFO]  --> Fetching github.com/chzyer/readline.
[INFO]  Found Godeps.json file in /Users/alex/.glide/cache/src/https-github.com-stretchr-testify
[INFO]  --> Parsing Godeps metadata...
[WARN]  Conflict: github.com/davecgh/go-spew version is ~1.1.0, but also asked for 04cdfd42973bb9c8589fd6a731800cf222fde1a9
[INFO]  github.com/davecgh/go-spew reference 04cdfd42973bb9c8589fd6a731800cf222fde1a9:
[INFO] - author: Alexander Staubo <alex@purefiction.net>
[INFO] - commit date: Fri, 28 Oct 2016 13:58:48 -0400
[INFO] - subject (first line): Adds new config options:
[INFO]  Keeping github.com/davecgh/go-spew ~1.1.0
[INFO]  --> Fetching github.com/pmezard/go-difflib.
[INFO]  --> Setting version for github.com/pmezard/go-difflib to d8ed2627bdf02c080bf22230dbb337003b7aba2d.
[INFO]  --> Fetching github.com/stretchr/objx.
[INFO]  --> Setting version for github.com/stretchr/objx to cbeaeb16a013161a98496fad62933b1d21786672.
[INFO]  --> Fetching github.com/lann/builder.
[INFO]  --> Fetching github.com/prometheus/common.
[ERROR] Error scanning github.com/vektra/mockery/mockery/fixtures/http: open /Users/alex/.glide/cache/src/https-github.com-vektra-mockery/mockery/fixtures/http: no such file or directory
[ERROR] This error means the referenced package was not found.
[ERROR] Missing file or directory errors usually occur when multiple packages
[ERROR] share a common dependency and the first reference encountered by the scanner
[ERROR] sets the version to one that does not contain a subpackage needed required
[ERROR] by another package that uses the shared dependency. Try setting a
[ERROR] version in your glide.yaml that works for all packages that share this
[ERROR] dependency.
[ERROR] Error scanning github.com/vektra/mockery/mockery/fixtures/test: open /Users/alex/.glide/cache/src/https-github.com-vektra-mockery/mockery/fixtures/test: no such file or directory
[ERROR] This error means the referenced package was not found.
[ERROR] Missing file or directory errors usually occur when multiple packages
[ERROR] share a common dependency and the first reference encountered by the scanner
[ERROR] sets the version to one that does not contain a subpackage needed required
[ERROR] by another package that uses the shared dependency. Try setting a
[ERROR] version in your glide.yaml that works for all packages that share this
[ERROR] dependency.
[ERROR] Error scanning golang.org/x/tools/benchmark/parse: open /Users/alex/.glide/cache/src/https-golang.org-x-tools-benchmark-parse: no such file or directory
[ERROR] This error means the referenced package was not found.
[ERROR] Missing file or directory errors usually occur when multiple packages
[ERROR] share a common dependency and the first reference encountered by the scanner
[ERROR] sets the version to one that does not contain a subpackage needed required
[ERROR] by another package that uses the shared dependency. Try setting a
[ERROR] version in your glide.yaml that works for all packages that share this
[ERROR] dependency.
[ERROR] Error scanning golang.org/x/crypto/ssh/terminal: open /Users/alex/.glide/cache/src/https-golang.org-x-crypto/ssh/terminal: no such file or directory
[ERROR] This error means the referenced package was not found.
[ERROR] Missing file or directory errors usually occur when multiple packages
[ERROR] share a common dependency and the first reference encountered by the scanner
[ERROR] sets the version to one that does not contain a subpackage needed required
[ERROR] by another package that uses the shared dependency. Try setting a
[ERROR] version in your glide.yaml that works for all packages that share this
[ERROR] dependency.
[INFO]  --> Fetching github.com/lann/ps.
[INFO]  Found GB manifest file in /Users/alex/.glide/cache/src/https-github.com-nats-io-gnatsd
[INFO]  --> Parsing GB metadata...
[INFO]  --> Fetching github.com/beorn7/perks.
[INFO]  --> Fetching github.com/prometheus/client_model.
[INFO]  --> Fetching github.com/prometheus/procfs.
[INFO]  --> Fetching github.com/matttproud/golang_protobuf_extensions.
[WARN]  Unable to set version on golang.org/x/crypto to 9e7f5dc375abeb9619ea3c5c58502c428f457aa2. Err: open /Users/alex/.glide/cache/src/https-golang.org-x-crypto: no such file or directory
[ERROR] Error scanning golang.org/x/crypto/bcrypt: open /Users/alex/.glide/cache/src/https-golang.org-x-crypto/bcrypt: no such file or directory
[ERROR] This error means the referenced package was not found.
[ERROR] Missing file or directory errors usually occur when multiple packages
[ERROR] share a common dependency and the first reference encountered by the scanner
[ERROR] sets the version to one that does not contain a subpackage needed required
[ERROR] by another package that uses the shared dependency. Try setting a
[ERROR] version in your glide.yaml that works for all packages that share this
[ERROR] dependency.
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports

Verifying that the cache does contain the missing directory:

$ ls -l ~/.glide/cache/src 
total 0
drwxr-xr-x  32 alex staff  1088 Mar 30 15:04 https-github.com-Masterminds-squirrel
drwxr-xr-x   8 alex staff   272 Mar 30 15:04 https-github.com-atombender-xprometheus
drwxr-xr-x   9 alex staff   306 Mar 30 15:05 https-github.com-beorn7-perks
drwxr-xr-x  16 alex staff   544 Mar 30 15:04 https-github.com-cenk-backoff
drwxr-xr-x  41 alex staff  1394 Mar 30 15:05 https-github.com-chzyer-readline
drwxr-xr-x  10 alex staff   340 Mar 30 15:04 https-github.com-davecgh-go-spew
drwxr-xr-x  29 alex staff   986 Mar 30 15:04 https-github.com-dgrijalva-jwt-go
drwxr-xr-x  39 alex staff  1326 Mar 30 15:04 https-github.com-gogo-protobuf
drwxr-xr-x  15 alex staff   510 Mar 30 15:04 https-github.com-golang-protobuf
drwxr-xr-x  13 alex staff   442 Mar 30 15:04 https-github.com-gorilla-mux
drwxr-xr-x  42 alex staff  1428 Mar 30 15:04 https-github.com-jackc-pgx
drwxr-xr-x  46 alex staff  1564 Mar 30 15:04 https-github.com-jessevdk-go-flags
drwxr-xr-x   8 alex staff   272 Mar 30 15:04 https-github.com-jmcvetta-randutil
drwxr-xr-x  14 alex staff   476 Mar 30 15:04 https-github.com-kpawlik-geojson
drwxr-xr-x  11 alex staff   374 Mar 30 15:05 https-github.com-lann-builder
drwxr-xr-x  10 alex staff   340 Mar 30 15:05 https-github.com-lann-ps
drwxr-xr-x  11 alex staff   374 Mar 30 15:05 https-github.com-mattn-go-runewidth
drwxr-xr-x  12 alex staff   408 Mar 30 15:05 https-github.com-matttproud-golang_protobuf_extensions
drwxr-xr-x   9 alex staff   306 Mar 30 15:04 https-github.com-mohae-deepcopy
drwxr-xr-x  20 alex staff   680 Mar 30 15:04 https-github.com-nats-io-gnatsd
drwxr-xr-x  19 alex staff   646 Mar 30 15:04 https-github.com-nats-io-nats
drwxr-xr-x  10 alex staff   340 Mar 30 15:04 https-github.com-nats-io-nuid
drwxr-xr-x  15 alex staff   510 Mar 30 15:04 https-github.com-olekukonko-tablewriter
drwxr-xr-x  26 alex staff   884 Mar 30 15:04 https-github.com-op-go-logging
drwxr-xr-x  23 alex staff   782 Mar 30 15:04 https-github.com-pborman-uuid
drwxr-xr-x  10 alex staff   340 Mar 30 15:04 https-github.com-pkg-errors
drwxr-xr-x   7 alex staff   238 Mar 30 15:05 https-github.com-pmezard-go-difflib
drwxr-xr-x  15 alex staff   510 Mar 30 15:04 https-github.com-prometheus-client_golang
drwxr-xr-x  18 alex staff   612 Mar 30 15:05 https-github.com-prometheus-client_model
drwxr-xr-x  16 alex staff   544 Mar 30 15:05 https-github.com-prometheus-common
drwxr-xr-x  33 alex staff  1122 Mar 30 15:05 https-github.com-prometheus-procfs
drwxr-xr-x  12 alex staff   408 Mar 30 15:04 https-github.com-rs-cors
drwxr-xr-x  15 alex staff   510 Mar 30 15:04 https-github.com-rs-xhandler
drwxr-xr-x  18 alex staff   612 Mar 30 15:04 https-github.com-rs-xmux
drwxr-xr-x  11 alex staff   374 Mar 30 15:04 https-github.com-sergi-go-diff
drwxr-xr-x  28 alex staff   952 Mar 30 15:05 https-github.com-stretchr-objx
drwxr-xr-x  18 alex staff   612 Mar 30 15:04 https-github.com-stretchr-testify
drwxr-xr-x  16 alex staff   544 Mar 30 15:04 https-github.com-tylerb-graceful
drwxr-xr-x  17 alex staff   578 Mar 30 15:05 https-github.com-vektra-errors
drwxr-xr-x   8 alex staff   272 Mar 30 15:04 https-github.com-vektra-mockery
drwxr-xr-x  32 alex staff  1088 Mar 30 15:04 https-golang.org-x-net
drwxr-xr-x  14 alex staff   476 Mar 30 15:04 https-golang.org-x-sync
drwxr-xr-x  24 alex staff   816 Mar 30 15:05 https-golang.org-x-tools
drwxr-xr-x  39 alex staff  1326 Mar 30 15:05 https-google.golang.org-appengine
drwxr-xr-x  45 alex staff  1530 Mar 30 15:04 https-google.golang.org-grpc
drwxr-xr-x 361 alex staff 12274 Mar 30 15:05 https-gopkg.in-olivere-elastic.v5
drwxr-xr-x  33 alex staff  1122 Mar 30 15:04 https-gopkg.in-readline.v1
drwxr-xr-x  23 alex staff   782 Mar 30 15:05 https-gopkg.in-yaml.v2

If I run this multiple times, it fails on random different things, e.g. the next time it fails on:

[ERROR] Error scanning golang.org/x/tools/go/gcimporter15: open /Users/alex/.glide/cache/src/https-golang.org-x-tools-go-gcimporter15: no such file or directory

glide.yaml.

godcong commented 7 years ago

i think you need make a mirror with golang.org/x/crypto with github.com/golang/crypto

Shashwatsh commented 7 years ago

I have this error too. +1

Shashwatsh commented 7 years ago

btw Hi @godcong

ty2 commented 7 years ago

It may due to deps conflict, try to reorder packages in import list, put packages on top that use golang.org/x/crypto.