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

Update golang to 1.14.4 and other build deps #2480

Merged
merged 15 commits into from
Jun 17, 2020
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defaults: &defaults
docker:
# IMPORTANT: whenever you change the build-image version tag, remember to replace it
# across the entire file (there are multiple references).
- image: quay.io/cortexproject/build-image:share-traffic-mirroring-with-envoy-2af1da4d8-WIP
- image: quay.io/cortexproject/build-image:update-build-image-ce3bc5f86
working_directory: /go/src/github.com/cortexproject/cortex

filters: &filters
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:

test:
docker:
- image: quay.io/cortexproject/build-image:share-traffic-mirroring-with-envoy-2af1da4d8-WIP
- image: quay.io/cortexproject/build-image:update-build-image-ce3bc5f86
- image: cassandra:3.11
environment:
JVM_OPTS: "-Xms1024M -Xmx1024M"
Expand All @@ -115,7 +115,7 @@ jobs:
name: Integration Test
command: |
touch build-image/.uptodate
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations make BUILD_IMAGE=quay.io/cortexproject/build-image:share-traffic-mirroring-with-envoy-2af1da4d8-WIP configs-integration-test
MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations make BUILD_IMAGE=quay.io/cortexproject/build-image:update-build-image-ce3bc5f86 configs-integration-test

integration:
machine:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ RM := --rm
# as it currently disallows TTY devices. This value needs to be overridden
# in any custom cloudbuild.yaml files
TTY := --tty
GO_FLAGS := -ldflags "-X main.Branch=$(GIT_BRANCH) -X main.Revision=$(GIT_REVISION) -X main.Version=$(VERSION) -extldflags \"-static\" -s -w" -tags netgo -mod vendor
GO_FLAGS := -ldflags "-X main.Branch=$(GIT_BRANCH) -X main.Revision=$(GIT_REVISION) -X main.Version=$(VERSION) -extldflags \"-static\" -s -w" -tags netgo

ifeq ($(BUILD_IN_CONTAINER),true)

Expand Down
17 changes: 9 additions & 8 deletions build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
FROM golang:1.13.3-stretch
FROM golang:1.14.4-stretch
RUN apt-get update && apt-get install -y curl python-requests python-yaml file jq unzip protobuf-compiler libprotobuf-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl -sL https://deb.nodesource.com/setup_6.x | sh -
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs npm && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN npm install -g postcss-cli autoprefixer
ENV HUGO_VERSION=v0.59.1
ENV HUGO_VERSION=v0.72.0
RUN git clone https://github.com/gohugoio/hugo.git --branch ${HUGO_VERSION} --depth 1 && \
cd hugo && go install --tags extended && cd ../ && \
rm -rf hugo/ && rm -rf /go/pkg /go/src
RUN curl -fsSLo shfmt https://github.com/mvdan/sh/releases/download/v1.3.0/shfmt_v1.3.0_linux_amd64 && \
echo "b1925c2c405458811f0c227266402cf1868b4de529f114722c2e3a5af4ac7bb2 shfmt" | sha256sum -c && \
ENV SHFMT_VERSION=3.1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who does use/need shfmt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will test and send another PR. Don't want to block this.

RUN curl -fsSLo shfmt https://github.com/mvdan/sh/releases/download/v${SHFMT_VERSION}/shfmt_v${SHFMT_VERSION}_linux_amd64 && \
echo "cb91ea08a075a2f96b5230f09b4e211b7c108b1c97603caceb48d117d2ac5508 shfmt" | sha256sum -c && \
chmod +x shfmt && \
mv shfmt /usr/bin
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.21.0
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.27.0
RUN GO111MODULE=on go get -tags netgo \
github.com/client9/misspell/cmd/[email protected] \
github.com/golang/protobuf/[email protected] \
github.com/gogo/protobuf/[email protected] \
github.com/gogo/protobuf/[email protected] && \
rm -rf /go/pkg /go/src

ENV KUBEVAL_VERSION=0.14.0
ENV KUBEVAL_VERSION=0.15.0
RUN curl -Ls https://github.com/instrumenta/kubeval/releases/download/${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz -o /tmp/kubeval-linux-amd64.tar.gz && \
tar -xf /tmp/kubeval-linux-amd64.tar.gz -C /tmp && \
cp /tmp/kubeval /usr/local/bin && \
Expand All @@ -32,7 +33,7 @@ ENV GOCACHE=/go/cache
ENTRYPOINT ["/build.sh"]

# Install faillint used to lint go imports in CI.
ENV FAILLINT_VERSION=1.2.0
ENV FAILLINT_VERSION=1.5.0
RUN GO111MODULE=on go get github.com/fatih/faillint@v${FAILLINT_VERSION} && \
rm -rf /go/pkg /go/src

Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ require (
github.com/thanos-io/thanos v0.12.3-0.20200603113103-6d3e730e154d
github.com/uber/jaeger-client-go v2.23.1+incompatible
github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5
go.etcd.io/bbolt v1.3.4
go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50
go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f
go.uber.org/atomic v1.6.0
go.uber.org/zap v1.14.1 // indirect
golang.org/x/net v0.0.0-20200602114024-627f9648deb9
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 // indirect
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
google.golang.org/api v0.26.0
google.golang.org/grpc v1.29.1
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1089,8 +1089,8 @@ go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3
go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE=
go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg=
go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50 h1:ASw9n1EHMftwnP3Az4XW6e308+gNsrHzmdhd0Olz9Hs=
go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/etcd v0.0.0-20190709142735-eb7dd97135a5/go.mod h1:N0RPWo9FXJYZQI4BTkDtQylrstIigYHeR18ONnyTufk=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f h1:pBCD+Z7cy5WPTq+R6MmJJvDRpn88cp7bmTypBsn91g4=
Expand Down Expand Up @@ -1313,6 +1313,8 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f h1:gWF768j/LaZugp8dyS4UwsslY
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
2 changes: 1 addition & 1 deletion pkg/alertmanager/multitenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ func (am *MultitenantAlertmanager) ServeHTTP(w http.ResponseWriter, req *http.Re
am.alertmanagersMtx.Unlock()

if !ok || !userAM.IsActive() {
http.Error(w, fmt.Sprintf("no Alertmanager for this user ID"), http.StatusNotFound)
http.Error(w, "no Alertmanager for this user ID", http.StatusNotFound)
return
}
userAM.mux.ServeHTTP(w, req)
Expand Down
6 changes: 3 additions & 3 deletions tools/query-audit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ func Run(conf Config) error {
return err
}

fmt.Println(fmt.Sprintf(
"\n%f%% avg diff for:\n\tquery: %s\n\tseries: %d\n\tsamples: %d\n\tstart: %v\n\tend: %v\n\tstep: %v",
fmt.Printf(
"\n%f%% avg diff for:\n\tquery: %s\n\tseries: %d\n\tsamples: %d\n\tstart: %v\n\tend: %v\n\tstep: %v\n",
diff.Diff*100,
query.Query,
diff.Series,
len(diff.sampleDiffs),
query.Start,
query.End,
query.StepSize,
))
)

}
return nil
Expand Down
11 changes: 6 additions & 5 deletions vendor/go.etcd.io/bbolt/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 24 additions & 33 deletions vendor/go.etcd.io/bbolt/freelist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 10 additions & 15 deletions vendor/go.etcd.io/bbolt/node.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading