Skip to content

Compile code in vendor dir; don't download modules again #2267

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

Closed
wants to merge 1 commit into from

Conversation

bboreham
Copy link
Contributor

What this PR does:
Tells Go to use the code we have checked in under vendor.

Which issue(s) this PR fixes:
Fixes #1710
Fixes #1795

Checklist
N/A

@bboreham
Copy link
Contributor Author

Doesn't seem to work at CircleCI:

#!/bin/bash -eo pipefail
CASSANDRA_TEST_ADDRESSES=localhost:9042 make BUILD_IN_CONTAINER=false test
protoc -I /go/src:./vendor:./pkg/querier/frontend --gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./pkg/querier/frontend ./pkg/querier/frontend/frontend.proto
protoc -I /go/src:./vendor:./pkg/querier/queryrange --gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./pkg/querier/queryrange ./pkg/querier/queryrange/queryrange.proto
protoc -I /go/src:./vendor:./pkg/ingester --gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./pkg/ingester ./pkg/ingester/wal.proto
protoc -I /go/src:./vendor:./pkg/ingester/client --gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./pkg/ingester/client ./pkg/ingester/client/cortex.proto
protoc -I /go/src:./vendor:./pkg/ruler/rules --gogoslick_out=plugins=grpc,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./pkg/ruler/rules ./pkg/ruler/rules/rules.proto
./tools/test -netgo
go: downloading github.com/go-kit/kit v0.9.0
go: downloading github.com/pkg/errors v0.8.1
go: downloading github.com/prometheus/client_golang v1.5.0
go: downloading github.com/weaveworks/common v0.0.0-20200310113808-2708ba4e60a4
go: downloading github.com/prometheus/common v0.9.1
go: downloading github.com/prometheus/prometheus v1.8.2-0.20200213233353-b90be6f32a33
go: downloading github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e
...

@pstibrany
Copy link
Contributor

pstibrany commented Mar 13, 2020

This is how Go 1.14 will work out of the box, once we switch to it.

https://golang.org/doc/go1.14#go-command

@bboreham
Copy link
Contributor Author

Maybe I should just do Go 1.14 instead.

@bboreham
Copy link
Contributor Author

Probably replaced by #2480

@pracucci
Copy link
Contributor

Probably replaced by #2480

I don't think so. It's a step forward, but doesn't closes this. In order to get what we want we need go.mod to switch to 1.14, according to https://golang.org/doc/go1.14#go-command.

@stale
Copy link

stale bot commented Jun 19, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 19, 2020
@pracucci
Copy link
Contributor

Switching to 1.14 in #2749.

@stale stale bot removed the stale label Jun 19, 2020
@pracucci
Copy link
Contributor

@bboreham I hope you don't mind if I close this PR. We already switched to Go 1.14.

@pracucci pracucci closed this Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metadataInIndex flag is broken Cortex is not using vendored dependencies in CI
3 participants