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

Move to Go 1.22.0 #124

Merged
merged 3 commits into from
Feb 19, 2024
Merged

Move to Go 1.22.0 #124

merged 3 commits into from
Feb 19, 2024

Conversation

cipherboy
Copy link
Member

This moves from Go 1.20 to 1.21 to follow the latest toolchain release.

Resolves: #120

@Gabrielopesantos
Copy link
Contributor

Gabrielopesantos commented Feb 7, 2024

What about updating the go version in go.mod, is it not necessary?
EDIT: Read the comments above the version definition and it explains why you didn't update it.

@cipherboy
Copy link
Member Author

Nah, this is a good point, the comment in go.mod does suggest we should probably bump it. I'm going to rework this PR for 1.22 since that was just released as well.

@cipherboy cipherboy changed the title Move to Go 1.21.6 Move to Go 1.22.0 Feb 8, 2024
@cipherboy cipherboy force-pushed the bump-go-1.21.6 branch 3 times, most recently from 5b321a5 to 7ccb64f Compare February 10, 2024 03:51
@cipherboy
Copy link
Member Author

@naphelps I'm happy with this one based on more testing I've done locally. I've switched to it as my primary toolchain now.

This moves from Go 1.20 to 1.22 to follow the latest toolchain release.

Resolves: openbao#120

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
Without this change, radius tests would fail with an error like:

> --- FAIL: TestBackend_acceptance (5.66s)
> panic: runtime error: slice bounds out of range [:16] with capacity 4 [recovered]
> 	panic: runtime error: slice bounds out of range [:16] with capacity 4
>
> goroutine 1608 [running]:
> testing.tRunner.func1.2({0x2a70260, 0xc001302168})
> 	/usr/local/go/src/testing/testing.go:1631 +0x24a
> testing.tRunner.func1()
> 	/usr/local/go/src/testing/testing.go:1634 +0x377
> panic({0x2a70260?, 0xc001302168?})
> 	/usr/local/go/src/runtime/panic.go:770 +0x132
> layeh.com/radius.NewUserPassword({0x2c6eb78, 0x4, 0x4}, {0xc000c6ca60, 0xa, 0x10}, {0xc0013015c9, 0x10, 0x10})
> 	/home/cipherboy/go/pkg/mod/layeh.com/radius@v0.0.0-20190322222518-890bc1058917/attribute.go:207 +0x525
> layeh.com/radius/rfc2865.UserPassword_SetString(0xc0013015c0, {0x2c6eb78?, 0x1?})
> 	/home/cipherboy/go/pkg/mod/layeh.com/radius@v0.0.0-20190322222518-890bc1058917/rfc2865/generated.go:248 +0x5c
> github.com/openbao/openbao/builtin/credential/radius.(*backend).RadiusLogin(0xc0009c8498, {0x34531d0, 0xc00132c1e0}, 0xc0013221c0, {0xc001302117, 0x4}, {0x2c6eb78, 0x4})

Notably, this was a few commits behind the latest master branch upstream
for layeh.com/radius: a subsequent commit fixed this. However, note that
the latest commit upstream (1006025) seems to have some discussion as to
correctness, so the previous commit has been chosen instead.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
This occasionally fails with the following:

--- FAIL: TestAgent_Template_Basic (20.23s)
    --- FAIL: TestAgent_Template_Basic/many_with_exit (10.02s)
        agent_test.go:874: timed out waiting for templates to render, last error: expected (13) templates, got (12)

Usually this goes away when running the test individually (or the
only running the package's tests); however, when running multiple test
packages are part of `make test`, this test flakes.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
@naphelps naphelps merged commit 3438373 into openbao:main Feb 19, 2024
3 of 10 checks passed
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.

Fork - Update Go version
3 participants