-
Notifications
You must be signed in to change notification settings - Fork 93
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
Frrist/update golang1.23.0 #4332
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Updating to this version of golang requires we update the linter to match, it appears the buildkite instance lacks sufficient memory to run the liner now (exit code 137 usually means OOM):
|
@@ -87,7 +81,6 @@ linters: | |||
- gocyclo | |||
- gofmt | |||
- goimports | |||
- gomnd |
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.
shouldn't we enable mnd
?
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.
gomnd
has been desecrated - replaced by mnd
which is declared here now: https://github.com/bacalhau-project/bacalhau/pull/4332/files#diff-6179837f7df53a6f05c522b6b7bb566d484d5465d9894fb04910dd08bb40dcc9R35 (line 35 of this PR)
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.
You still need to re-declare it here, right? Line 35 is the linter setting, but all linters are disabled except the ones listed here
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.
I was initially confused as to why it ran without me setting it - I have modifed the pre-commit script to respect the linter config in the repo: 7404e37 and also included mnd
in this list
@@ -8,7 +8,7 @@ source /terraform_node/variables | |||
function install-go() { | |||
echo "Installing Go..." | |||
rm -fr /usr/local/go /usr/local/bin/go | |||
curl --silent --show-error --location --fail https://go.dev/dl/go1.21.8.linux-amd64.tar.gz | sudo tar --extract --gzip --file=- --directory=/usr/local | |||
curl --silent --show-error --location --fail https://go.dev/dl/go1.23.0.linux-amd64.tar.gz | sudo tar --extract --gzip --file=- --directory=/usr/local |
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.
please deploy to staging to verify all is working as expected
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.
Done. working as intended on this commit 7404e37:
export BACALHAU_API_HOST=bootstrap.staging.bacalhau.org
~> bacalhau agent version
Bacalhau v1.4.1-rc3-28-g7404e375d
BuildDate 2024-08-18 01:42:44 +0000 UTC
GitCommit 7404e375d09be15015438a2f10d6a17d18b83783
modules-download-mode: readonly | ||
# Allow multiple parallel golangci-lint instances running. | ||
# If false (default) - golangci-lint acquires file lock on start. | ||
allow-parallel-runners: false |
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.
Now that you have removed parallel runners from all places would it run serially or parallely ?
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.
IMO ! We need this golangci/golangci-lint#869 to be true ! This is the root cause failures after updating the golang image to 1.23.0
Why
In https://github.com/bacalhau-project/bacalhau/pull/4330/files#diff-77364c74880b2d28d60bdc250c7832430bb2c7d87d2e2359b05146c9f3cb5d6bR111 we are adding migration logic which requires directories to be copied. go 1.23 includes the os.CopyFS method which is helpful for this task, and preferred to writing our own CopyFS implementation.
How
Developers will need to perform the following actions:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.1