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 Go 1.12 & replace dep by go mod #868

Merged
merged 9 commits into from
Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ jobs:
test:
docker:
# Available from https://hub.docker.com/r/circleci/golang/
- image: circleci/golang:1.10
- image: circleci/golang:1.12
working_directory: /go/src/github.com/improbable-eng/thanos
environment:
GO111MODULE: 'on'
steps:
- checkout
- setup_remote_docker:
Expand All @@ -19,7 +21,7 @@ jobs:
echo $GOOGLE_APPLICATION_CREDENTIALS_CONTENT > /go/src/github.com/improbable-eng/thanos/circleci-gcs-creds.json
echo "Awesome! GCS integration tests are enabled."
fi
- run: make deps DEPARGS="-v"
- run: make check-go-mod
- run: make errcheck
- run: make check-docs
- run: make format
Expand Down
2 changes: 1 addition & 1 deletion .errcheck_excludes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(github.com/improbable-eng/thanos/vendor/github.com/go-kit/kit/log.Logger).Log
(github.com/go-kit/kit/log.Logger).Log
fmt.Fprintln
fmt.Fprint
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/prometheus
/thanos
vendor/
.dep-finished
/.vendor-new

# Ignore minikube setup working dirs.
kube/bin
Expand Down
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,27 @@ CI runs GCS and inmem tests only for now. Not having these variables will produc
7. You may merge the Pull Request in once you have the sign-off of at least one developers with write access, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
8. If you feel like your PR waits too long for a review, feel free to ping [`#thanos-dev`](https://join.slack.com/t/improbable-eng/shared_invite/enQtMzQ1ODcyMzQ5MjM4LWY5ZWZmNGM2ODc5MmViNmQ3ZTA3ZTY3NzQwOTBlMTkzZmIxZTIxODk0OWU3YjZhNWVlNDU3MDlkZGViZjhkMjc) channel on our slack for review!

## Dependency management

The Thanos project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater, git and bzr installed.
sylr marked this conversation as resolved.
Show resolved Hide resolved

To add or update a new dependency, use the `go get` command:

```bash
# Pick the latest tagged release.
go get example.com/some/module/pkg

# Pick a specific version.
go get example.com/some/module/pkg@vX.Y.Z
```

Tidy up the `go.mod` and `go.sum` files:

```bash
make go-mod-tidy
git add go.mod go.sum
git commit
```

You have to commit the changes to `go.mod` and `go.sum` before submitting the pull request.
2 changes: 1 addition & 1 deletion Dockerfile.multi-stage
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.11-alpine3.9 as builder
FROM golang:1.12-alpine3.9 as builder

ADD . $GOPATH/src/github.com/improbable-eng/thanos
WORKDIR $GOPATH/src/github.com/improbable-eng/thanos
Expand Down
Loading