go.mod: Bump go version to 1.22 #1324

Merged
fyrchik merged 1 commit from elebedeva/frostfs-node:bump-go-version into master 2024-09-04 19:51:11 +00:00
Member

Closes a part of #1316

Signed-off-by: Ekaterina Lebedeva ekaterina.lebedeva@yadro.com

Closes a part of #1316 Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
elebedeva added the
go
internal
labels 2024-08-20 12:47:52 +00:00
fyrchik approved these changes 2024-08-20 12:49:45 +00:00
fyrchik left a comment
Owner

Please use go.mod: prefix for this (like we already do).

Please use `go.mod:` prefix for this (like we already do).
Owner

Strange, that it is so easy, I have problems

/r/f/node master• ❱ make lint-install lint
Cloning into '.cache/linters'...
remote: Enumerating objects: 182, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 182 (delta 10), reused 9 (delta 9), pack-reused 166
Receiving objects: 100% (182/182), 71.57 KiB | 11.93 MiB/s, done.
Resolving deltas: 100% (74/74), done.
make[1]: Entering directory '/repo/frostfs/node/.cache/linters'
make[1]: Leaving directory '/repo/frostfs/node/.cache/linters'
go versionERRO Unable to load custom analyzer truecloudlab-linters:bin/linters/external_linters.so, plugin.Open("/repo/frostfs/node/bin/linters/external_linters"): plugin was built with a different version of package encoding/json
ERRO Running error: unknown linters: 'truecloudlab-linters', run 'golangci-lint help linters' to see the list of supported linters
make: *** [Makefile:210: lint] Error 3
/r/f/node master• 4.9s | 2 ❱ go version
go version go1.23.0 linux/amd64
Strange, that it is so easy, I have problems ``` /r/f/node master• ❱ make lint-install lint Cloning into '.cache/linters'... remote: Enumerating objects: 182, done. remote: Counting objects: 100% (16/16), done. remote: Compressing objects: 100% (7/7), done. remote: Total 182 (delta 10), reused 9 (delta 9), pack-reused 166 Receiving objects: 100% (182/182), 71.57 KiB | 11.93 MiB/s, done. Resolving deltas: 100% (74/74), done. make[1]: Entering directory '/repo/frostfs/node/.cache/linters' make[1]: Leaving directory '/repo/frostfs/node/.cache/linters' go versionERRO Unable to load custom analyzer truecloudlab-linters:bin/linters/external_linters.so, plugin.Open("/repo/frostfs/node/bin/linters/external_linters"): plugin was built with a different version of package encoding/json ERRO Running error: unknown linters: 'truecloudlab-linters', run 'golangci-lint help linters' to see the list of supported linters make: *** [Makefile:210: lint] Error 3 /r/f/node master• 4.9s | 2 ❱ go version go version go1.23.0 linux/amd64 ```
Owner

Ah, I see, could you also change all places where we use a single version of go (like lint in tests.yml) to 1.23?
We should use the latest one there.

Ah, I see, could you also change all places where we use a single version of go (like `lint` in `tests.yml`) to 1.23? We should use the latest one there.
elebedeva force-pushed bump-go-version from 0676ae5eda to be0df7f136 2024-08-20 15:55:04 +00:00 Compare
Author
Member

Strange, that it is so easy, I have problems

I wasn't able to reproduce the exact same error as you have, but have encountered several others. The strangest thing is - panics occur not every make lint run. I ran make lint 6 times in a row and only one time got these panics:

> Strange, that it is so easy, I have problems I wasn't able to reproduce the exact same error as you have, but have encountered several others. The strangest thing is - panics occur not every `make lint` run. I ran `make lint` 6 times in a row and only one time got these panics:
elebedeva force-pushed bump-go-version from be0df7f136 to 4afc85ddb1 2024-08-20 16:05:18 +00:00 Compare
elebedeva requested review from storage-core-committers 2024-08-20 16:06:24 +00:00
elebedeva requested review from storage-core-developers 2024-08-20 16:06:30 +00:00
elebedeva changed title from Bump go version to 1.22 to WIP: Bump go version to 1.22 2024-08-20 16:44:55 +00:00
elebedeva force-pushed bump-go-version from 4afc85ddb1 to 982fb1c1f0 2024-08-20 16:58:06 +00:00 Compare
elebedeva changed title from WIP: Bump go version to 1.22 to Bump go version to 1.22 2024-08-20 16:58:28 +00:00
elebedeva changed title from Bump go version to 1.22 to WIP: Bump go version to 1.22 2024-08-20 17:12:50 +00:00
elebedeva force-pushed bump-go-version from 982fb1c1f0 to d2923900d4 2024-08-21 09:22:53 +00:00 Compare
elebedeva changed title from WIP: Bump go version to 1.22 to Bump go version to 1.22 2024-08-21 09:23:11 +00:00
elebedeva force-pushed bump-go-version from d2923900d4 to b0c47aaae2 2024-08-21 09:28:20 +00:00 Compare
elebedeva force-pushed bump-go-version from b0c47aaae2 to 7d10e814dc 2024-08-21 10:00:47 +00:00 Compare
elebedeva added the
blocked
label 2024-08-21 10:01:03 +00:00
dstepanov-yadro approved these changes 2024-08-21 10:23:21 +00:00
acid-ant approved these changes 2024-08-21 10:51:58 +00:00
fyrchik changed title from Bump go version to 1.22 to WIP: Bump go version to 1.22 2024-08-21 11:28:32 +00:00
elebedeva force-pushed bump-go-version from 7d10e814dc to 4bc0ee7e18 2024-08-21 11:53:14 +00:00 Compare
elebedeva force-pushed bump-go-version from 4bc0ee7e18 to f482dd35bb 2024-08-21 12:09:44 +00:00 Compare
fyrchik approved these changes 2024-08-21 12:13:59 +00:00
@ -1073,7 +1073,7 @@ func initLocalStorage(ctx context.Context, c *cfg) {
c.onShutdown(func() {
c.log.Info(logs.FrostFSNodeClosingComponentsOfTheStorageEngine)
err := ls.Close(context.Background())
Owner

Please, test this on dev-env, if we call this function (onShutdown, the context should be already cancelled).

Please, test this on dev-env, if we call this function (`onShutdown`, the context should be _already cancelled_).
Owner

We may want to add linter exceptions for now and create a task to discuss this further.

We may want to add linter exceptions for now and create a task to discuss this further.
Owner

context.WithoutCancel should help.

`context.WithoutCancel` should help.
Author
Member

fixed

fixed
@ -22,3 +22,3 @@
name: "tracing",
fn: func() {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
ctx, cancel := context.WithTimeout(ctx, time.Second*5)
Owner

Same here, it is closers, ctx could be cancelled.

Same here, it is `closers`, `ctx` could be cancelled.
Author
Member

replaced with context.WithoutCancel

replaced with `context.WithoutCancel`
elebedeva changed title from WIP: Bump go version to 1.22 to go.mod: Bump go version to 1.22 2024-08-21 12:14:20 +00:00
Owner

lint: Fix conflicts --> lint: Fix warnings

`lint: Fix conflicts` --> `lint: Fix warnings`
elebedeva force-pushed bump-go-version from f482dd35bb to a345c972bf 2024-08-21 15:20:29 +00:00 Compare
elebedeva removed the
blocked
label 2024-08-21 15:21:34 +00:00
elebedeva requested review from fyrchik 2024-08-21 15:27:25 +00:00
fyrchik approved these changes 2024-08-21 15:47:24 +00:00
Owner

Close #1280

Close #1280
acid-ant approved these changes 2024-08-21 16:38:20 +00:00
fyrchik merged commit a345c972bf into master 2024-08-21 17:38:06 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1324
No description provided.