diff --git a/.drone/drone.yml b/.drone/drone.yml index 1e0eb0fb1f3f..8b737b0fe7e2 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -53,14 +53,14 @@ steps: depends_on: - clone environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: check-drone-drift - commands: - make BUILD_IN_CONTAINER=false check-generated-files depends_on: - clone environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: check-generated-files - commands: - cd .. @@ -69,7 +69,7 @@ steps: depends_on: - clone environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: clone-main - commands: - make BUILD_IN_CONTAINER=false test @@ -77,7 +77,7 @@ steps: - clone - clone-main environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: test - commands: - cd ../loki-main @@ -85,7 +85,7 @@ steps: depends_on: - clone-main environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: test-main - commands: - make BUILD_IN_CONTAINER=false compare-coverage old=../loki-main/test_results.txt @@ -95,7 +95,7 @@ steps: - test - test-main environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: compare-coverage - commands: - pull=$(echo $CI_COMMIT_REF | awk -F '/' '{print $3}') @@ -108,7 +108,7 @@ steps: TOKEN: from_secret: github_token USER: grafanabot - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: report-coverage - commands: - make BUILD_IN_CONTAINER=false lint @@ -116,7 +116,7 @@ steps: - clone - check-generated-files environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: lint - commands: - make BUILD_IN_CONTAINER=false check-mod @@ -125,7 +125,7 @@ steps: - test - lint environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: check-mod - commands: - apk add make bash && make lint-scripts @@ -137,21 +137,21 @@ steps: - clone - check-generated-files environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: loki - commands: - make BUILD_IN_CONTAINER=false validate-example-configs depends_on: - loki environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: validate-example-configs - commands: - make BUILD_IN_CONTAINER=false check-example-config-doc depends_on: - clone environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: check-example-config-doc trigger: ref: @@ -178,7 +178,7 @@ steps: depends_on: - clone environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: loki-mixin-check trigger: ref: @@ -1187,7 +1187,7 @@ steps: - commands: - make BUILD_IN_CONTAINER=false packages environment: {} - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: test packaging when: event: @@ -1197,7 +1197,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/loki-build-image:0.21.0 + image: grafana/loki-build-image:0.22.0 name: publish when: event: @@ -1417,6 +1417,6 @@ kind: secret name: deploy_config --- kind: signature -hmac: b99e5220d2f2fc15a0bca24bfd3ead78bb6b1ac276fc01ea76a06705fc920190 +hmac: 4fa63210e8bdd946f1732051b6b841eba0ae1b0313436301c743341d29893c8f ... diff --git a/CHANGELOG.md b/CHANGELOG.md index e9eb2999b19a..2aa022e68222 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * [6358](https://github.com/grafana/loki/pull/6358) **taharah**: Fixes sigv4 authentication for the Ruler's remote write configuration by allowing both a global and per tenant configuration. * [6375](https://github.com/grafana/loki/pull/6375) **dannykopping**: Fix bug that prevented users from using the `json` parser after a `line_format` pipeline stage. ##### Changes +* [6726](https://github.com/grafana/loki/pull/6726) **kavirajk** upgrades go from 1.17.9 -> 1.18.4 * [6415](https://github.com/grafana/loki/pull/6415) **salvacorts** Evenly spread queriers across kubernetes nodes. * [6349](https://github.com/grafana/loki/pull/6349) **simonswine**: Update the default HTTP listen port from 80 to 3100. Make sure to configure the port explicitly if you are using port 80. diff --git a/Makefile b/Makefile index 8ee65c85b770..8f794c4297bf 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ DOCKER_IMAGE_DIRS := $(patsubst %/Dockerfile,%,$(DOCKERFILES)) BUILD_IN_CONTAINER ?= true # ensure you run `make drone` after changing this -BUILD_IMAGE_VERSION := 0.21.0 +BUILD_IMAGE_VERSION := 0.22.0 # Docker image info IMAGE_PREFIX ?= grafana @@ -277,7 +277,7 @@ publish: packages ######## # To run this efficiently on your workstation, run this from the root dir: -# docker run --rm --tty -i -v $(pwd)/.cache:/go/cache -v $(pwd)/.pkg:/go/pkg -v $(pwd):/src/loki grafana/loki-build-image:0.17.0 lint +# docker run --rm --tty -i -v $(pwd)/.cache:/go/cache -v $(pwd)/.pkg:/go/pkg -v $(pwd):/src/loki grafana/loki-build-image:0.22.0 lint lint: GO111MODULE=on golangci-lint run -v faillint -paths "sync/atomic=go.uber.org/atomic" ./... @@ -586,7 +586,7 @@ loki-operator-image-cross: $(SUDO) $(BUILD_OCI) -t $(IMAGE_PREFIX)/loki-operator:$(IMAGE_TAG) -f operator/Dockerfile.cross operator/ loki-operator-push: loki-operator-image-cross $(SUDO) $(PUSH_OCI) $(IMAGE_PREFIX)/loki-operator:$(IMAGE_TAG) - + ######## # Misc # ######## diff --git a/clients/cmd/fluent-bit/Dockerfile b/clients/cmd/fluent-bit/Dockerfile index 583a29ee2dd7..14b977e5d676 100644 --- a/clients/cmd/fluent-bit/Dockerfile +++ b/clients/cmd/fluent-bit/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9 as build +FROM golang:1.18.4 as build COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false fluent-bit-plugin diff --git a/clients/cmd/promtail/Dockerfile b/clients/cmd/promtail/Dockerfile index a7e782f62b5e..e6e06f8384b9 100644 --- a/clients/cmd/promtail/Dockerfile +++ b/clients/cmd/promtail/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9-bullseye as build +FROM golang:1.18.4-bullseye as build COPY . /src/loki WORKDIR /src/loki diff --git a/clients/cmd/promtail/Dockerfile.arm32 b/clients/cmd/promtail/Dockerfile.arm32 index 28f92122e74a..ec399df1c7a2 100644 --- a/clients/cmd/promtail/Dockerfile.arm32 +++ b/clients/cmd/promtail/Dockerfile.arm32 @@ -1,4 +1,4 @@ -FROM golang:1.17.9-bullseye as build +FROM golang:1.18.4-bullseye as build COPY . /src/loki WORKDIR /src/loki diff --git a/clients/cmd/promtail/Dockerfile.cross b/clients/cmd/promtail/Dockerfile.cross index b43ededde405..11527ec412cd 100644 --- a/clients/cmd/promtail/Dockerfile.cross +++ b/clients/cmd/promtail/Dockerfile.cross @@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile . -FROM golang:1.17.9-alpine as goenv +FROM golang:1.18.4-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/cmd/logcli/Dockerfile b/cmd/logcli/Dockerfile index 2989dc6a97cf..070ed013397d 100644 --- a/cmd/logcli/Dockerfile +++ b/cmd/logcli/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9 as build +FROM golang:1.18.4 as build COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/loki-canary/Dockerfile b/cmd/loki-canary/Dockerfile index f3523a52a4e6..8178b7b08ce4 100644 --- a/cmd/loki-canary/Dockerfile +++ b/cmd/loki-canary/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9 as build +FROM golang:1.18.4 as build COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/loki-canary/Dockerfile.cross b/cmd/loki-canary/Dockerfile.cross index ce93d4c36522..4f62128a9eac 100644 --- a/cmd/loki-canary/Dockerfile.cross +++ b/cmd/loki-canary/Dockerfile.cross @@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f cmd/promtail/Dockerfile . -FROM golang:1.17.9-alpine as goenv +FROM golang:1.18.4-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/cmd/loki/Dockerfile b/cmd/loki/Dockerfile index 069208c42a52..aa909e366821 100644 --- a/cmd/loki/Dockerfile +++ b/cmd/loki/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9 as build +FROM golang:1.18.4 as build COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/loki/Dockerfile.cross b/cmd/loki/Dockerfile.cross index ccf0b6af0ee4..acd80b6acf8b 100644 --- a/cmd/loki/Dockerfile.cross +++ b/cmd/loki/Dockerfile.cross @@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/loki -f cmd/loki/Dockerfile . -FROM golang:1.17.9-alpine as goenv +FROM golang:1.18.4-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/cmd/migrate/Dockerfile b/cmd/migrate/Dockerfile index cf0f92527c11..8f986419d94c 100644 --- a/cmd/migrate/Dockerfile +++ b/cmd/migrate/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9 as build +FROM golang:1.18.4 as build COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false migrate diff --git a/cmd/querytee/Dockerfile b/cmd/querytee/Dockerfile index 6ff90e338290..587f5e5f6eb2 100644 --- a/cmd/querytee/Dockerfile +++ b/cmd/querytee/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9 as build +FROM golang:1.18.4 as build COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/querytee/Dockerfile.cross b/cmd/querytee/Dockerfile.cross index 7ebc34d49055..1d13ea8948ff 100644 --- a/cmd/querytee/Dockerfile.cross +++ b/cmd/querytee/Dockerfile.cross @@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f cmd/promtail/Dockerfile . -FROM golang:1.17.9-alpine as goenv +FROM golang:1.18.4-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/go.mod b/go.mod index 075a2d922116..b5483decadd5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/grafana/loki -go 1.17 +go 1.18 require ( cloud.google.com/go/bigtable v1.3.0 diff --git a/go.sum b/go.sum index b2b16c1aced7..b9c2fdcf91fe 100644 --- a/go.sum +++ b/go.sum @@ -638,7 +638,6 @@ github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTM github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-redis/redis/v8 v8.11.4 h1:kHoYkfZP6+pe04aFTnhDH6GDROa5yJdHJVNxV3F46Tg= github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w= @@ -810,7 +809,6 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20220520215854-d04f2422c8a1 h1:K4bn56FHdjFCfjSo3wWaD6rJL8r9yvmmncJNMhdkKrw= github.com/google/pprof v0.0.0-20220520215854-d04f2422c8a1/go.mod h1:gSuNB+gJaOiQKLEZ+q+PK9Mq3SOzhRcw2GsGS/FhYDk= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= @@ -819,7 +817,6 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.2+incompatible h1:silFMLAnr330+NRuag/VjIGF7TLp/LBrV2CJKFLWEww= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -1077,7 +1074,6 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.1 h1:hLQYb23E8/fO+1u53d02A97a8UnsddcvYzq4ERRU4ds= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -1565,7 +1561,6 @@ github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= @@ -1586,7 +1581,6 @@ github.com/vultr/govultr/v2 v2.17.1 h1:UBmotwA0mkGtyJMakUF9jhLH/W3mN5wfGRn543i/B github.com/vultr/govultr/v2 v2.17.1/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/wavefronthq/wavefront-sdk-go v0.9.2/go.mod h1:hQI6y8M9OtTCtc0xdwh+dCER4osxXdEAeCpacjpDZEU= github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78/go.mod h1:YU9FvnS7kUnRt6HY10G+2qHkwzP3n3Vb1XsXDsJTSp8= -github.com/weaveworks/common v0.0.0-20220629114710-e3b70df0f08b/go.mod h1:YfOOLoW1Q/jIIu0WLeSwgStmrKjuJEZSKTAUc+0KFvE= github.com/weaveworks/common v0.0.0-20220706100410-67d27ed40fae h1:Z8YibUpdBEdCq8nwrYXJQ8vYooevbmEBIdFpseXK3/8= github.com/weaveworks/common v0.0.0-20220706100410-67d27ed40fae/go.mod h1:YfOOLoW1Q/jIIu0WLeSwgStmrKjuJEZSKTAUc+0KFvE= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= diff --git a/loki-build-image/Dockerfile b/loki-build-image/Dockerfile index 551484712662..029a34505c5c 100644 --- a/loki-build-image/Dockerfile +++ b/loki-build-image/Dockerfile @@ -38,7 +38,7 @@ RUN apk add --no-cache docker-cli # TODO this should be fixed to download and extract the specific release binary from github as we do for golangci and helm above # however we need a commit which hasn't been released yet: https://github.com/drone/drone-cli/commit/1fad337d74ca0ecf420993d9d2d7229a1c99f054 # Read the comment below regarding GO111MODULE=on and why it is necessary -FROM golang:1.17.9 as drone +FROM golang:1.18.4 as drone RUN curl -L https://github.com/drone/drone-cli/releases/download/v1.4.0/drone_linux_amd64.tar.gz | tar zx && \ install -t /usr/local/bin drone @@ -47,29 +47,28 @@ RUN curl -L https://github.com/drone/drone-cli/releases/download/v1.4.0/drone_li # Error: # github.com/fatih/faillint@v1.5.0 requires golang.org/x/tools@v0.0.0-20200207224406-61798d64f025 # (not golang.org/x/tools@v0.0.0-20190918214920-58d531046acd from golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69) -FROM golang:1.17.9 as faillint -RUN GO111MODULE=on go get github.com/fatih/faillint@v1.5.0 +FROM golang:1.18.4 as faillint +RUN GO111MODULE=on go install github.com/fatih/faillint@v1.10.0 -FROM golang:1.17.9 as delve -RUN GO111MODULE=on go get github.com/go-delve/delve/cmd/dlv@v1.7.3 +FROM golang:1.18.4 as delve +RUN GO111MODULE=on go install github.com/go-delve/delve/cmd/dlv@v1.7.3 # Install ghr used to push binaries and template the release # This collides with the version of go tools used in the base image, thus we install it in its own image and copy it over. -FROM golang:1.17.9 as ghr -RUN GO111MODULE=on go get github.com/tcnksm/ghr +FROM golang:1.18.4 as ghr +RUN GO111MODULE=on go install github.com/tcnksm/ghr@9349474 # Install nfpm (https://nfpm.goreleaser.com) for creating .deb and .rpm packages. -FROM golang:1.17.9 as nfpm -RUN GO111MODULE=on go get github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.11.3 +FROM golang:1.18.4 as nfpm +RUN GO111MODULE=on go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.11.3 # Install tools used to compile jsonnet. -FROM golang:1.17.9 as jsonnet -RUN GO111MODULE=on go get \ - github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.4.0 \ - github.com/monitoring-mixins/mixtool/cmd/mixtool@bca3066 \ - github.com/google/go-jsonnet/cmd/jsonnet@v0.18.0 +FROM golang:1.18.4 as jsonnet +RUN GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.4.0 +RUN GO111MODULE=on go install github.com/monitoring-mixins/mixtool/cmd/mixtool@bca3066 +RUN GO111MODULE=on go install github.com/google/go-jsonnet/cmd/jsonnet@v0.18.0 -FROM golang:1.17.9-buster +FROM golang:1.18.4-buster RUN apt-get update && \ apt-get install -qy \ musl gnupg ragel \ @@ -97,15 +96,12 @@ COPY --from=jsonnet /go/bin/jsonnet /usr/bin/jsonnet # If we don't force this, Go is going to default to GOPATH mode as we do not have an active project or go.mod # file for it to detect and switch to Go Modules automatically. # It's possible this can be revisited in newer versions of Go if the behavior around GOPATH vs GO111MODULES changes -RUN GO111MODULE=on go get \ - github.com/golang/protobuf/protoc-gen-go@v1.3.1 \ - github.com/gogo/protobuf/protoc-gen-gogoslick@v1.3.0 \ - github.com/gogo/protobuf/gogoproto@v1.3.0 \ +RUN GO111MODULE=on go install github.com/golang/protobuf/protoc-gen-go@v1.3.1 +RUN GO111MODULE=on go install github.com/gogo/protobuf/protoc-gen-gogoslick@v1.3.0 # Due to the lack of a proper release tag, we use the commit hash of # https://github.com/golang/tools/releases v0.1.7 - golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69 \ - github.com/mitchellh/gox && \ - rm -rf /go/pkg /go/src +RUN GO111MODULE=on go install golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69 +RUN GO111MODULE=on go install github.com/mitchellh/gox@9f71238 && rm -rf /go/pkg /go/src ENV GOCACHE=/go/cache COPY build.sh / diff --git a/operator/Dockerfile b/operator/Dockerfile index 77db60322129..e735bd88c935 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17.9 as builder +FROM golang:1.18.4 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/operator/Dockerfile.cross b/operator/Dockerfile.cross index f19ca81bb4c6..e75a181444ee 100644 --- a/operator/Dockerfile.cross +++ b/operator/Dockerfile.cross @@ -1,6 +1,6 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0 -FROM golang:1.17.9-alpine as goenv +FROM golang:1.18.4-alpine as goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm diff --git a/operator/calculator.Dockerfile b/operator/calculator.Dockerfile index 42976a5ee429..2d722735f19c 100644 --- a/operator/calculator.Dockerfile +++ b/operator/calculator.Dockerfile @@ -1,5 +1,5 @@ # Build the calculator binary -FROM golang:1.17.9 as builder +FROM golang:1.18.4 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/tools/dev/loki-boltdb-storage-s3/dev.dockerfile b/tools/dev/loki-boltdb-storage-s3/dev.dockerfile index 0f25dc0fc8f4..15451eb9b71f 100644 --- a/tools/dev/loki-boltdb-storage-s3/dev.dockerfile +++ b/tools/dev/loki-boltdb-storage-s3/dev.dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9 +FROM golang:1.18.4 ENV CGO_ENABLED=0 RUN go get github.com/go-delve/delve/cmd/dlv diff --git a/tools/lambda-promtail/Dockerfile b/tools/lambda-promtail/Dockerfile index ce14b59502fd..1a24e0ab37e5 100644 --- a/tools/lambda-promtail/Dockerfile +++ b/tools/lambda-promtail/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.9-alpine3.14 AS build-image +FROM golang:1.18.4-alpine3.15 AS build-image COPY tools/lambda-promtail /src/lambda-promtail WORKDIR /src/lambda-promtail