Skip to content

Commit da8c0b9

Browse files
authored
go1.20.5 build image (#762)
* go1.20.5 build image * give up on depguard. golangci/golangci-lint#3877 * make linters happy
1 parent 7eb5747 commit da8c0b9

11 files changed

+18
-25
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defaultEnv:
88
&defaultEnv
99
docker:
1010
# specify the version
11-
- image: docker.io/fortio/fortio.build:v58@sha256:84ab73744546c1b27e2f08143e2c080114c4f1864f760b9fca3908683259d3c4
11+
- image: docker.io/fortio/fortio.build:v59@sha256:735db577fe940063725cdac8dd2723875f147434f266cbdf0e6970b4fd9b1a07
1212
working_directory: /build/fortio
1313

1414
jobs:

.golangci.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ linters-settings:
4545
- (github.com/golangci/golangci-lint/pkg/logutils.Log).FErrf
4646
enable-all: true
4747
disable-all: false
48-
depguard:
49-
list-type: blacklist
50-
include-go-root: false
51-
packages:
52-
- github.com/sirupsen/logrus
53-
packages-with-error-message:
54-
# specify an error message to output when a blacklisted package is used
55-
- github.com/sirupsen/logrus: "logging is allowed only by fortio.log"
5648
lll:
5749
# max line length, lines longer will be reported. Default is 120.
5850
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
@@ -115,6 +107,7 @@ linters:
115107
- cyclop
116108
- forcetypeassert
117109
- ireturn
110+
- depguard
118111
enable-all: true
119112
disable-all: false
120113
# Must not use fast: true in newer golangci-lint or it'll just skip a bunch of linter instead of doing caching like before (!)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the binaries in larger image
2-
FROM docker.io/fortio/fortio.build:v58@sha256:84ab73744546c1b27e2f08143e2c080114c4f1864f760b9fca3908683259d3c4 as build
2+
FROM docker.io/fortio/fortio.build:v59@sha256:735db577fe940063725cdac8dd2723875f147434f266cbdf0e6970b4fd9b1a07 as build
33
WORKDIR /build
44
COPY --chown=build:build . fortio
55
ARG MODE=install

Dockerfile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Dependencies and linters for build:
2-
FROM golang:1.20.4@sha256:6dd5c5f8936d7d4487802fb10a77f31b1776740be0fc17ada1acb74ac958f7be
2+
FROM golang:1.20.5@sha256:4b1fc02d16fca272e5e6e6adc98396219b43ef663a377eef4a97e881d364393f
33
# Need gcc for -race test (and some linters though those work with CGO_ENABLED=0)
44
RUN apt-get -y update && \
55
apt-get --no-install-recommends -y upgrade && \

Dockerfile.echosrv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the binaries in larger image
2-
FROM docker.io/fortio/fortio.build:v58@sha256:84ab73744546c1b27e2f08143e2c080114c4f1864f760b9fca3908683259d3c4 as build
2+
FROM docker.io/fortio/fortio.build:v59@sha256:735db577fe940063725cdac8dd2723875f147434f266cbdf0e6970b4fd9b1a07 as build
33
WORKDIR /build
44
COPY . fortio
55
RUN make -C fortio official-build-version BUILD_DIR=/build OFFICIAL_TARGET=fortio.org/fortio/echosrv

Dockerfile.fcurl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the binaries in larger image
2-
FROM docker.io/fortio/fortio.build:v58@sha256:84ab73744546c1b27e2f08143e2c080114c4f1864f760b9fca3908683259d3c4 as build
2+
FROM docker.io/fortio/fortio.build:v59@sha256:735db577fe940063725cdac8dd2723875f147434f266cbdf0e6970b4fd9b1a07 as build
33
WORKDIR /build
44
COPY . fortio
55
RUN make -C fortio official-build-version BUILD_DIR=/build OFFICIAL_TARGET=fortio.org/fortio/fcurl

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
IMAGES=echosrv fcurl # plus the combo image / Dockerfile without ext.
88

99
DOCKER_PREFIX := docker.io/fortio/fortio
10-
BUILD_IMAGE_TAG := v58@sha256:84ab73744546c1b27e2f08143e2c080114c4f1864f760b9fca3908683259d3c4
10+
BUILD_IMAGE_TAG := v59@sha256:735db577fe940063725cdac8dd2723875f147434f266cbdf0e6970b4fd9b1a07
1111
BUILDX_PLATFORMS := linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
1212
BUILDX_POSTFIX :=
1313
ifeq '$(shell echo $(BUILDX_PLATFORMS) | awk -F "," "{print NF-1}")' '0'

Webtest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ fi
140140
PPROF_URL="$BASE_URL/debug/pprof/heap?debug=1"
141141
$CURL "$PPROF_URL" | grep -i TotalAlloc # should find this in memory profile
142142
# creating dummy container to hold a volume for test certs due to remote docker bind mount limitation.
143-
DOCKERCURLID=$(docker run -d -v $TEST_CERT_VOL --net host --name $DOCKERSECVOLNAME docker.io/fortio/fortio.build:v58@sha256:84ab73744546c1b27e2f08143e2c080114c4f1864f760b9fca3908683259d3c4 sleep 120)
143+
DOCKERCURLID=$(docker run -d -v $TEST_CERT_VOL --net host --name $DOCKERSECVOLNAME docker.io/fortio/fortio.build:v59@sha256:735db577fe940063725cdac8dd2723875f147434f266cbdf0e6970b4fd9b1a07 sleep 120)
144144
# while we have something with actual curl binary do
145145
# Test for h2c upgrade (#562)
146146
docker exec $DOCKERSECVOLNAME /usr/bin/curl -v --http2 -m 10 -d foo42 http://localhost:8080/debug | tee >(cat 1>&2) | grep foo42

periodic/periodic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ func (r *periodicRunner) runQPSSetup(extra string) (requestedDuration string, re
404404
// Always print that as we need ^C to interrupt, in that case the user need to notice
405405
_, _ = fmt.Fprintf(r.Out, "Starting at %g qps with %d thread(s) [gomax %d] until interrupted%s\n",
406406
r.QPS, r.NumThreads, runtime.GOMAXPROCS(0), extra)
407-
return
407+
return //nolint:nakedret // it's fine/cleaner to not repeat all the parameters we just set/we return.
408408
}
409409
// else:
410410
requestedDuration = fmt.Sprint(r.Duration)

rapi/data.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func SendTSVDataIndex(urlPrefix string, w http.ResponseWriter) {
8080
useCache := (info.ModTime() == gTSVCache.cachedDirTime) && (len(gTSVCache.cachedResult) > 0)
8181
if !useCache {
8282
var b bytes.Buffer
83-
b.Write([]byte("TsvHttpData-1.0\n"))
83+
b.WriteString("TsvHttpData-1.0\n")
8484
for _, e := range DataList() {
8585
fname := e + ".json"
8686
f, err := os.Open(path.Join(dataDir, fname))
@@ -96,13 +96,13 @@ func SendTSVDataIndex(urlPrefix string, w http.ResponseWriter) {
9696
log.Errf("Copy/read error for %s: %v", fname, err)
9797
continue
9898
}
99-
b.Write([]byte(urlPrefix))
100-
b.Write([]byte(fname))
101-
b.Write([]byte("\t"))
102-
b.Write([]byte(strconv.FormatInt(sz, 10)))
103-
b.Write([]byte("\t"))
104-
b.Write([]byte(base64.StdEncoding.EncodeToString(h.Sum(nil))))
105-
b.Write([]byte("\n"))
99+
b.WriteString(urlPrefix)
100+
b.WriteString(fname)
101+
b.WriteString("\t")
102+
b.WriteString(strconv.FormatInt(sz, 10))
103+
b.WriteString("\t")
104+
b.WriteString(base64.StdEncoding.EncodeToString(h.Sum(nil)))
105+
b.WriteString("\n")
106106
}
107107
gTSVCache.cachedDirTime = info.ModTime()
108108
gTSVCache.cachedResult = b.Bytes()

release/Dockerfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Concatenated after ../Dockerfile to create the tgz
2-
FROM docker.io/fortio/fortio.build:v58@sha256:84ab73744546c1b27e2f08143e2c080114c4f1864f760b9fca3908683259d3c4 as stage
2+
FROM docker.io/fortio/fortio.build:v59@sha256:735db577fe940063725cdac8dd2723875f147434f266cbdf0e6970b4fd9b1a07 as stage
33
ARG archs="amd64 arm64 ppc64le s390x"
44
ENV archs=${archs}
55
# Build image defaults to build user, switch back to root for

0 commit comments

Comments
 (0)