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

Fix CI and update go version and dependencies. #82

Merged
merged 7 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all 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: 3 additions & 3 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ $(GOJSONTOYAML): .bingo/gojsontoyaml.mod
@echo "(re)installing $(GOBIN)/gojsontoyaml-v0.0.0-20200602132005-3697ded27e8c"
@cd .bingo && $(GO) build -mod=mod -modfile=gojsontoyaml.mod -o=$(GOBIN)/gojsontoyaml-v0.0.0-20200602132005-3697ded27e8c "github.com/brancz/gojsontoyaml"

GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.32.2
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.45.2
$(GOLANGCI_LINT): .bingo/golangci-lint.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)/golangci-lint-v1.32.2"
@cd .bingo && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.32.2 "github.com/golangci/golangci-lint/cmd/golangci-lint"
@echo "(re)installing $(GOBIN)/golangci-lint-v1.45.2"
@cd .bingo && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.45.2 "github.com/golangci/golangci-lint/cmd/golangci-lint"

JB := $(GOBIN)/jb-v0.4.0
$(JB): .bingo/jb.mod
Expand Down
2 changes: 1 addition & 1 deletion .bingo/gojsontoyaml.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15
go 1.17

require github.com/brancz/gojsontoyaml v0.0.0-20200602132005-3697ded27e8c
4 changes: 2 additions & 2 deletions .bingo/golangci-lint.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15
go 1.17

require github.com/golangci/golangci-lint v1.32.2 // cmd/golangci-lint
require github.com/golangci/golangci-lint v1.45.2 // cmd/golangci-lint
2 changes: 1 addition & 1 deletion .bingo/jb.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15
go 1.17

require github.com/jsonnet-bundler/jsonnet-bundler v0.4.0 // cmd/jb
2 changes: 1 addition & 1 deletion .bingo/jsonnet.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15
go 1.17

require github.com/google/go-jsonnet v0.16.0 // cmd/jsonnet
2 changes: 1 addition & 1 deletion .bingo/jsonnetfmt.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15
go 1.17

require github.com/google/go-jsonnet v0.16.0 // cmd/jsonnetfmt
2 changes: 1 addition & 1 deletion .bingo/kubeval.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15
go 1.17

require github.com/instrumenta/kubeval v0.0.0-20201005082916-38668c6c5b23
2 changes: 1 addition & 1 deletion .bingo/promtool.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15
go 1.17

require github.com/prometheus/prometheus v1.8.2-0.20200213233353-b90be6f32a33 // cmd/promtool
2 changes: 1 addition & 1 deletion .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

GOJSONTOYAML="$GOBIN/gojsontoyaml-v0.0.0-20200602132005-3697ded27e8c"

GOLANGCI_LINT="$GOBIN/golangci-lint-v1.32.2"
GOLANGCI_LINT="$GOBIN/golangci-lint-v1.45.2"

JB="$GOBIN/jb-v0.4.0"

Expand Down
8 changes: 4 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ platform:
steps:
- name: test
pull: always
image: golang:1.14.2
image: golang:1.17.8
commands:
- make test

- name: lint
pull: always
image: golang:1.14.2
image: golang:1.17.8
commands:
- make lint
- git diff --exit-code

- name: build
pull: always
image: golang:1.14.2
image: golang:1.17.8
commands:
- make thanos-receive-controller

Expand All @@ -34,7 +34,7 @@ steps:
- git diff --exit-code

- name: tags
image: golang:1.14.2
image: golang:1.17.8
commands:
- echo -n "$(git rev-parse --abbrev-ref HEAD | tr / -)-$(date +%Y-%m-%d)-$(git rev-parse --short HEAD),latest" > .tags
when:
Expand Down
1 change: 0 additions & 1 deletion .errcheck_excludes.txt

This file was deleted.

7 changes: 6 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ linters:
- nolintlint
- testpackage
- wrapcheck
- gomoddirectives
- ireturn
- varnamelen
- paralleltest

linters-settings:
errcheck:
exclude: .errcheck_excludes.txt
exclude-functions:
- '(github.com/go-kit/log.Logger).Log'
lll:
line-length: 200
funlen:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16-alpine3.12 as builder
FROM golang:1.17-alpine3.15 as builder

WORKDIR /workspace

Expand All @@ -8,7 +8,7 @@ RUN apk update && apk upgrade && apk add --no-cache alpine-sdk

RUN make thanos-receive-controller

FROM gcr.io/distroless/static:latest
FROM scratch

COPY --from=builder /workspace/thanos-receive-controller /usr/bin/thanos-receive-controller

Expand Down
22 changes: 11 additions & 11 deletions examples/dashboards/receive-controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"title": "Rate",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -135,7 +135,7 @@
"title": "Errors",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -223,7 +223,7 @@
"title": "Rate",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -299,7 +299,7 @@
"title": "Errors",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -387,7 +387,7 @@
"title": "Rate",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -465,7 +465,7 @@
"title": "Errors",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -561,7 +561,7 @@
"title": "Nodes per Hashring",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -645,7 +645,7 @@
"title": "Tenants per Hashring",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -735,7 +735,7 @@
"title": "Last Updated",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "singlestat",
Expand Down Expand Up @@ -813,7 +813,7 @@
"title": "Last Updated",
"tooltip": {
"shared": false,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "singlestat",
Expand Down Expand Up @@ -866,7 +866,7 @@
"value": "default"
},
"hide": 0,
"label": null,
"label": "Data Source",
"name": "datasource",
"options": [ ],
"query": "prometheus",
Expand Down
113 changes: 103 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,111 @@
module github.com/observatorium/thanos-receive-controller

go 1.14
go 1.17

require (
github.com/go-kit/kit v0.9.0
github.com/google/go-cmp v0.5.4
github.com/go-kit/log v0.2.0
github.com/google/go-cmp v0.5.6
github.com/oklog/run v1.1.0
github.com/onsi/ginkgo v1.11.0 // indirect
github.com/onsi/gomega v1.8.1 // indirect
github.com/prometheus/client_golang v1.5.0
github.com/thanos-io/thanos v0.12.0
k8s.io/api v0.0.0-20191115095533-47f6de673b26
k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2
github.com/prometheus/client_golang v1.12.1
github.com/thanos-io/thanos v0.25.2
k8s.io/api v0.23.5
k8s.io/apimachinery v0.23.5
k8s.io/client-go v12.0.0+incompatible
)

replace k8s.io/client-go => k8s.io/client-go v0.0.0-20190620085101-78d2af792bab
require (
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/OneOfOne/xxhash v1.2.6 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect
github.com/armon/go-metrics v0.3.9 // indirect
github.com/aws/aws-sdk-go v1.42.8 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect
github.com/fatih/color v1.12.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-redis/redis/v8 v8.11.4 // indirect
github.com/gogo/googleapis v1.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/gogo/status v1.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201207153454-9f6bf00c00a7 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v0.16.2 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/miekg/dns v1.1.43 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/prometheus v1.8.2-0.20211119115433-692a54649ed7 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect
philipgough marked this conversation as resolved.
Show resolved Hide resolved
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/vimeo/galaxycache v0.0.0-20210323154928-b7e5d71c067a // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/goleak v1.1.12 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.0.0-20220114011407-0dd24b26b47d // indirect
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c // indirect
google.golang.org/grpc v1.40.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

replace (
github.com/vimeo/galaxycache => github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e
k8s.io/client-go => k8s.io/client-go v0.23.5
)
Loading