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 to Go 1.21. #390

Merged
merged 4 commits into from
Oct 17, 2023
Merged

Update to Go 1.21. #390

merged 4 commits into from
Oct 17, 2023

Conversation

sengi
Copy link
Contributor

@sengi sengi commented Aug 22, 2023

  • Build container image with Go 1.21.
  • Raise minimum Go version to 1.21 and update all the dependencies.
  • Silence a false positive from recent versions of the gosec linter.

Tested: go test all passes (except for a couple of third-party tests in globalsign/mgo that have been broken since forever)

go test all output
ok  	bufio	(cached)
ok  	bytes	(cached)
ok  	compress/flate	(cached)
ok  	compress/gzip	(cached)
ok  	container/list	(cached)
ok  	container/ring	(cached)
ok  	context	(cached)
ok  	crypto	(cached)
ok  	crypto/aes	(cached)
ok  	crypto/cipher	(cached)
ok  	crypto/des	(cached)
ok  	crypto/dsa	(cached)
ok  	crypto/ecdh	(cached)
?   	crypto/internal/boring/bbig	[no test files]
ok  	crypto/ecdsa	(cached)
ok  	crypto/ed25519	(cached)
ok  	crypto/elliptic	(cached)
ok  	crypto/hmac	(cached)
?   	crypto/internal/boring/sig	[no test files]
ok  	crypto/internal/alias	(cached)
ok  	crypto/internal/bigmod	(cached)
ok  	crypto/internal/boring	(cached)
ok  	crypto/internal/edwards25519	(cached)
ok  	crypto/internal/edwards25519/field	(cached)
?   	crypto/internal/randutil	[no test files]
ok  	crypto/internal/nistec	(cached)
ok  	crypto/internal/nistec/fiat	(cached) [no tests to run]
ok  	crypto/md5	(cached)
ok  	crypto/rand	(cached)
ok  	crypto/rc4	(cached)
ok  	crypto/rsa	(cached)
ok  	crypto/sha1	(cached)
ok  	crypto/sha256	(cached)
ok  	crypto/sha512	(cached)
ok  	crypto/subtle	(cached)
?   	crypto/x509/internal/macos	[no test files]
?   	crypto/x509/pkix	[no test files]
?   	encoding	[no test files]
ok  	crypto/tls	(cached)
ok  	crypto/x509	(cached)
ok  	embed	(cached) [no tests to run]
ok  	encoding/asn1	(cached)
ok  	encoding/base64	(cached)
ok  	encoding/binary	(cached)
ok  	encoding/csv	(cached)
ok  	encoding/gob	(cached)
ok  	encoding/hex	(cached)
ok  	encoding/json	(cached)
ok  	encoding/pem	(cached)
ok  	encoding/xml	(cached)
ok  	errors	(cached)
ok  	expvar	(cached)
ok  	flag	(cached)
ok  	fmt	(cached)
# github.com/globalsign/mgo
vendor/github.com/globalsign/mgo/gridfs.go:681:2: github.com/globalsign/mgo.debugf format %s has arg offset of wrong type int64
vendor/github.com/globalsign/mgo/session.go:3888:4: github.com/globalsign/mgo.debugf call needs 1 arg but has 2 args
?   	github.com/alphagov/router	[no test files]
?   	github.com/alphagov/router/logger	[no test files]
?   	github.com/beorn7/perks/quantile	[no test files]
?   	github.com/cespare/xxhash/v2	[no test files]
?   	github.com/davecgh/go-spew/spew	[no test files]
?   	github.com/getsentry/sentry-go	[no test files]
?   	github.com/getsentry/sentry-go/internal/debug	[no test files]
?   	github.com/getsentry/sentry-go/internal/otel/baggage	[no test files]
?   	github.com/getsentry/sentry-go/internal/otel/baggage/internal/baggage	[no test files]
?   	github.com/getsentry/sentry-go/internal/ratelimit	[no test files]
?   	github.com/getsentry/sentry-go/internal/traceparser	[no test files]
?   	github.com/globalsign/mgo/bson	[no test files]
?   	github.com/globalsign/mgo/internal/json	[no test files]
?   	github.com/globalsign/mgo/internal/scram	[no test files]
?   	github.com/go-logr/logr	[no test files]
?   	github.com/go-logr/logr/funcr	[no test files]
?   	github.com/golang/protobuf/proto	[no test files]
?   	github.com/google/go-cmp/cmp	[no test files]
?   	github.com/google/go-cmp/cmp/internal/diff	[no test files]
?   	github.com/google/go-cmp/cmp/internal/flags	[no test files]
?   	github.com/google/go-cmp/cmp/internal/function	[no test files]
?   	github.com/google/go-cmp/cmp/internal/value	[no test files]
?   	github.com/influxdata/tdigest	[no test files]
?   	github.com/josharian/intern	[no test files]
?   	github.com/mailru/easyjson	[no test files]
?   	github.com/mailru/easyjson/buffer	[no test files]
?   	github.com/mailru/easyjson/jlexer	[no test files]
?   	github.com/mailru/easyjson/jwriter	[no test files]
?   	github.com/matttproud/golang_protobuf_extensions/pbutil	[no test files]
?   	github.com/onsi/ginkgo/v2	[no test files]
?   	github.com/onsi/ginkgo/v2/config	[no test files]
?   	github.com/onsi/ginkgo/v2/formatter	[no test files]
?   	github.com/onsi/ginkgo/v2/internal	[no test files]
?   	github.com/onsi/ginkgo/v2/internal/global	[no test files]
?   	github.com/onsi/ginkgo/v2/internal/interrupt_handler	[no test files]
?   	github.com/onsi/gomega/internal	[no test files]
?   	github.com/onsi/gomega/internal/gutil	[no test files]
?   	github.com/onsi/gomega/matchers	[no test files]
?   	github.com/onsi/gomega/matchers/support/goraph/bipartitegraph	[no test files]
?   	github.com/onsi/gomega/matchers/support/goraph/edge	[no test files]
?   	github.com/onsi/gomega/matchers/support/goraph/node	[no test files]
?   	github.com/onsi/gomega/matchers/support/goraph/util	[no test files]
?   	github.com/onsi/ginkgo/v2/types	[no test files]
?   	github.com/onsi/gomega/types	[no test files]
?   	github.com/prometheus/client_golang/prometheus	[no test files]
?   	github.com/prometheus/client_golang/prometheus/promhttp	[no test files]
?   	github.com/prometheus/client_golang/prometheus/testutil	[no test files]
?   	github.com/prometheus/client_golang/prometheus/testutil/promlint	[no test files]
?   	github.com/prometheus/client_golang/prometheus/internal	[no test files]
?   	github.com/prometheus/common/expfmt	[no test files]
?   	github.com/onsi/ginkgo/v2/internal/parallel_support	[no test files]
?   	github.com/onsi/ginkgo/v2/reporters	[no test files]
?   	github.com/prometheus/client_model/go	[no test files]
?   	github.com/onsi/ginkgo/v2/internal/testingtproxy	[no test files]
?   	github.com/onsi/gomega/ghttp	[no test files]
?   	github.com/prometheus/common/model	[no test files]
?   	github.com/prometheus/procfs	[no test files]
?   	github.com/prometheus/procfs/internal/fs	[no test files]
?   	github.com/onsi/gomega/format	[no test files]
?   	github.com/onsi/gomega	[no test files]
?   	github.com/prometheus/procfs/internal/util	[no test files]
?   	github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg	[no test files]
?   	github.com/tsenart/vegeta/v12/lib	[no test files]
?   	github.com/rs/dnscache	[no test files]
?   	go/internal/typeparams	[no test files]
?   	golang.org/x/net/context	[no test files]
?   	golang.org/x/net/html	[no test files]
?   	golang.org/x/net/html/atom	[no test files]
?   	golang.org/x/net/html/charset	[no test files]
?   	golang.org/x/net/http/httpguts	[no test files]
?   	golang.org/x/net/http2	[no test files]
?   	golang.org/x/net/http2/hpack	[no test files]
?   	golang.org/x/net/idna	[no test files]
?   	golang.org/x/sync/singleflight	[no test files]
?   	golang.org/x/sys/execabs	[no test files]
?   	golang.org/x/sys/unix	[no test files]
?   	golang.org/x/text/cases	[no test files]
?   	golang.org/x/text/encoding	[no test files]
?   	golang.org/x/text/encoding/charmap	[no test files]
?   	golang.org/x/text/encoding/htmlindex	[no test files]
?   	golang.org/x/text/encoding/internal	[no test files]
?   	golang.org/x/text/encoding/internal/identifier	[no test files]
?   	golang.org/x/text/encoding/japanese	[no test files]
?   	golang.org/x/text/encoding/korean	[no test files]
?   	golang.org/x/text/encoding/simplifiedchinese	[no test files]
?   	golang.org/x/text/encoding/traditionalchinese	[no test files]
?   	golang.org/x/text/encoding/unicode	[no test files]
?   	golang.org/x/text/internal	[no test files]
?   	golang.org/x/text/internal/language	[no test files]
?   	golang.org/x/text/internal/language/compact	[no test files]
?   	golang.org/x/text/internal/tag	[no test files]
?   	golang.org/x/text/internal/utf8internal	[no test files]
?   	golang.org/x/text/language	[no test files]
?   	golang.org/x/text/runes	[no test files]
?   	golang.org/x/text/secure/bidirule	[no test files]
?   	golang.org/x/text/transform	[no test files]
?   	golang.org/x/text/unicode/bidi	[no test files]
?   	golang.org/x/text/unicode/norm	[no test files]
?   	google.golang.org/protobuf/encoding/prototext	[no test files]
?   	google.golang.org/protobuf/internal/encoding/defval	[no test files]
?   	google.golang.org/protobuf/internal/encoding/messageset	[no test files]
?   	google.golang.org/protobuf/internal/encoding/tag	[no test files]
?   	google.golang.org/protobuf/internal/encoding/text	[no test files]
?   	google.golang.org/protobuf/internal/errors	[no test files]
?   	google.golang.org/protobuf/internal/descopts	[no test files]
?   	google.golang.org/protobuf/internal/filetype	[no test files]
?   	google.golang.org/protobuf/internal/flags	[no test files]
?   	google.golang.org/protobuf/internal/genid	[no test files]
?   	google.golang.org/protobuf/internal/detrand	[no test files]
?   	google.golang.org/protobuf/internal/impl	[no test files]
?   	google.golang.org/protobuf/internal/set	[no test files]
?   	google.golang.org/protobuf/internal/strs	[no test files]
?   	google.golang.org/protobuf/internal/version	[no test files]
?   	google.golang.org/protobuf/proto	[no test files]
?   	google.golang.org/protobuf/encoding/protowire	[no test files]
?   	google.golang.org/protobuf/reflect/protodesc	[no test files]
?   	google.golang.org/protobuf/internal/order	[no test files]
?   	google.golang.org/protobuf/reflect/protoreflect	[no test files]
?   	google.golang.org/protobuf/internal/descfmt	[no test files]
?   	google.golang.org/protobuf/internal/pragma	[no test files]
?   	google.golang.org/protobuf/reflect/protoregistry	[no test files]
?   	google.golang.org/protobuf/runtime/protoiface	[no test files]
?   	google.golang.org/protobuf/internal/filedesc	[no test files]
?   	google.golang.org/protobuf/runtime/protoimpl	[no test files]
?   	google.golang.org/protobuf/types/descriptorpb	[no test files]
?   	google.golang.org/protobuf/types/known/timestamppb	[no test files]
?   	gopkg.in/yaml.v3	[no test files]
?   	internal/bisect	[no test files]
?   	internal/bytealg	[no test files]
?   	internal/coverage/rtcov	[no test files]
?   	internal/goarch	[no test files]
?   	internal/goexperiment	[no test files]
?   	internal/goos	[no test files]
?   	internal/goroot	[no test files]
?   	internal/goversion	[no test files]
?   	internal/lazyregexp	[no test files]
?   	internal/nettrace	[no test files]
?   	internal/oserror	[no test files]
?   	internal/race	[no test files]
?   	internal/syscall/execenv	[no test files]
?   	internal/syscall/unix	[no test files]
?   	internal/sysinfo	[no test files]
?   	internal/testlog	[no test files]
?   	log/internal	[no test files]
?   	net/http/internal/testcert	[no test files]
?   	unsafe	[no test files]
?   	vendor/golang.org/x/crypto/chacha20	[no test files]
?   	vendor/golang.org/x/crypto/chacha20poly1305	[no test files]
?   	vendor/golang.org/x/crypto/cryptobyte	[no test files]
?   	vendor/golang.org/x/crypto/cryptobyte/asn1	[no test files]
?   	vendor/golang.org/x/crypto/hkdf	[no test files]
?   	vendor/golang.org/x/crypto/internal/alias	[no test files]
?   	vendor/golang.org/x/crypto/internal/poly1305	[no test files]
?   	vendor/golang.org/x/net/dns/dnsmessage	[no test files]
?   	vendor/golang.org/x/net/http/httpguts	[no test files]
?   	vendor/golang.org/x/net/http/httpproxy	[no test files]
?   	vendor/golang.org/x/net/idna	[no test files]
?   	vendor/golang.org/x/net/http2/hpack	[no test files]
?   	vendor/golang.org/x/net/route	[no test files]
?   	vendor/golang.org/x/text/secure/bidirule	[no test files]
?   	vendor/golang.org/x/text/unicode/bidi	[no test files]
?   	vendor/golang.org/x/text/unicode/norm	[no test files]
?   	vendor/golang.org/x/text/transform	[no test files]
ok  	github.com/alphagov/router/handlers	10.777s
ok  	github.com/alphagov/router/integration_tests	72.213s
ok  	github.com/alphagov/router/lib	(cached)
ok  	github.com/alphagov/router/trie	(cached)
ok  	github.com/alphagov/router/triemux	(cached)
ok  	go/ast	(cached)
ok  	go/build	(cached)
ok  	go/build/constraint	(cached)
ok  	go/doc	(cached)
ok  	go/doc/comment	(cached)
ok  	go/parser	(cached)
ok  	go/scanner	(cached)
ok  	go/token	(cached)
ok  	hash	(cached)
ok  	hash/crc32	(cached)
ok  	hash/fnv	(cached)
ok  	html	(cached)
ok  	html/template	(cached)
ok  	internal/abi	(cached)
ok  	internal/buildcfg	(cached)
ok  	internal/cpu	(cached)
ok  	internal/fmtsort	(cached)
ok  	internal/godebug	(cached)
ok  	internal/godebugs	(cached)
ok  	internal/intern	(cached)
ok  	internal/itoa	(cached)
ok  	internal/platform	(cached)
ok  	internal/poll	(cached)
ok  	internal/reflectlite	(cached)
ok  	internal/safefilepath	(cached)
ok  	internal/saferio	(cached)
ok  	internal/singleflight	(cached)
ok  	internal/unsafeheader	(cached)
ok  	io	(cached)
ok  	io/fs	(cached)
ok  	io/ioutil	(cached)
ok  	log	(cached)
ok  	math	(cached)
ok  	math/big	(cached)
ok  	math/bits	(cached)
ok  	math/rand	(cached)
ok  	mime	(cached)
ok  	mime/multipart	(cached)
ok  	mime/quotedprintable	(cached)
ok  	net	(cached)
ok  	net/http	(cached)
ok  	net/http/httptest	(cached)
ok  	net/http/httptrace	(cached)
ok  	net/http/httputil	(cached)
ok  	net/http/internal	(cached)
ok  	net/http/internal/ascii	(cached)
ok  	net/netip	(cached)
ok  	net/rpc	(cached)
ok  	net/textproto	(cached)
ok  	net/url	(cached)
ok  	os	17.063s
ok  	os/exec	(cached)
ok  	os/signal	(cached)
ok  	path	(cached)
ok  	path/filepath	(cached)
ok  	reflect	(cached)
ok  	regexp	(cached)
ok  	regexp/syntax	(cached)
ok  	runtime	(cached)
ok  	runtime/debug	(cached)
ok  	runtime/internal/atomic	(cached)
ok  	runtime/internal/math	(cached)
ok  	runtime/internal/sys	(cached)
ok  	runtime/metrics	(cached)
ok  	runtime/trace	(cached)
ok  	sort	(cached)
ok  	strconv	(cached)
ok  	strings	(cached)
ok  	sync	(cached)
ok  	sync/atomic	(cached)
ok  	syscall	(cached)
ok  	testing	(cached)
ok  	text/tabwriter	(cached)
ok  	text/template	(cached)
ok  	text/template/parse	(cached)
ok  	time	(cached)
ok  	unicode	(cached)
ok  	unicode/utf16	(cached)
ok  	unicode/utf8	(cached)
FAIL

Tested: `go test all` passes (ignoring a couple of already-broken tests in mgo)
Copy link
Contributor

@ChrisBAshton ChrisBAshton left a comment

Choose a reason for hiding this comment

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

LGTM 👍 one nitpick below

lib/router.go Show resolved Hide resolved
@sengi sengi merged commit 07ba9e7 into main Oct 17, 2023
4 checks passed
@sengi sengi deleted the sengi/go-1.21 branch October 17, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants