Commit graph

3461 commits

Author SHA1 Message Date
4d5ae59a52
[#1598] golangci: Enable unconvert linters
To drop unnecessary conversions.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-01-14 09:06:40 +03:00
a9f27e074b [#1243] object: Look for X-Headers within origin before APE check
All checks were successful
Vulncheck / Vulncheck (push) Successful in 50s
Pre-commit hooks / Pre-commit (push) Successful in 1m24s
Build / Build Components (push) Successful in 1m30s
Tests and linters / gopls check (push) Successful in 2m20s
Tests and linters / Run gofumpt (push) Successful in 2m55s
Tests and linters / Staticcheck (push) Successful in 3m8s
Tests and linters / Tests (push) Successful in 3m14s
Tests and linters / Lint (push) Successful in 3m20s
Tests and linters / Tests with -race (push) Successful in 3m39s
* X-Headers can be found in `origin` field of `MetaHeader` if the request
  has been forwarded from non-container node.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2025-01-13 12:07:27 +00:00
6c51f48aab [#1596] metrics: Create public aliases for internal engine metrics
All checks were successful
Vulncheck / Vulncheck (push) Successful in 58s
Pre-commit hooks / Pre-commit (push) Successful in 1m21s
Build / Build Components (push) Successful in 1m33s
Tests and linters / gopls check (push) Successful in 2m14s
Tests and linters / Run gofumpt (push) Successful in 2m55s
Tests and linters / Tests (push) Successful in 2m59s
Tests and linters / Staticcheck (push) Successful in 3m7s
Tests and linters / Lint (push) Successful in 3m15s
Tests and linters / Tests with -race (push) Successful in 3m44s
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2025-01-13 10:05:01 +00:00
f7e75b13b0 [#1506] ape_manager: Await tx persist before returning response
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 28s
Vulncheck / Vulncheck (push) Successful in 57s
Build / Build Components (push) Successful in 1m42s
Pre-commit hooks / Pre-commit (push) Successful in 1m40s
Tests and linters / Staticcheck (push) Successful in 2m4s
Tests and linters / Tests with -race (push) Successful in 2m31s
Tests and linters / Tests (push) Successful in 2m44s
Tests and linters / Lint (push) Successful in 2m51s
Tests and linters / gopls check (push) Successful in 3m30s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 12:04:21 +00:00
198aaebc94 [#1506] morph: Simplify WaitTxHalt() signature
Avoid dependency on `morph/client` package because of `InvokeRes`.
Make signature resemble `WaitAny()` method of `waiter.Waiter` from neo-go.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 12:04:21 +00:00
85af6bcd5c [#1506] ape: Use contract reader in ListMorphRuleChains()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 12:04:21 +00:00
8a658de0b2 [#1506] ape: Do not create cosigners slice on each contract invocation
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 12:04:21 +00:00
3900b92927
Revert "[#1492] metabase: Ensure Unmarshal() is called on a cloned slice"
Some checks failed
DCO action / DCO (pull_request) Successful in 42s
Tests and linters / Run gofumpt (pull_request) Successful in 44s
Vulncheck / Vulncheck (pull_request) Successful in 1m20s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m38s
Build / Build Components (pull_request) Successful in 1m55s
Tests and linters / Tests (pull_request) Successful in 2m32s
Tests and linters / Staticcheck (pull_request) Successful in 2m36s
Tests and linters / gopls check (pull_request) Successful in 2m51s
Tests and linters / Lint (pull_request) Successful in 3m5s
Tests and linters / Tests with -race (pull_request) Successful in 3m57s
Build / Build Components (push) Has been cancelled
Pre-commit hooks / Pre-commit (push) Has been cancelled
Tests and linters / Lint (push) Has been cancelled
Tests and linters / Tests (push) Has been cancelled
Tests and linters / Tests with -race (push) Has been cancelled
Tests and linters / Staticcheck (push) Has been cancelled
Tests and linters / gopls check (push) Has been cancelled
Tests and linters / Run gofumpt (push) Has been cancelled
Vulncheck / Vulncheck (push) Has been cancelled
This reverts commit 8ed7a676d5.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 14:34:20 +03:00
d7fcc5ce30 [#1586] objsvc: Allow to send search response in multiple messages
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m18s
Vulncheck / Vulncheck (push) Successful in 1m16s
Build / Build Components (push) Successful in 1m41s
Tests and linters / gopls check (push) Successful in 2m17s
Tests and linters / Run gofumpt (push) Successful in 2m31s
Tests and linters / Lint (push) Successful in 3m9s
Tests and linters / Staticcheck (push) Successful in 3m9s
Tests and linters / Tests (push) Successful in 3m24s
Tests and linters / Tests with -race (push) Successful in 3m32s
Previously, `ln` was only set once, so search has really worked for
small number of objects.

Fix panic:
```
panic: runtime error: slice bounds out of range [:43690] with capacity 21238
goroutine 6859775 [running]:
git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object.(*searchStreamMsgSizeCtrl).Send(0xc001eec8d0, 0xc005734000)
        git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/transport_splitter.go:173 +0x1f0
git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search/v2.(*streamWriter).WriteIDs(0xc000520320, {0xc00eb1a000, 0x4fd9c, 0x7fd6475a9a68?})
        git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search/v2/streamer.go:28 +0x155
git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search.(*uniqueIDWriter).WriteIDs(0xc001386420, {0xc00eb1a000?, 0xc0013ea9c0?, 0x113eef3?})
        git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search/util.go:62 +0x202
git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search.(*execCtx).writeIDList(0xc00011aa38?, {0xc00eb1a000?, 0xc001eec9f0?, 0xc0008f4380?})
        git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search/exec.go:68 +0x91
git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search.(*execCtx).executeLocal(0xc0008f4380, {0x176c538, 0xc001eec9f0})
        git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search/local.go:18 +0x16b
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-28 12:29:22 +00:00
c0221d76e6 [#1577] node/container: Fix typo
All checks were successful
DCO action / DCO (pull_request) Successful in 44s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m52s
Vulncheck / Vulncheck (pull_request) Successful in 1m31s
Tests and linters / Run gofumpt (pull_request) Successful in 1m37s
Build / Build Components (pull_request) Successful in 1m54s
Tests and linters / gopls check (pull_request) Successful in 2m30s
Tests and linters / Staticcheck (pull_request) Successful in 2m21s
Tests and linters / Tests (pull_request) Successful in 2m32s
Tests and linters / Lint (pull_request) Successful in 3m4s
Tests and linters / Tests with -race (pull_request) Successful in 4m17s
Tests and linters / Run gofumpt (push) Successful in 1m25s
Vulncheck / Vulncheck (push) Successful in 1m35s
Pre-commit hooks / Pre-commit (push) Successful in 1m53s
Build / Build Components (push) Successful in 1m56s
Tests and linters / Tests (push) Successful in 2m6s
Tests and linters / Staticcheck (push) Successful in 2m15s
Tests and linters / gopls check (push) Successful in 2m30s
Tests and linters / Tests with -race (push) Successful in 2m44s
Tests and linters / Lint (push) Successful in 3m1s
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-28 12:05:01 +03:00
242f0095d0 [#1577] container: Reduce iterations through container list
* Separated iteration through container ids from `ContainersOf()`
  so that it could be reused.
* When listing containers we used to iterate through the
  the whole list of containers twice: first when reading from
  a contract, then when sending them. Now we can send batches
  of containers when reading from the contract.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-27 15:30:26 +03:00
6fe34d266a [#1577] morph: Fix typo
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-27 14:03:19 +03:00
fa08bfa553
[#1583] metabase/test: Update TestLisObjectsWithCursor
All checks were successful
DCO action / DCO (pull_request) Successful in 4m37s
Vulncheck / Vulncheck (pull_request) Successful in 5m1s
Tests and linters / Run gofumpt (pull_request) Successful in 5m36s
Build / Build Components (pull_request) Successful in 6m3s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m0s
Tests and linters / Staticcheck (pull_request) Successful in 6m29s
Tests and linters / gopls check (pull_request) Successful in 6m41s
Tests and linters / Tests with -race (pull_request) Successful in 6m56s
Tests and linters / Tests (pull_request) Successful in 7m5s
Tests and linters / Lint (pull_request) Successful in 7m13s
Vulncheck / Vulncheck (push) Successful in 5m9s
Tests and linters / Run gofumpt (push) Successful in 5m18s
Pre-commit hooks / Pre-commit (push) Successful in 5m37s
Build / Build Components (push) Successful in 6m6s
Tests and linters / Staticcheck (push) Successful in 6m30s
Tests and linters / gopls check (push) Successful in 6m33s
Tests and linters / Tests (push) Successful in 7m6s
Tests and linters / Tests with -race (push) Successful in 7m7s
Tests and linters / Lint (push) Successful in 7m26s
Update this test following recent changes to ensure
that `(*DB).ListWithCursor` skips expired objects.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-26 14:39:50 +03:00
0da998ef50
[#1583] metabase: Skip expired objects in ListWithCursor
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-26 14:39:49 +03:00
e44782473a [#1512] object: Fix writePart for EC-container
All checks were successful
Vulncheck / Vulncheck (push) Successful in 4m58s
Tests and linters / Run gofumpt (push) Successful in 5m9s
Pre-commit hooks / Pre-commit (push) Successful in 6m11s
Tests and linters / Staticcheck (push) Successful in 6m14s
Build / Build Components (push) Successful in 6m33s
Tests and linters / gopls check (push) Successful in 6m41s
Tests and linters / Tests (push) Successful in 6m50s
Tests and linters / Tests with -race (push) Successful in 6m54s
Tests and linters / Lint (push) Successful in 7m16s
* Immediatly return after `ObjectAlreadyRemoved` error.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-26 11:27:55 +00:00
9cd1bcef06 [#1512] object: Make raw PutSingle check status within response
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-26 11:27:55 +00:00
ca0a33ea0f [#465] objsvc: Set NETMAP_EPOCH xheader for auxiliary requests
All checks were successful
Vulncheck / Vulncheck (push) Successful in 4m45s
Tests and linters / Run gofumpt (push) Successful in 4m54s
Pre-commit hooks / Pre-commit (push) Successful in 5m12s
Build / Build Components (push) Successful in 5m46s
Tests and linters / Staticcheck (push) Successful in 6m3s
Tests and linters / gopls check (push) Successful in 6m5s
Tests and linters / Tests (push) Successful in 6m38s
Tests and linters / Tests with -race (push) Successful in 6m45s
Tests and linters / Lint (push) Successful in 6m59s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-26 09:17:58 +00:00
f6c5222952 [#1581] services/session: Use user.ID.EncodeToString() where possible
All checks were successful
Vulncheck / Vulncheck (push) Successful in 4m25s
Tests and linters / Run gofumpt (push) Successful in 4m33s
Build / Build Components (push) Successful in 5m14s
Pre-commit hooks / Pre-commit (push) Successful in 5m23s
Tests and linters / Staticcheck (push) Successful in 5m43s
Tests and linters / gopls check (push) Successful in 5m47s
Tests and linters / Tests (push) Successful in 6m0s
Tests and linters / Tests with -race (push) Successful in 6m6s
Tests and linters / Lint (push) Successful in 6m21s
gopatch:
```
@@
var id expression
@@
-base58.Encode(id.WalletBytes())
+id.EncodeToString()
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-25 18:09:36 +00:00
51ee132ea3
[#1342] network/cache: Add node address to error multiClient
All checks were successful
DCO action / DCO (pull_request) Successful in 4m33s
Tests and linters / gopls check (pull_request) Successful in 6m55s
Tests and linters / Staticcheck (pull_request) Successful in 7m4s
Tests and linters / Lint (pull_request) Successful in 7m55s
Tests and linters / Run gofumpt (pull_request) Successful in 10m49s
Vulncheck / Vulncheck (pull_request) Successful in 11m27s
Build / Build Components (pull_request) Successful in 12m7s
Tests and linters / Tests (pull_request) Successful in 8m0s
Pre-commit hooks / Pre-commit (pull_request) Successful in 12m58s
Tests and linters / Tests with -race (pull_request) Successful in 5m27s
Pre-commit hooks / Pre-commit (push) Successful in 3m20s
Tests and linters / Staticcheck (push) Successful in 3m25s
Tests and linters / gopls check (push) Successful in 3m49s
Tests and linters / Run gofumpt (push) Successful in 6m30s
Vulncheck / Vulncheck (push) Successful in 7m30s
Build / Build Components (push) Successful in 8m2s
Tests and linters / Tests (push) Successful in 8m22s
Tests and linters / Tests with -race (push) Successful in 8m24s
Tests and linters / Lint (push) Successful in 9m12s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-12-18 19:27:35 +03:00
226dd25dd0 [#1568] pilorama: Replace "containerID" with "container ID" in the error message
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 2m46s
Tests and linters / Staticcheck (push) Successful in 3m31s
Tests and linters / Lint (push) Successful in 5m0s
Vulncheck / Vulncheck (push) Successful in 7m2s
Build / Build Components (push) Successful in 7m38s
Pre-commit hooks / Pre-commit (push) Successful in 7m54s
Tests and linters / Tests (push) Successful in 8m11s
Tests and linters / Tests with -race (push) Successful in 8m39s
Tests and linters / gopls check (push) Successful in 8m57s
It is "container ID" in every other place.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-18 15:52:26 +00:00
bd0197eaa8 [#1568] storage: Remove "could not/can't/failed to" from error messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-18 15:52:26 +00:00
df05057ed4 [#1452] container: Add ListStream method
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 3m5s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m36s
Tests and linters / gopls check (pull_request) Successful in 4m1s
Tests and linters / Run gofumpt (pull_request) Successful in 5m35s
DCO action / DCO (pull_request) Successful in 6m3s
Tests and linters / Tests with -race (pull_request) Successful in 6m35s
Build / Build Components (pull_request) Successful in 7m15s
Tests and linters / Staticcheck (pull_request) Successful in 7m38s
Tests and linters / Tests (pull_request) Successful in 7m56s
Tests and linters / Lint (pull_request) Successful in 8m42s
Tests and linters / Run gofumpt (push) Successful in 3m34s
Tests and linters / Staticcheck (push) Successful in 3m38s
Tests and linters / Lint (push) Successful in 5m12s
Vulncheck / Vulncheck (push) Successful in 6m7s
Build / Build Components (push) Successful in 6m43s
Pre-commit hooks / Pre-commit (push) Successful in 6m54s
Tests and linters / Tests (push) Successful in 7m31s
Tests and linters / Tests with -race (push) Successful in 8m5s
Tests and linters / gopls check (push) Successful in 8m13s
* Added new method for listing containers to container service.
  It opens stream and sends containers in batches.

* Added TransportSplitter wrapper around ExecutionService to
  split container ID list read from contract in parts that are
  smaller than grpc max message size. Batch size can be changed
  in node configuration file (as in example config file).

* Changed `container list` implementaion in cli: now ListStream
  is called by default. Old List is called only if ListStream
  is not implemented.

* Changed `internalclient.ListContainersPrm`.`Account` to
  `OwnerID` since `client.PrmContainerList`.`Account` was
  renamed to `OwnerID` in sdk.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-17 16:22:43 +03:00
6e82661c35 [#1563] tree: Wrap only ChainRouterError erros with ObjectAccessDenied
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m37s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m25s
Tests and linters / gopls check (pull_request) Successful in 3m47s
DCO action / DCO (pull_request) Successful in 5m54s
Tests and linters / Tests with -race (pull_request) Successful in 6m34s
Vulncheck / Vulncheck (pull_request) Successful in 7m3s
Build / Build Components (pull_request) Successful in 7m39s
Tests and linters / Tests (pull_request) Successful in 7m57s
Tests and linters / Staticcheck (pull_request) Successful in 8m17s
Tests and linters / Lint (pull_request) Successful in 8m42s
Tests and linters / Run gofumpt (push) Successful in 1m24s
Tests and linters / Staticcheck (push) Successful in 3m24s
Tests and linters / Lint (push) Successful in 4m48s
Vulncheck / Vulncheck (push) Successful in 6m26s
Build / Build Components (push) Successful in 7m8s
Tests and linters / Tests (push) Successful in 7m19s
Pre-commit hooks / Pre-commit (push) Successful in 7m36s
Tests and linters / Tests with -race (push) Successful in 7m52s
Tests and linters / gopls check (push) Successful in 8m4s
* Such wrapping helps to differentiate logical check errors and server internal
  errors.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-16 15:16:07 +03:00
1a091ea7bb [#1563] object: Wrap only ChainRouterError erros with ObjectAccessDenied
* Such wrapping helps to differentiate logical check errors and server internal
  errors.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-16 15:15:25 +03:00
7ac3542714 [#1563] ape: Introduce ChainRouterError error type
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-16 15:12:30 +03:00
f0c43c8d80
[#1502] Use zap.Error for logging errors
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 3m1s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m29s
Tests and linters / gopls check (pull_request) Successful in 3m50s
Tests and linters / Lint (pull_request) Successful in 4m35s
DCO action / DCO (pull_request) Successful in 5m12s
Tests and linters / Run gofumpt (pull_request) Successful in 5m33s
Build / Build Components (pull_request) Successful in 5m45s
Tests and linters / Tests with -race (pull_request) Successful in 6m37s
Tests and linters / Tests (pull_request) Successful in 7m17s
Tests and linters / Staticcheck (pull_request) Successful in 7m36s
Tests and linters / Run gofumpt (push) Successful in 1m22s
Tests and linters / Staticcheck (push) Successful in 3m19s
Tests and linters / Lint (push) Successful in 4m35s
Vulncheck / Vulncheck (push) Successful in 5m20s
Build / Build Components (push) Successful in 6m16s
Pre-commit hooks / Pre-commit (push) Successful in 6m37s
Tests and linters / Tests (push) Successful in 6m48s
Tests and linters / Tests with -race (push) Successful in 7m15s
Tests and linters / gopls check (push) Successful in 7m27s
Use `zap.Error` instead of `zap.String` for logging errors: change all expressions like
`zap.String("error", err.Error())` or `zap.String("err", err.Error())` to `zap.Error(err)`.
Leave similar expressions with other messages unchanged, for example,
`zap.String("last_error", lastErr.Error())` or `zap.String("reason", ctx.Err().Error())`.

This change was made by applying the following patch:
```diff
@@
var err expression
@@
-zap.String("error", err.Error())
+zap.Error(err)

@@
var err expression
@@
-zap.String("err", err.Error())
+zap.Error(err)
```

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-16 11:13:42 +03:00
8ba9f31fca
[#1510] metabase/test: Fix BenchmarkListWithCursor
All checks were successful
DCO action / DCO (pull_request) Successful in 4m10s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m53s
Tests and linters / gopls check (pull_request) Successful in 5m9s
Build / Build Components (pull_request) Successful in 5m36s
Tests and linters / Lint (pull_request) Successful in 6m0s
Tests and linters / Tests (pull_request) Successful in 6m4s
Tests and linters / Run gofumpt (pull_request) Successful in 6m5s
Vulncheck / Vulncheck (pull_request) Successful in 6m48s
Tests and linters / Tests with -race (pull_request) Successful in 7m35s
Tests and linters / Staticcheck (pull_request) Successful in 7m42s
Tests and linters / Staticcheck (push) Successful in 3m50s
Tests and linters / gopls check (push) Successful in 3m57s
Build / Build Components (push) Successful in 4m30s
Tests and linters / Lint (push) Successful in 4m50s
Tests and linters / Run gofumpt (push) Successful in 5m38s
Vulncheck / Vulncheck (push) Successful in 6m51s
Pre-commit hooks / Pre-commit (push) Successful in 7m27s
Tests and linters / Tests (push) Successful in 7m45s
Tests and linters / Tests with -race (push) Successful in 8m26s
- Fix misplaced `(*DB).Close` (broken after 47dcfa20f3)
- Use `errors.Is` for error checking (broken after fcdbf5e509)

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-13 13:19:15 +03:00
2af3409d39
[#1510] metabase/test: Fix BenchmarkGet
Fix misplaced `(*DB).Close` (broken after 47dcfa20f3)

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-13 13:18:43 +03:00
d165ac042c
[#1558] morph/client: Reuse notary rpcclient wrapper
All checks were successful
DCO action / DCO (pull_request) Successful in 5m31s
Tests and linters / Run gofumpt (pull_request) Successful in 5m35s
Tests and linters / gopls check (pull_request) Successful in 6m9s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m25s
Tests and linters / Staticcheck (pull_request) Successful in 6m26s
Build / Build Components (pull_request) Successful in 7m19s
Vulncheck / Vulncheck (pull_request) Successful in 7m16s
Tests and linters / Tests (pull_request) Successful in 7m37s
Tests and linters / Tests with -race (pull_request) Successful in 7m56s
Tests and linters / Lint (pull_request) Successful in 8m44s
Tests and linters / Run gofumpt (push) Successful in 1m32s
Vulncheck / Vulncheck (push) Successful in 3m2s
Tests and linters / Staticcheck (push) Successful in 3m43s
Build / Build Components (push) Successful in 4m5s
Tests and linters / Lint (push) Successful in 4m29s
Pre-commit hooks / Pre-commit (push) Successful in 5m7s
Tests and linters / Tests (push) Successful in 5m16s
Tests and linters / Tests with -race (push) Successful in 5m29s
Tests and linters / gopls check (push) Successful in 5m37s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 15:30:12 +03:00
7151c71d51
[#1558] morph/client: Remove "could not"/"can't"/"failed to" from error messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 15:30:12 +03:00
91d9dc2676
[#1558] morph/event: Remove "could not" from error messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 15:30:12 +03:00
7853dbc315 [#1557] morph/event: Remove embedded structs from scriptHashWithValue
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m23s
Tests and linters / Staticcheck (push) Successful in 3m10s
Vulncheck / Vulncheck (push) Successful in 4m8s
Tests and linters / Lint (push) Successful in 4m33s
Build / Build Components (push) Successful in 4m36s
Pre-commit hooks / Pre-commit (push) Successful in 5m14s
Tests and linters / Tests (push) Successful in 5m20s
Tests and linters / Tests with -race (push) Successful in 6m7s
Tests and linters / gopls check (push) Successful in 6m12s
Also, make them public, because otherwise `unused` linter complains.
```
pkg/morph/event/utils.go:25:2  unused  field `typ` is unused
```
This complain is wrong, though: we _use_ `typ` field because the whole
struct is used as a map key.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 11:55:09 +00:00
3821645085
[#1555] engine: Refactor (*StorageEngine).GetLocks
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 3m25s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m41s
DCO action / DCO (pull_request) Successful in 4m57s
Vulncheck / Vulncheck (pull_request) Successful in 5m28s
Build / Build Components (pull_request) Successful in 5m46s
Tests and linters / Staticcheck (pull_request) Successful in 6m0s
Tests and linters / Tests (pull_request) Successful in 6m34s
Tests and linters / Lint (pull_request) Successful in 6m51s
Tests and linters / Tests with -race (pull_request) Successful in 7m50s
Tests and linters / gopls check (pull_request) Successful in 2m51s
Tests and linters / Run gofumpt (push) Successful in 1m16s
Tests and linters / Staticcheck (push) Successful in 3m13s
Vulncheck / Vulncheck (push) Successful in 3m46s
Build / Build Components (push) Successful in 4m11s
Tests and linters / Lint (push) Successful in 4m26s
Pre-commit hooks / Pre-commit (push) Successful in 4m47s
Tests and linters / Tests with -race (push) Successful in 6m8s
Tests and linters / gopls check (push) Successful in 6m13s
Tests and linters / Tests (push) Successful in 2m36s
Refactored after renaming the method to replace the confusing `locked`
variable with `locks`.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-11 15:06:38 +03:00
72470d6b48
[#1555] local_object_storage: Rename method GetLocked -> GetLocks
Renamed to better reflect the method's purpose of returning locks
for the specified object.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-11 15:06:37 +03:00
e9837bbcf9 [#1554] morph/event: Remove unused AlphabetUpdate event
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m16s
Tests and linters / Staticcheck (push) Successful in 3m14s
Vulncheck / Vulncheck (push) Successful in 3m41s
Build / Build Components (push) Successful in 4m5s
Tests and linters / Lint (push) Successful in 4m53s
Pre-commit hooks / Pre-commit (push) Successful in 5m15s
Tests and linters / Tests (push) Successful in 5m52s
Tests and linters / Tests with -race (push) Successful in 6m24s
Tests and linters / gopls check (push) Successful in 6m32s
Refs TrueCloudLab/frostfs-contract#138.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 12:01:17 +00:00
b1614a284d [#1546] morph/event: Export NotificationHandlerInfo fields
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m26s
Tests and linters / Staticcheck (push) Successful in 3m21s
Vulncheck / Vulncheck (push) Successful in 3m36s
Build / Build Components (push) Successful in 3m58s
Tests and linters / Lint (push) Successful in 4m30s
Pre-commit hooks / Pre-commit (push) Successful in 4m35s
Tests and linters / Tests (push) Successful in 5m15s
Tests and linters / Tests with -race (push) Successful in 5m33s
Tests and linters / gopls check (push) Successful in 5m45s
Hiding them achieves nothing, as the struct has no methods and is not
used concurrently.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
d0ce835fbf [#1546] morph/event: Merge notification parser and handlers
They are decoupled, but it is an error to have a handler without a
corresponding parser. Register them together on the code level and get
rid of unreachable code.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
dfa51048a8 [#1546] morph/event: Remove "is started" checks from event handler registrar
This codepath hides possible bugs in code.
All initialization function should run before init stage.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
670305a721 [#1546] morph/event: Remove nil checks from event handler registrar
This codepath hides possible bugs in code.
We would rather panic then silently fail.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
1f6cf57e30 [#1548] metabase: Check if EC parent is removed or expired
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m26s
Tests and linters / Staticcheck (push) Successful in 3m14s
Vulncheck / Vulncheck (push) Successful in 3m46s
Build / Build Components (push) Successful in 4m16s
Pre-commit hooks / Pre-commit (push) Successful in 4m27s
Tests and linters / Lint (push) Successful in 4m30s
Tests and linters / Tests (push) Successful in 5m22s
Tests and linters / Tests with -race (push) Successful in 5m35s
Tests and linters / gopls check (push) Successful in 5m46s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-11 07:26:33 +00:00
386a12eea4 [#1548] engine: Rename parent -> ecParent
Parent could mean split parent or EC parent. In this case it is EC parent only.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-11 07:26:33 +00:00
15139d80c9 [#1548] policer: Do not replicate EC chunk if object already removed
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-11 07:26:33 +00:00
41da27dad5
[#1549] engine: Drop Async flag from evacuation parameters
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 4m4s
DCO action / DCO (pull_request) Successful in 5m4s
Pre-commit hooks / Pre-commit (pull_request) Successful in 5m5s
Vulncheck / Vulncheck (pull_request) Successful in 4m56s
Tests and linters / Staticcheck (pull_request) Successful in 5m10s
Build / Build Components (pull_request) Successful in 5m32s
Tests and linters / Tests with -race (pull_request) Successful in 6m24s
Tests and linters / Lint (pull_request) Successful in 6m36s
Tests and linters / Tests (pull_request) Successful in 6m46s
Tests and linters / gopls check (pull_request) Successful in 7m9s
Tests and linters / Run gofumpt (push) Successful in 1m34s
Tests and linters / Staticcheck (push) Successful in 3m22s
Vulncheck / Vulncheck (push) Successful in 3m43s
Tests and linters / Lint (push) Successful in 4m16s
Build / Build Components (push) Successful in 5m0s
Pre-commit hooks / Pre-commit (push) Successful in 5m3s
Tests and linters / Tests (push) Successful in 5m9s
Tests and linters / Tests with -race (push) Successful in 5m13s
Tests and linters / gopls check (push) Successful in 5m54s
Now it is only async evacuation.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-10 17:00:00 +03:00
ac0511d214
[#1549] controlSvc: Drop deprecated EvacuateShard rpc
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-10 16:59:52 +03:00
7e542906ef [#1539] go.mod: Bump frostfs-sdk-go version
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 2m49s
DCO action / DCO (pull_request) Successful in 3m5s
Vulncheck / Vulncheck (pull_request) Successful in 3m4s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m21s
Tests and linters / gopls check (pull_request) Successful in 3m29s
Build / Build Components (pull_request) Successful in 3m43s
Tests and linters / Staticcheck (pull_request) Successful in 4m22s
Tests and linters / Lint (pull_request) Successful in 5m3s
Tests and linters / Tests (pull_request) Successful in 5m23s
Tests and linters / Tests with -race (pull_request) Successful in 6m37s
Tests and linters / Run gofumpt (push) Successful in 2m18s
Tests and linters / Staticcheck (push) Successful in 4m36s
Vulncheck / Vulncheck (push) Successful in 5m14s
Build / Build Components (push) Successful in 5m41s
Pre-commit hooks / Pre-commit (push) Successful in 6m24s
Tests and linters / Tests with -race (push) Successful in 6m21s
Tests and linters / Lint (push) Successful in 6m57s
Tests and linters / gopls check (push) Successful in 7m27s
Tests and linters / Tests (push) Successful in 9m23s
* Also fix placement unit-test in object manager

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-06 15:29:37 +03:00
d1bc4351c3
[#1545] morph/event: Simplify frostfs contract event parsing
All checks were successful
DCO action / DCO (pull_request) Successful in 4m46s
Vulncheck / Vulncheck (pull_request) Successful in 5m22s
Build / Build Components (pull_request) Successful in 6m12s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m10s
Tests and linters / Run gofumpt (pull_request) Successful in 6m16s
Tests and linters / gopls check (pull_request) Successful in 6m19s
Tests and linters / Staticcheck (pull_request) Successful in 6m25s
Tests and linters / Lint (pull_request) Successful in 6m59s
Tests and linters / Tests (pull_request) Successful in 7m38s
Tests and linters / Tests with -race (pull_request) Successful in 8m37s
Tests and linters / Run gofumpt (push) Successful in 1m16s
Tests and linters / Staticcheck (push) Successful in 3m15s
Vulncheck / Vulncheck (push) Successful in 4m7s
Build / Build Components (push) Successful in 4m32s
Tests and linters / Lint (push) Successful in 4m50s
Pre-commit hooks / Pre-commit (push) Successful in 5m1s
Tests and linters / Tests (push) Successful in 5m14s
Tests and linters / Tests with -race (push) Successful in 5m54s
Tests and linters / gopls check (push) Successful in 6m2s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 14:00:23 +03:00
1c12f23b84 [#1541] morph/event: Simplify netmap contract event parsing
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m10s
Vulncheck / Vulncheck (push) Successful in 2m55s
Tests and linters / Staticcheck (push) Successful in 3m2s
Build / Build Components (push) Successful in 3m42s
Pre-commit hooks / Pre-commit (push) Successful in 3m46s
Tests and linters / Lint (push) Successful in 4m19s
Tests and linters / Tests (push) Successful in 4m23s
Tests and linters / gopls check (push) Successful in 4m44s
Tests and linters / Tests with -race (push) Successful in 5m18s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
a353d45742 [#1541] morph/event: Simplify container contract event parsing
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
d5d5ce2074 [#1541] morph/event: Simplify balance contract event parsing
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
7df3520d48 [#1540] getSvc: Drop redundant returns
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 2m9s
Vulncheck / Vulncheck (push) Successful in 2m51s
Tests and linters / Staticcheck (push) Successful in 3m20s
Build / Build Components (push) Successful in 3m40s
Pre-commit hooks / Pre-commit (push) Successful in 3m42s
Tests and linters / gopls check (push) Successful in 4m16s
Tests and linters / Tests (push) Successful in 4m42s
Tests and linters / Lint (push) Successful in 4m49s
Tests and linters / Tests with -race (push) Successful in 5m6s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-05 12:39:49 +00:00