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

Add Go 1.23 support, bump to Go 1.22.6, drop Go 1.21 support #199

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

ginglis13
Copy link
Contributor

@ginglis13 ginglis13 commented Aug 13, 2024

Issue number:

Closes #198

Description of changes:

Go 1.23.0 and 1.22.6 have been released. Following the Go release policy, drop support for Go 1.21. Set the default Go major version to 1.23

There is now a minor diff between patches/go-1.22/0002-Always-restrict-boringcrypto-crypto-tls-to-FIPS.patch and patches/go-1.23/0002-Always-restrict-boringcrypto-crypto-tls-to-FIPS.patch as the import statement for go/src/crypto/tls/boring.go was moved to one line.

Testing done:

  • Build SDK x86_64
  • Build SDK aarch64
  • Build Bottlerocket aarch64 on x86_64
  • Build Bottlerocket aarch64 on aarch64
  • Build Bottlerocket x86_64 on x86_64
  • Build Bottlerocket x86_64 on aarch64

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Signed-off-by: Gavin Inglis <giinglis@amazon.com>
@ginglis13
Copy link
Contributor Author

^ force push adjusts patches/go-1.23/0002-Always-restrict-boringcrypto-crypto-tls-to-FIPS.patch to retain bcressey's credits

@ginglis13
Copy link
Contributor Author

Smoke testing complete and ready for review

@ginglis13 ginglis13 marked this pull request as ready for review August 14, 2024 20:05
@ginglis13
Copy link
Contributor Author

I notice in the release notes https://go.dev/doc/go1.23

Setting the GOROOT_FINAL environment variable no longer has an effect (#62047). Distributions that install the go command to a location other than $GOROOT/bin/go should install a symlink instead of relocating or copying the go binary.

We set that here:

export GOROOT_FINAL="/usr/libexec/go-${GOVER}"

But I do have go 1.23.0 installed

docker run public.ecr.aws/o7o0w6s5/thar-be-a-beta-sdk:v0.44.0 go version
go version go1.23.0 linux/arm64

and it does exist under /usr/libexec:

docker run public.ecr.aws/o7o0w6s5/thar-be-a-beta-sdk:v0.44.0 ls /usr/libexec
...
go-1.22
go-1.23
...

This is likely because the go provided by fedora:39, our base image, is still go 1.22.5:

$ docker run public.ecr.aws/docker/library/fedora:39 dnf -y install go && go version
...
Complete!
go version go1.22.5 linux/arm6

I created an issue to track this, since we might be burned by this when (if?) fedora:39 updates to go 1.23.x: #200

@ginglis13 ginglis13 merged commit 6b0525c into bottlerocket-os:develop Aug 15, 2024
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.

Update to Go Version 1.23
3 participants