chore: Update to go 1.24.0 and CI updates#35
Conversation
WalkthroughThis pull request introduces a new GitHub Actions workflow ( Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHubActions
participant SetupJob
participant LintJob
participant FormatJob
participant DependencyCheckJob
Developer->>GitHubActions: Push/PR to main branch
GitHubActions->>SetupJob: Run Setup Dependencies job
SetupJob-->>GitHubActions: Environment and dependencies set up
GitHubActions->>LintJob: Trigger Lint job (after Setup)
LintJob-->>GitHubActions: Return lint results
GitHubActions->>FormatJob: Trigger Format job (after Setup)
FormatJob-->>GitHubActions: Return formatting status
GitHubActions->>DependencyCheckJob: Trigger Dependency Check job (after Setup)
DependencyCheckJob-->>GitHubActions: Return dependency verification
sequenceDiagram
participant User
participant DeployCmd
participant getChartPath
participant OS
User->>DeployCmd: Execute deployment command
DeployCmd->>getChartPath: Retrieve operator chart path
getChartPath-->>DeployCmd: Return path or error
alt Error detected
DeployCmd-->>OS: Print error and exit
else No error
DeployCmd->>getChartPath: Retrieve wandb chart path
getChartPath-->>DeployCmd: Return path or error
alt Error detected
DeployCmd-->>OS: Print error and exit
else
DeployCmd->>DeployCmd: Continue with deployment flow
end
end
Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 golangci-lint (1.62.2)Error: can't load config: the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.24.0) 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (9)
✨ Finishing Touches
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 (
|
|
New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: golang/k8s.io/kubectl@v0.29.2 |
|
Report is too large to display inline. Next stepsMark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/checks.yaml (1)
41-44: Consider increasing the linting timeout.The 5-minute timeout might be insufficient for larger codebases. Consider increasing it to prevent timeouts in CI.
- args: --timeout=5m + args: --timeout=10m
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (11)
.github/workflows/checks.yaml(1 hunks).github/workflows/release.yaml(1 hunks).gitignore(1 hunks)Makefile(1 hunks)cmd/wsm/deploy.go(3 hunks)cmd/wsm/list.go(3 hunks)go.mod(1 hunks)pkg/helm/chart.go(1 hunks)pkg/helm/values/from.go(1 hunks)pkg/term/task/task.go(5 hunks)pkg/utils/tar.go(1 hunks)
✅ Files skipped from review due to trivial changes (5)
- pkg/helm/chart.go
- .gitignore
- pkg/helm/values/from.go
- pkg/utils/tar.go
- pkg/term/task/task.go
🔇 Additional comments (24)
.github/workflows/release.yaml (2)
25-28: LGTM! Go setup configuration looks good.The Go setup configuration is well-structured with caching enabled and the correct dependency path specified.
29-30: LGTM! Dependencies installation step is appropriate.Adding explicit dependency installation ensures all required packages are available.
cmd/wsm/list.go (3)
6-6: LGTM! Using moderniopackage.Correctly replacing deprecated
ioutilwithiopackage.
12-12: LGTM! Clear import alias.Good use of
teaalias forbubbleteapackage, improving code readability.
116-116: LGTM! Proper spinner execution.Using
Run()with error handling is the correct way to execute the spinner.cmd/wsm/deploy.go (3)
6-8: LGTM! Required imports added.Explicit imports for
osandpathpackages are correctly added.
42-45: LGTM! Improved error handling for operator chart.Good addition of error handling with early return to prevent cascading failures.
82-85: LGTM! Improved error handling for wandb chart.Good addition of error handling with early return to prevent cascading failures.
.github/workflows/checks.yaml (3)
1-9: LGTM! Well-structured workflow triggers.The workflow is correctly configured to run on pushes and pull requests to main branch.
10-24: LGTM! Proper setup job configuration.Good setup job with Go installation, caching, and module verification.
73-76: LGTM! Comprehensive dependency check.Good practice to ensure
go.modandgo.sumare up to date and committed.Makefile (10)
1-3: Updated Go and golangci-lint Versions.
The Go version and golangci-lint version have been updated to 1.24.0 and v1.64.5 respectively. This ensures consistency with the new toolchain and dependency upgrade requirements.
5-9: macOS Environment Variable Setup for Linker Warnings.
The new conditional block for macOS suppresses linker warnings by exportingCGO_LDFLAGSandLDFLAGS. This addition improves build output clarity on macOS systems. Confirm that these flags meet your intended behavior.
11-13: Addition of the Build Target.
The newly addedbuildtarget usinggo build -o wsm ./cmd/wsmimproves the build process by standardizing the binary output.
15-29: Enhanced golangci-lint Installation and Update Logic.
Theinstall-linttarget now uses acurlcommand to fetch and execute the installation script, and it smartly compares the currently installed version with the target version. This dynamic logic will help maintain the correct linter version. Please verify that the version extraction usingawkand string manipulation usingsedworks as expected across environments.
30-35: New Clean-Lint Target for Removing Homebrew-installed golangci-lint.
Theclean-linttarget is a useful addition for cleaning up a possibly conflicting Homebrew-installed version of golangci-lint. The use ofrm -fwith a fallback (|| true) is appropriate here.
36-41: Lint Target with Integrated vet and golangci-lint.
Thelinttarget now runs bothgo vetandgolangci-lintwith custom arguments. This layered approach should help catch a broader set of issues.
42-45: Automated Lint Fix Target.
Thelint-fixtarget leverages the--fixoption to automatically address linting issues. This should streamline code style corrections.
46-48: Code Formatting Target.
The addedfmttarget invokesgo fmtto enforce consistent formatting, which is a welcomed best practice.
49-53: Safe Dependency Update Target.
Thesafe-update-depstarget updates dependencies to their latest minor or patch versions and then runsgo mod tidyto clean up the module file. This ensures that dependency management is both proactive and clean.
54-55: Updated .PHONY Declaration.
By updating the.PHONYdeclaration to include all new targets (install-lint, lint, lint-fix, fmt, test, build, clean-lint, safe-update-deps), you prevent conflicts with files of the same names.go.mod (3)
3-4: Go Version Update in Module Definition.
The module now specifiesgo 1.24.0, which aligns with the changes in the Makefile and ensures compilation with the updated Go toolchain.
6-18: Main Dependency Upgrades.
Several key dependencies have been updated or introduced:
- Upgraded
github.com/Masterminds/semver/v3to v3.3.1.- Updated Charmbracelet libraries (
bubbles,bubbletea,lipgloss) to their newer versions.- Upgraded Kubernetes-related dependencies (
k8s.io/api,k8s.io/apimachinery,k8s.io/client-go,k8s.io/kubectl) to v0.32.2.- Added/updated
github.com/containers/image/v5and others.These changes appear aligned with the project’s dependency modernization goals. Please ensure that these upgrades have been tested within your integration environment to avoid any compatibility issues.
21-204: Extensive Indirect Dependency Updates.
The indirect dependencies block shows a comprehensive update with many packages now set to newer versions. Highlights include:
- New versions for dependencies like
github.com/Azure/go-ansiterm, several container-related libraries, and Kubernetes utilities.- The presence of both v3 and v4 semver libraries (e.g.,
github.com/Masterminds/semver/v3andgithub.com/blang/semver/v4) should be double-checked to ensure there is no conflict.Given the breadth of these changes, it is important to run a full build and test cycle to verify that there are no regressions or integration issues across the dependency tree.
This comment was marked as resolved.
This comment was marked as resolved.
✅ Actions performedReview triggered.
|
Summary by CodeRabbit
Chores
Bug Fixes
Refactor/Style