Skip to content

Commit

Permalink
Build with Go 1.18 (thanos-io#5258)
Browse files Browse the repository at this point in the history
* Build with Go 1.18

Signed-off-by: Sylvain Rabot <[email protected]>

* Try something

Signed-off-by: Sylvain Rabot <[email protected]>

* Upgrade minio

Signed-off-by: Sylvain Rabot <[email protected]>

* Replace json-iterator/reflect2 in bingo

Signed-off-by: Sylvain Rabot <[email protected]>
  • Loading branch information
sylr authored Jul 6, 2022
1 parent 5f6ee25 commit d704b7c
Show file tree
Hide file tree
Showing 15 changed files with 2,218 additions and 152 deletions.
6 changes: 3 additions & 3 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ $(MDOX): $(BINGO_DIR)/mdox.mod
@echo "(re)installing $(GOBIN)/mdox-v0.9.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=mdox.mod -o=$(GOBIN)/mdox-v0.9.0 "github.com/bwplotka/mdox"

MINIO := $(GOBIN)/minio-v0.0.0-20201125204248-91130e884b5d
MINIO := $(GOBIN)/minio-v0.0.0-20220704210254-b311abed3176
$(MINIO): $(BINGO_DIR)/minio.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/minio-v0.0.0-20201125204248-91130e884b5d"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=minio.mod -o=$(GOBIN)/minio-v0.0.0-20201125204248-91130e884b5d "github.com/minio/minio"
@echo "(re)installing $(GOBIN)/minio-v0.0.0-20220704210254-b311abed3176"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=minio.mod -o=$(GOBIN)/minio-v0.0.0-20220704210254-b311abed3176 "github.com/minio/minio"

PROMDOC := $(GOBIN)/promdoc-v0.8.0
$(PROMDOC): $(BINGO_DIR)/promdoc.mod
Expand Down
199 changes: 199 additions & 0 deletions .bingo/golangci-lint.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .bingo/minio.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.14

require github.com/minio/minio v0.0.0-20201125204248-91130e884b5d
require github.com/minio/minio v0.0.0-20220704210254-b311abed3176
1,727 changes: 1,727 additions & 0 deletions .bingo/minio.sum

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .bingo/prometheus.1.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.14

replace k8s.io/klog => github.com/simonpasquier/klog-gokit v0.1.0
replace (
github.com/json-iterator/go => github.com/json-iterator/go v1.1.12
github.com/modern-go/reflect2 => github.com/modern-go/reflect2 v1.0.2
k8s.io/klog => github.com/simonpasquier/klog-gokit v0.1.0
)

require github.com/prometheus/prometheus v1.8.2-0.20200724121523-657ba532e42f // cmd/prometheus
9 changes: 6 additions & 3 deletions .bingo/prometheus.2.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15

replace k8s.io/klog => github.com/simonpasquier/klog-gokit v0.3.0

replace k8s.io/klog/v2 => github.com/simonpasquier/klog-gokit/v2 v2.0.1
replace (
github.com/json-iterator/go => github.com/json-iterator/go v1.1.12
github.com/modern-go/reflect2 => github.com/modern-go/reflect2 v1.0.2
k8s.io/klog => github.com/simonpasquier/klog-gokit v0.3.0
k8s.io/klog/v2 => github.com/simonpasquier/klog-gokit/v2 v2.0.1
)

require github.com/prometheus/prometheus v1.8.2-0.20210331101223-3cafc58827d1 // cmd/prometheus
2 changes: 2 additions & 0 deletions .bingo/prometheus.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ replace (
github.com/cockroachdb/cockroach => github.com/cockroachdb/cockroach v0.0.0-20170608034007-84bc9597164f
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.2.3-0.20180520015035-48a0ecefe2e4
github.com/gophercloud/gophercloud => github.com/gophercloud/gophercloud v0.18.0
github.com/json-iterator/go => github.com/json-iterator/go v1.1.12
github.com/miekg/dns => github.com/miekg/dns v1.0.4
github.com/modern-go/reflect2 => github.com/modern-go/reflect2 v1.0.2
github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.0-pre1.0.20180607123607-faf4ec335fe0
github.com/prometheus/common => github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1
github.com/prometheus/tsdb => github.com/prometheus/tsdb v0.0.0-20180921053122-9c8ca47399a7
Expand Down
2 changes: 1 addition & 1 deletion .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ JSONNETFMT="${GOBIN}/jsonnetfmt-v0.17.0"

MDOX="${GOBIN}/mdox-v0.9.0"

MINIO="${GOBIN}/minio-v0.0.0-20201125204248-91130e884b5d"
MINIO="${GOBIN}/minio-v0.0.0-20220704210254-b311abed3176"

PROMDOC="${GOBIN}/promdoc-v0.8.0"

Expand Down
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
version: 2.1

orbs:
go: circleci/go@1.5.0
go: circleci/go@1.7.1

executors:
golang:
docker:
- image: cimg/go:1.17-node
- image: cimg/go:1.18-node
golang-test:
docker:
- image: cimg/go:1.17-node
- image: cimg/go:1.18-node
- image: quay.io/thanos/docker-swift-onlyone-authv2-keystone:v0.1

jobs:
Expand All @@ -22,7 +22,7 @@ jobs:
- checkout
- go/mod-download-cached
- setup_remote_docker:
version: 20.10.11
version: 20.10.12
- run:
name: Create Secret if PR is not forked
# GCS integration tests are run only for author's PR that have write access, because these tests
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- checkout
- go/mod-download-cached
- setup_remote_docker:
version: 20.10.11
version: 20.10.12
- attach_workspace:
at: .
# Register qemu to support multi-arch.
Expand All @@ -96,7 +96,7 @@ jobs:
- checkout
- go/mod-download-cached
- setup_remote_docker:
version: 20.10.11
version: 20.10.12
- attach_workspace:
at: .
- run: make tarballs-release
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
GOBIN: /tmp/.bin
steps:
- name: Install Go.
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x

- name: Check out code into the Go module directory
uses: actions/checkout@v1
Expand Down Expand Up @@ -59,16 +59,16 @@ jobs:
fail-fast: true
matrix:
parallelism: [4]
index: [0,1,2,3]
index: [0,1,2,3]
runs-on: ubuntu-latest
name: Thanos end-to-end tests
env:
GOBIN: /tmp/.bin
steps:
- name: Install Go.
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x

- name: Check out code into the Go module directory.
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17
1.18
2 changes: 1 addition & 1 deletion .promu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
go:
version: 1.17
version: 1.18
repository:
path: github.com/thanos-io/thanos
build:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.multi-stage
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# By default we pin to amd64 sha. Use make docker to automatically adjust for arm64 versions.
ARG BASE_DOCKER_SHA="14d68ca3d69fceaa6224250c83d81d935c053fb13594c811038c461194599973"
FROM golang:1.17-alpine3.15 as builder
FROM golang:1.18-alpine3.15 as builder

WORKDIR $GOPATH/src/github.com/thanos-io/thanos
# Change in the docker context invalidates the cache so to leverage docker
Expand Down
Loading

0 comments on commit d704b7c

Please sign in to comment.