-
Notifications
You must be signed in to change notification settings - Fork 29
chore: bump go 1.24 #584
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
chore: bump go 1.24 #584
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Go version from 1.23 to 1.24.3 and adopts Go 1.24's new testing pattern by replacing context.Background() with t.Context() in test files. It also switches from the deprecated tenv linter to the newer usetesting linter that enforces this pattern.
- Updates Go version to 1.24.3 in go.mod
- Replaces context.Background() with t.Context() throughout test files
- Updates linter configuration to use usetesting instead of tenv
- Changes cmd.Printf to cmd.Println in version output
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| go.mod | Updates Go version from 1.23.8 to 1.24.3 and removes toolchain directive |
| .golangci.yml | Replaces deprecated tenv linter with usetesting linter |
| version/cmd.go | Changes Printf to Println for version output |
| Multiple test files | Replace context.Background() with t.Context() in test functions |
Comments suppressed due to low confidence (1)
go.mod:3
- Go version 1.24.3 does not exist. As of my knowledge cutoff in January 2025, the latest Go version is 1.23.x. Please verify the correct Go 1.24 version number.
go 1.24.3
| func TestRollupFinalityProviderLifeCycle(t *testing.T) { | ||
| t.Parallel() | ||
| ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) | ||
| ctx, cancel := context.WithCancel(t.Context()) |
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the context from WithTimeout to WithCancel, removing the 10-minute timeout that was previously set. This could cause tests to hang indefinitely if they don't complete normally.
| ctx, cancel := context.WithCancel(t.Context()) | |
| ctx, cancel := context.WithTimeout(t.Context(), 10*time.Minute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout of the test is handle by go test no need for timeout of 10m inside the test, antipatter. You are welcome for the lesson bot
| func TestBSNSkippingDoubleSignError(t *testing.T) { | ||
| t.Parallel() | ||
| ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) | ||
| ctx, cancel := context.WithCancel(t.Context()) |
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the context from WithTimeout to WithCancel, removing the 10-minute timeout that was previously set. This could cause tests to hang indefinitely if they don't complete normally.
| ctx, cancel := context.WithCancel(t.Context()) | |
| ctx, cancel := context.WithTimeout(t.Context(), 10*time.Minute) |
| func TestBSNDoubleSigning(t *testing.T) { | ||
| t.Parallel() | ||
| ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) | ||
| ctx, cancel := context.WithCancel(t.Context()) |
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the context from WithTimeout to WithCancel, removing the 10-minute timeout that was previously set. This could cause tests to hang indefinitely if they don't complete normally.
| ctx, cancel := context.WithCancel(t.Context()) | |
| ctx, cancel := context.WithTimeout(t.Context(), 10*time.Minute) |
| func TestRollupBSNCatchingUp(t *testing.T) { | ||
| t.Parallel() | ||
| ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) | ||
| ctx, cancel := context.WithCancel(t.Context()) |
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the context from WithTimeout to WithCancel, removing the 10-minute timeout that was previously set. This could cause tests to hang indefinitely if they don't complete normally.
| ctx, cancel := context.WithCancel(t.Context()) | |
| ctx, cancel := context.WithTimeout(t.Context(), 10*time.Minute) |
closes #585