-
Notifications
You must be signed in to change notification settings - Fork 131
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
ci: bump setup-go and golangci-lint actions #981
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThis pull request updates several GitHub Actions workflows used in the CI/CD pipelines for various Go projects. The changes primarily consist of upgrading the Go setup action from version v4 to v5, updating the Go version from 1.22 to 1.24, and revising the linting tool by upgrading the Changes
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (8)
🚧 Files skipped from review as they are similar to previous changes (6)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
671f4cc
to
dafb1bf
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
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.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.
Actionable comments posted: 7
🛑 Comments failed to post (7)
.github/workflows/go-mod-tidy.yml (2)
9-12: 💡 Codebase verification
Update
actions/checkout
to v4 for consistencyThe repository already uses
actions/checkout@v4
in most workflow files. Update this workflow to maintain consistency across the codebase.Regarding
katexochen/go-tidy-check@v2
:
- It's compatible with the current Go version (1.22.5)
- No other workflows use this action, so there's no version inconsistency to address
🔗 Analysis chain
Consider updating other actions.
While updating the setup-go action, consider also reviewing:
actions/checkout@v3
->actions/checkout@v4
katexochen/go-tidy-check@v2
- verify compatibility with Go 1.23🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if other workflow files use newer versions of checkout action rg -l 'actions/checkout@v4' '.github/workflows/'Length of output: 417
Script:
#!/bin/bash # Check if go-tidy-check action is used in other workflow files and its version rg 'katexochen/go-tidy-check@' .github/workflows/ # Check Go version specified in go.mod cat go.mod | rg '^go 'Length of output: 160
11-11: 🛠️ Refactor suggestion
Consider specifying Go version explicitly.
Other workflow files in the repository specify Go 1.23. For consistency, consider adding the Go version here as well.
- - uses: actions/setup-go@v5 + - uses: actions/setup-go@v5 + with: + go-version: '1.23'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.- uses: actions/setup-go@v5 with: go-version: '1.23'
.github/workflows/shield.yml (1)
20-22:
⚠️ Potential issueGo version 1.23 is not yet released
While updating to
setup-go@v5
is good as it addresses the Node.js deprecation warning, Go 1.23 is not yet released. The latest stable version is Go 1.22.Apply this fix:
- uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.22"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.- uses: actions/setup-go@v5 with: go-version: "1.22"
.github/workflows/go-client.yml (1)
20-23:
⚠️ Potential issueFix: Invalid Go version specified
The Go version
1.23
does not exist yet. The latest stable version is1.22
. This will cause workflow failures.Apply this fix to both occurrences:
- go-version: "1.23" + go-version: "1.22"Also applies to: 35-37
.github/workflows/keychain-sdk.yml (1)
20-23:
⚠️ Potential issueGo version 1.23 is not yet released
While updating to
setup-go@v5
is good as it addresses the Node.js deprecation warning, specifying Go version 1.23 will cause CI failures as this version is not yet released. The latest stable version is Go 1.22.Apply this fix:
- uses: actions/setup-go@v5 with: - go-version: "1.23" + go-version: "1.22"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.- uses: actions/setup-go@v5 with: go-version: "1.22" cache: false
.github/workflows/wardenkms.yml (1)
26-26: 💡 Codebase verification
Go 1.23 upgrade needs attention to compatibility issues
The codebase currently requires Go 1.22.x (found in go.mod), and upgrading to 1.23 requires addressing:
http.PostForm
usage incmd/faucet-v2/main.go
should be reviewed as HTTP client behavior has changed in Go 1.23- The go.mod files specify Go 1.22.x versions, which need to be updated
Recommendation:
- Keep the current Go 1.22 version until proper testing with 1.23 can be performed
- Update go.mod files first before upgrading the workflow
🔗 Analysis chain
Verify Go 1.23 compatibility across the codebase.
The upgrade to Go 1.23 is significant as it's a very recent version. While updating is good practice, we should ensure compatibility.
Also applies to: 28-28, 41-41, 43-43
Let me check the specific usage of potentially deprecated features in the identified file to make a more informed decision.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for Go version constraints in go.mod files echo "Checking Go version requirements in go.mod files:" fd -t f "go.mod$" --exec cat {} \; | grep -A 1 "^go " # Look for potential compatibility issues echo -e "\nChecking for deprecated features or syntax that might be affected:" rg -l "(?i)(golang\.org/x/net/context|ioutil\.|http\.Get|http\.Post)"Length of output: 435
Script:
#!/bin/bash # Check the specific usage of deprecated features in the identified file echo "Checking deprecated feature usage in cmd/faucet-v2/main.go:" rg -A 5 "(golang\.org/x/net/context|ioutil\.|http\.Get|http\.Post)" cmd/faucet-v2/main.go # Also check for any Go version constraints in build tags or comments echo -e "\nChecking for version-specific build constraints:" rg "//\s*\+build\s+go" cmd/faucet-v2/main.goLength of output: 588
.github/workflows/wardend.yml (1)
30-32:
⚠️ Potential issueGo version 1.23 is not yet released
The specified Go version
1.23
is not yet released (current stable is 1.22). This will cause CI failures as the version cannot be installed.Apply this fix:
- go-version: "1.23" + go-version: "1.22"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.- uses: actions/setup-go@v5 with: go-version: "1.22"
dafb1bf
to
afe6d9f
Compare
Update to latest versions of Go (1.24) and golangci-lint in GitHub actions.
Summary by CodeRabbit