-
Notifications
You must be signed in to change notification settings - Fork 54
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: upgrade golang version to 1.23 #2176
Conversation
Signed-off-by: Yang Chiu <[email protected]>
WalkthroughThe pull request updates the Dockerfile for the test framework by changing the base image from Changes
Poem
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
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
test_framework/Dockerfile.setup (2)
Line range hint
1-33
: Consider multi-stage build for smaller image sizeWhile not directly related to the Go version upgrade, consider implementing a multi-stage build to reduce the final image size. This would separate the build environment from the runtime environment.
Example structure:
# Build stage FROM golang:1.22-alpine3.19 AS builder # ... build steps ... # Final stage FROM alpine:3.19 COPY --from=builder /usr/local/bin/kubectl /usr/local/bin/kubectl # ... copy other binaries and set up runtime environment ...
Tool versions need updates - no version constraints found
The codebase search reveals no hard dependencies on the specific versions currently used in the Dockerfile. The only version reference found is an older kubectl version (v1.4.6) in a test fixture, which is not related to the current setup. Given that:
- All tools are significantly outdated
- No version-specific dependencies were found in the codebase
- The version gaps include major version updates that likely contain important security fixes and features
Recommend updating all tool versions to their latest stable releases:
- kubectl: Update to v1.31.0
- RKE: Update to v1.7.0
- Terraform: Update to v1.10.0
- yq: Update to v4.44.5
🔗 Analysis chain
Line range hint
1-33
: Verify tool compatibility with Go versionWhile the direct dependencies and tools remain unchanged, let's verify their compatibility with the Go environment:
- kubectl v1.30.0
- rke v1.3.4
- terraform 1.3.5
- yq v4.24.2
Tool versions are significantly outdated and need updates
The verification reveals significant version gaps in all tools:
- kubectl: v1.30.0 vs latest v1.31.0 (minor version behind)
- RKE: v1.3.4 vs latest v1.7.0 (major version behind)
- Terraform: 1.3.5 vs latest 1.10.0 (major version behind)
- yq: v4.24.2 vs latest v4.44.5 (many minor versions behind)
Let's verify if there are any version constraints in the codebase that require these specific versions.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if the specified tool versions are the latest stable versions # and verify their compatibility documentation # Check latest kubectl version LATEST_KUBECTL=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) echo "Current kubectl: v1.30.0" echo "Latest stable kubectl: $LATEST_KUBECTL" # Check latest RKE version LATEST_RKE=$(curl -s https://api.github.com/repos/rancher/rke/releases/latest | jq -r .tag_name) echo "Current RKE: v1.3.4" echo "Latest stable RKE: $LATEST_RKE" # Check latest Terraform version LATEST_TERRAFORM=$(curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | jq -r .tag_name | sed 's/v//') echo "Current Terraform: 1.3.5" echo "Latest stable Terraform: $LATEST_TERRAFORM" # Check latest yq version LATEST_YQ=$(curl -s https://api.github.com/repos/mikefarah/yq/releases/latest | jq -r .tag_name) echo "Current yq: v4.24.2" echo "Latest stable yq: $LATEST_YQ"Length of output: 935
Script:
#!/bin/bash # Search for version references in configuration files and documentation rg -g '!{.git,vendor}' -i "kubectl.*1\.30|rke.*1\.3\.4|terraform.*1\.3\.5|yq.*4\.24\.2" --type yaml --type md --type txt # Check for any version-specific test cases rg -g '!{.git,vendor}' -i "kubectl.*version|rke.*version|terraform.*version|yq.*version" --type go --type pyLength of output: 647
@@ -1,4 +1,4 @@ | |||
FROM golang:1.22-alpine3.19 | |||
FROM golang:1.23-alpine3.19 |
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.
Critical: Go 1.23 is not yet released
The base image golang:1.23-alpine3.19
references an unreleased version of Go. As of December 2024, Go 1.22 is the latest stable version. Using an unreleased version in a test framework could lead to:
- Build failures when the image is not found
- Potential stability issues
- CI/CD pipeline disruptions
Recommend using the latest stable version instead:
-FROM golang:1.23-alpine3.19
+FROM golang:1.22-alpine3.19
📝 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.
FROM golang:1.23-alpine3.19 | |
FROM golang:1.22-alpine3.19 |
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.
LGTM
@mergify backport v1.7.x |
✅ Backports have been created
|
Which issue(s) this PR fixes:
Issue N/A
What this PR does / why we need it:
upgrade golang version to 1.23
Special notes for your reviewer:
Additional documentation or context
Summary by CodeRabbit