Commit graph

5491 commits

Author SHA1 Message Date
48930ec452 [#1703] cli: Allow reading RPC endpoint from config file
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m10s
Pre-commit hooks / Pre-commit (push) Successful in 1m28s
Build / Build Components (push) Successful in 1m38s
Tests and linters / Run gofumpt (push) Successful in 3m22s
Tests and linters / Lint (push) Successful in 3m29s
Tests and linters / Staticcheck (push) Successful in 3m40s
Tests and linters / gopls check (push) Successful in 3m51s
Tests and linters / Tests (push) Successful in 4m4s
OCI image / Build container images (push) Successful in 4m34s
Tests and linters / Tests with -race (push) Successful in 4m48s
Allowed reading an RPC endpoint from a configuration file when
getting current epoch in the `object lock` and `bearer create`
commands.

Close #1703

Change-Id: Iea8509dff2893a02cb63f695d7f532eecd743ed8
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-04-14 15:40:27 +00:00
f37babdc54
[#1700] shard: Lock shard's mode mutex on close
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m21s
Vulncheck / Vulncheck (push) Successful in 58s
Build / Build Components (push) Successful in 2m26s
Tests and linters / Run gofumpt (push) Successful in 2m19s
Tests and linters / Tests (push) Successful in 2m30s
Tests and linters / Staticcheck (push) Successful in 3m0s
Tests and linters / gopls check (push) Successful in 3m33s
Tests and linters / Lint (push) Successful in 3m45s
OCI image / Build container images (push) Successful in 4m54s
Tests and linters / Tests with -race (push) Successful in 6m28s
To prevent race between GC handlers and close.

Change-Id: I06219230964f000f666a56158d3563c760518c3b
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-14 14:35:16 +03:00
fd37cea443
[#1700] engine: Drop unused block execution methods
Some checks failed
Build / Build Components (push) Has been cancelled
OCI image / Build container images (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
`BlockExecution` and `ResumeExecution` were used only by unit test.
So drop them and simplify code.

Change-Id: Ib3de324617e8a27fc1f015542ac5e94df5c60a6e
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-14 14:35:15 +03:00
e80632884a
[#1700] config: Drop redundant check
Some checks failed
Vulncheck / Vulncheck (push) Successful in 1m14s
Build / Build Components (push) Successful in 1m38s
Pre-commit hooks / Pre-commit (push) Successful in 1m43s
OCI image / Build container images (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
Target config created on level above, so limiter is always nil.

Change-Id: I1896baae5b9ddeed339a7d2b022a9a886589d362
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-14 14:35:15 +03:00
5aaa3df533
[#1700] config: Move config struct to qos package
Change-Id: Ie642fff5cd1702cda00425628e11f3fd8c514798
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-14 14:35:14 +03:00
3be33b7117
[#1706] cli/playground: Mention 'help' in error message for invalid commands
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m18s
Build / Build Components (push) Successful in 1m46s
Pre-commit hooks / Pre-commit (push) Successful in 1m58s
Tests and linters / Run gofumpt (push) Successful in 2m35s
Tests and linters / Lint (push) Successful in 2m45s
Tests and linters / Tests (push) Successful in 2m46s
Tests and linters / Staticcheck (push) Successful in 2m50s
OCI image / Build container images (push) Successful in 4m25s
Tests and linters / Tests with -race (push) Successful in 4m22s
Tests and linters / gopls check (push) Successful in 4m30s
Change-Id: Ica1112b907919a6d19fa1bf683f2a952c4c638e4
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-14 13:10:34 +03:00
29b4fbe451 [#1332] cli/playground: Add 'netmap-config' flag
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m5s
Vulncheck / Vulncheck (push) Successful in 1m40s
Build / Build Components (push) Successful in 2m21s
Pre-commit hooks / Pre-commit (push) Successful in 2m20s
Tests and linters / Staticcheck (push) Successful in 3m18s
Tests and linters / Tests with -race (push) Successful in 3m25s
Tests and linters / Tests (push) Successful in 3m34s
Tests and linters / Lint (push) Successful in 3m46s
Tests and linters / gopls check (push) Successful in 4m37s
OCI image / Build container images (push) Successful in 5m8s
Change-Id: I4342fb9a6da2a05c18ae4e0ad9f0c71550efc5ef
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-14 07:21:08 +00:00
0d36e93169 [#1332] cli/playground: Move command handler selection to separate function
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m33s
Build / Build Components (push) Successful in 1m56s
Vulncheck / Vulncheck (push) Successful in 1m55s
Tests and linters / Run gofumpt (push) Successful in 3m19s
Tests and linters / Tests (push) Successful in 3m33s
Tests and linters / Staticcheck (push) Successful in 3m34s
OCI image / Build container images (push) Successful in 4m24s
Tests and linters / gopls check (push) Successful in 4m20s
Tests and linters / Lint (push) Successful in 4m32s
Tests and linters / Tests with -race (push) Successful in 4m34s
Change-Id: I2dcbd85e61960c3cf141b815edab174e308ef858
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-13 11:49:45 +00:00
8e87cbee17 [#1689] ci: Move commit checker out of Jenkinsfile
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m11s
Pre-commit hooks / Pre-commit (push) Successful in 1m38s
Build / Build Components (push) Successful in 1m56s
Tests and linters / gopls check (push) Successful in 3m49s
Tests and linters / Run gofumpt (push) Successful in 4m11s
Tests and linters / Tests (push) Successful in 4m20s
OCI image / Build container images (push) Successful in 4m27s
Tests and linters / Staticcheck (push) Successful in 4m48s
Tests and linters / Lint (push) Successful in 4m56s
Tests and linters / Tests with -race (push) Successful in 5m28s
Commit checker is now configured globally for all Gerrit repositories:
  TrueCloudLab/jenkins#16

This allows us to execute commit-checker independently from the rest of
CI suite and re-check commit message format without rerunning other
tests.

Change-Id: Ib8f899b856482a5dc5d03861171585415ff6b452
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2025-04-12 15:42:45 +00:00
12fc7850dd [#1619] logger: Set tags for ir components
All checks were successful
Vulncheck / Vulncheck (push) Successful in 4m56s
Pre-commit hooks / Pre-commit (push) Successful in 5m56s
Build / Build Components (push) Successful in 6m7s
Tests and linters / Staticcheck (push) Successful in 5m59s
Tests and linters / Lint (push) Successful in 6m10s
Tests and linters / Tests (push) Successful in 6m49s
OCI image / Build container images (push) Successful in 7m44s
Tests and linters / Run gofumpt (push) Successful in 7m38s
Tests and linters / gopls check (push) Successful in 7m56s
Tests and linters / Tests with -race (push) Successful in 9m35s
Change-Id: Ifab575bc2a3cd83c9001cd68fffaf94c91494043
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2025-04-11 17:27:27 +03:00
dfe2f9956a [#1619] logger: Filter entries by tags provided in config
Some checks failed
Build / Build Components (push) Has been cancelled
OCI image / Build container images (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
Change-Id: Ia2a79d6cb2a5eb263fb2e6db3f9cf9f2a7d57118
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2025-04-11 17:27:27 +03:00
e06ecacf57
[#1705] engine: Use condition var for evacuation unit tests
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m10s
Pre-commit hooks / Pre-commit (push) Successful in 1m34s
Build / Build Components (push) Successful in 1m52s
Tests and linters / gopls check (push) Successful in 3m51s
Tests and linters / Run gofumpt (push) Successful in 3m55s
Tests and linters / Staticcheck (push) Successful in 4m35s
Tests and linters / Lint (push) Successful in 4m45s
Tests and linters / Tests (push) Successful in 4m46s
OCI image / Build container images (push) Successful in 5m0s
Tests and linters / Tests with -race (push) Successful in 6m7s
To know exactly when the evacuation was completed,
a conditional variable was added.

Closes #1705

Change-Id: I86f6d7d2ad2b9759905b6b5e9341008cb74f5dfd
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-11 09:20:46 +03:00
64c1392513 [#1710] object: Sign response even if CloseAndRecv returns error
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m12s
Pre-commit hooks / Pre-commit (push) Successful in 1m54s
Build / Build Components (push) Successful in 2m3s
Tests and linters / Staticcheck (push) Successful in 4m31s
Tests and linters / Lint (push) Successful in 4m39s
OCI image / Build container images (push) Successful in 4m53s
Tests and linters / gopls check (push) Successful in 4m47s
Tests and linters / Tests (push) Successful in 4m52s
Tests and linters / Run gofumpt (push) Successful in 5m58s
Tests and linters / Tests with -race (push) Successful in 7m3s
* Sign service wraps an error with status and sign a response even
  if error occurs from `CloseAndRecv` in `Put` and `Patch` methods.

Close #1710

Change-Id: I7e1d8fe00db53607fa6e04ebec9a29b87349f8a1
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2025-04-10 16:31:47 +03:00
dcfd895449 [#1710] object: Implement Unwrap() for errIncompletePut
* When sign service calls `SignResponse`, it tries to set v2 status
  to response by unwrapping an error to the possible depth. This wasn't
  applicable for `errIncompletePut` so far as it didn't implement
  `Unwrap()`. Thus, it wasn't able to find a correct status set in error.

Change-Id: I280c1806a008176854c55f13bf8688e5736ef941
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2025-04-10 16:31:47 +03:00
6730e27ae7
[#1712] adm: Drop rpc-endpoint flag from zombie scan
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m17s
Pre-commit hooks / Pre-commit (push) Successful in 1m34s
Build / Build Components (push) Successful in 1m50s
Tests and linters / Run gofumpt (push) Successful in 4m5s
Tests and linters / Staticcheck (push) Successful in 5m7s
Tests and linters / Lint (push) Successful in 5m11s
Tests and linters / Tests (push) Successful in 5m12s
Tests and linters / gopls check (push) Successful in 5m40s
Tests and linters / Tests with -race (push) Successful in 8m43s
OCI image / Build container images (push) Successful in 4m20s
Morph addresses from config are used.

Change-Id: Id99f91defbbff442c308f30d219b9824b4c871de
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-10 10:06:31 +03:00
f7779adf71
[#1712] core: Extend object info string with EC header
Closes #1712

Change-Id: Ief4a960f7dece3359763113270d1ff5155f3f19e
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-10 10:06:31 +03:00
f93b96c601
[#1712] adm: Add maintenance zombie commands
Change-Id: I1b73e561a8daad67d0a8ffc0d293cbdd09aaab6b
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-10 10:06:30 +03:00
aed84b567c [#1689] linter: Bump 'golangci-lint' to v2.0.2
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m12s
Pre-commit hooks / Pre-commit (push) Successful in 1m21s
Build / Build Components (push) Successful in 1m51s
Tests and linters / gopls check (push) Successful in 3m51s
Tests and linters / Run gofumpt (push) Successful in 4m2s
Tests and linters / Staticcheck (push) Successful in 4m34s
Tests and linters / Lint (push) Successful in 4m46s
OCI image / Build container images (push) Successful in 4m54s
Tests and linters / Tests (push) Successful in 4m55s
Tests and linters / Tests with -race (push) Successful in 5m57s
Change-Id: Ib546af43845014785f0debce429a37d62e616539
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-09 14:26:24 +00:00
fe29ed043a
[#1689] linter: Fix staticcheck warning: 'could use tagged switch on *'
Some checks failed
Vulncheck / Vulncheck (push) Successful in 1m14s
Pre-commit hooks / Pre-commit (push) Successful in 1m39s
Build / Build Components (push) Successful in 1m52s
Tests and linters / gopls check (push) Successful in 3m50s
Tests and linters / Run gofumpt (push) Successful in 3m56s
Tests and linters / Staticcheck (push) Successful in 4m30s
Tests and linters / Lint (push) Successful in 4m38s
Tests and linters / Tests (push) Successful in 4m46s
OCI image / Build container images (push) Successful in 4m59s
Tests and linters / Tests with -race (push) Has been cancelled
Change-Id: Ia340ce1ccdd223eb87f7aefabfba62b7055f344d
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-09 16:55:35 +03:00
4f9d237042
[#1689] linter: Fix staticcheck warning: 'probably want to use time.Time.Equal instead'
Change-Id: Idb119d3f4f167c9e42ed48633d301185589553ed
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-09 16:55:35 +03:00
dfdeedfc6f
[#1689] linter: Fix staticcheck warning: 'could apply De Morgan's law'
Change-Id: Ife03172bad7d517dc99771250c3308a9fc0916b3
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-09 16:55:35 +03:00
2394ae6ce0
[#1689] linter: Fix staticcheck warning: 'could lift into loop condition'
Change-Id: I4ff3cda54861d857740203d6994872998a22d5d5
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-09 16:55:35 +03:00
c274bbeb7c
[#1689] linter: Fix staticcheck warning: 'methods on the same type should have the same receiver name'
Change-Id: I25e9432987f73061c1506a184a82065e37885861
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-09 16:55:35 +03:00
faec499b38
[#1689] linter: Fix staticcheck warning: 'variable naming format'
Change-Id: I8f8b63a6a5f9b6feb7c91f70fe8ac092575b145c
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-09 16:55:35 +03:00
46fd5e17b2
[#1332] cli/playground: Add help
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m24s
Vulncheck / Vulncheck (push) Successful in 1m15s
Build / Build Components (push) Successful in 2m18s
Tests and linters / Run gofumpt (push) Successful in 4m8s
Tests and linters / gopls check (push) Successful in 4m15s
Tests and linters / Lint (push) Successful in 4m39s
Tests and linters / Staticcheck (push) Successful in 4m39s
OCI image / Build container images (push) Successful in 5m7s
Tests and linters / Tests (push) Successful in 4m54s
Tests and linters / Tests with -race (push) Successful in 6m7s
Change-Id: I6160cfddf427b161619e4b96ceec8396b75c4d08
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-08 21:01:20 +03:00
17cba3387e
[#1332] cli/playground: Prevent prompt artifacts by writing to 'readline' stdout
Some checks failed
OCI image / Build container images (push) Has been cancelled
Pre-commit hooks / Pre-commit (push) Has been cancelled
Vulncheck / Vulncheck (push) Successful in 1m8s
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
Build / Build Components (push) Successful in 1m10s
Change-Id: I1c3cbb0b762f29c0995d3f6fc79bae5246ee7bc3
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-08 21:01:20 +03:00
766d9ec46b [#1693] cli/lens: Replace conditional panics with asserts
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m9s
Pre-commit hooks / Pre-commit (push) Successful in 1m31s
Build / Build Components (push) Successful in 2m19s
Tests and linters / Tests (push) Successful in 3m20s
Tests and linters / gopls check (push) Successful in 3m40s
Tests and linters / Staticcheck (push) Successful in 3m42s
Tests and linters / Run gofumpt (push) Successful in 3m58s
Tests and linters / Lint (push) Successful in 4m26s
Tests and linters / Tests with -race (push) Successful in 5m53s
OCI image / Build container images (push) Successful in 4m4s
Change-Id: Id827da0cd9eef66efd806be6c9bc61044175a971
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-04-08 14:37:06 +03:00
0e1b01b15f [#1693] cli/adm: Replace conditional panics with asserts
Change-Id: I3a46f7ac6d9e4ff51bb490e6fcfc07957418f1a7
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-04-08 14:37:04 +03:00
4c03561aa2 [#1693] internal/assert: Add False and NoError checks
Some checks failed
Tests and linters / gopls check (push) Failing after 59s
Vulncheck / Vulncheck (push) Successful in 1m12s
Pre-commit hooks / Pre-commit (push) Successful in 1m35s
Build / Build Components (push) Successful in 1m49s
Tests and linters / Run gofumpt (push) Successful in 3m29s
Tests and linters / Staticcheck (push) Successful in 3m52s
Tests and linters / Lint (push) Successful in 4m30s
Tests and linters / Tests (push) Successful in 4m31s
OCI image / Build container images (push) Successful in 4m54s
Tests and linters / Tests with -race (push) Successful in 6m51s
Change-Id: Ib3ab1671eeff8e8917673513477f158cadbb4287
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-04-08 14:34:53 +03:00
f4696e8964 [#1689] linter: Fix staticcheck warning: 'Use fmt.Fprintf(...) instead of WriteString(fmt.Sprintf(...))'
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m18s
Pre-commit hooks / Pre-commit (push) Successful in 1m44s
Build / Build Components (push) Successful in 1m49s
Tests and linters / Run gofumpt (push) Successful in 3m20s
Tests and linters / gopls check (push) Successful in 3m44s
Tests and linters / Staticcheck (push) Successful in 3m47s
Tests and linters / Lint (push) Successful in 4m16s
Tests and linters / Tests (push) Successful in 4m17s
OCI image / Build container images (push) Successful in 4m51s
Tests and linters / Tests with -race (push) Successful in 5m39s
Change-Id: I253ab717885cb01b4a2e471147e883ee351be277
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-08 09:40:35 +00:00
b0ef737a74 [#1689] linter: Fix testifylint warning: 'len: use require.Len'
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m3s
Pre-commit hooks / Pre-commit (push) Successful in 1m27s
Build / Build Components (push) Successful in 2m6s
Tests and linters / gopls check (push) Successful in 3m32s
Tests and linters / Run gofumpt (push) Successful in 4m2s
Tests and linters / Tests with -race (push) Successful in 4m11s
Tests and linters / Lint (push) Successful in 4m20s
Tests and linters / Tests (push) Successful in 4m44s
Tests and linters / Staticcheck (push) Successful in 4m42s
OCI image / Build container images (push) Successful in 4m54s
Change-Id: I7a08f09c169ac237647dcb20b0737f1c51c441ad
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-08 09:32:30 +00:00
6f7b6b65f3 [#1689] linter: Fix staticcheck warning: 'embedded field can be simplified'
Change-Id: I8f454f7d09973cdea096495c3949b88cdd01102e
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-08 09:32:24 +00:00
923f0acf8f [#1564] cli: Fix output of object nodes command
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m26s
Vulncheck / Vulncheck (push) Successful in 1m30s
Build / Build Components (push) Successful in 1m59s
Tests and linters / Run gofumpt (push) Successful in 2m48s
Tests and linters / gopls check (push) Successful in 3m29s
Tests and linters / Tests (push) Successful in 3m51s
Tests and linters / Staticcheck (push) Successful in 4m7s
Tests and linters / Tests with -race (push) Successful in 4m8s
Tests and linters / Lint (push) Successful in 4m32s
OCI image / Build container images (push) Successful in 5m8s
The object nodes command misleadingly reported the number of
"found data objects" as if it matched the actual expected amount,
which could be incorrect for EC objects.

Updated the output wording to explicitly distinguish between
currently available data objects and total objects per the EC
schema.

Change-Id: Ib36b89db58ae66d8978baf5a16b59435db9a068d
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-04-07 18:08:04 +03:00
9b5c1da40f
[#1679] linter: Bump 'golangci-lint' to v1.64.8
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m36s
Vulncheck / Vulncheck (push) Successful in 1m36s
Build / Build Components (push) Successful in 2m20s
Tests and linters / Run gofumpt (push) Successful in 2m58s
Tests and linters / gopls check (push) Successful in 3m36s
Tests and linters / Tests with -race (push) Successful in 3m55s
Tests and linters / Lint (push) Successful in 4m1s
Tests and linters / Staticcheck (push) Successful in 4m8s
Tests and linters / Tests (push) Successful in 4m27s
OCI image / Build container images (push) Successful in 5m45s
- Removed deprecated config option 'linters.govet.check-shadowing', replaced with enabling the 'shadow' linter.
- Removed usage of deprecated 'tenv' linter, replaced by 'usetesting'.

Change-Id: Ib1bd1ec83b0fd55a47e405b290bc2bc967b9389c
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-07 14:21:44 +03:00
b4b053cecd
[#1679] node: Fix 'gocognit' warning
Some checks failed
Vulncheck / Vulncheck (push) Successful in 1m6s
Pre-commit hooks / Pre-commit (push) Successful in 1m45s
Build / Build Components (push) Successful in 2m2s
OCI image / Build container images (push) Has been cancelled
Tests and linters / Lint (push) Has been cancelled
Tests and linters / Tests with -race (push) Has been cancelled
Tests and linters / Tests (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
Change-Id: I6e2a278af51869c05c306c2910ba85130e39532e
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-07 14:10:25 +03:00
0c5d74729c
[#1679] node: Fix 'revive' warning
Some checks failed
Vulncheck / Vulncheck (push) Successful in 1m17s
Build / Build Components (push) Successful in 1m33s
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
OCI image / Build container images (push) Successful in 4m3s
Change-Id: I74ff6332b10f17a329c5d108d01d43002e92aafd
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-07 14:07:04 +03:00
c4f941a5f5
[#1689] client/netmap: Remove useless error-handling
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m13s
Pre-commit hooks / Pre-commit (push) Successful in 1m48s
Build / Build Components (push) Successful in 2m19s
Tests and linters / Run gofumpt (push) Successful in 2m22s
Tests and linters / Tests (push) Successful in 3m29s
Tests and linters / Staticcheck (push) Successful in 3m33s
Tests and linters / Lint (push) Successful in 4m17s
Tests and linters / gopls check (push) Successful in 4m26s
OCI image / Build container images (push) Successful in 4m49s
Tests and linters / Tests with -race (push) Successful in 5m17s
No functional changes.

Change-Id: I3a53c992c3ce5e8c6db252abb09aa40626142a97
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-04-05 09:16:33 +03:00
d933609084
[#1689] client/netmap: Refactor Client.config()
There are problems with that code:
- explicit casts,
- `ErrConfigNotFound` which is not a part of a public API,
- hand-rolled assertions, even though neo-go already has everything we
  need.

So, remove the error, use `stackitem/Item.Try*()` methods for
conversions. Note, that readUint64Config() returns an error if the
parameter is missing. This is likely an error, but this behaviour is
preserved in this PR: `TryInteger()` returns error when applied to
`Null`. By contract, `TryBool()` returns false for `Null`, so this
PR introduces no functional changes.

Refs 82c7a50b8a/pkg/vm/stackitem/item.go (L418)

Change-Id: I445d28a7c6b5abb9a2bb97b57c0cc42d617e16f7
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-04-05 09:16:32 +03:00
3d771aa21c
[#1689] morph: Remove frostfsError type
It has no custom methods defined, only adds `frostfs error: `
prefix to the error message. The utility of this prefix is debatable,
failed invocations already have `invocation failed` prefix.

Change-Id: If25ebb3679497f3f10acde43b596c81d52351907
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-04-05 09:16:32 +03:00
52367dc9b2
[#1689] go.mod: Update sdk-go
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 32s
Vulncheck / Vulncheck (push) Successful in 1m25s
Pre-commit hooks / Pre-commit (push) Successful in 2m8s
Build / Build Components (push) Successful in 2m11s
Tests and linters / Staticcheck (push) Successful in 2m49s
Tests and linters / Tests (push) Successful in 3m37s
Tests and linters / Lint (push) Successful in 3m43s
Tests and linters / Tests with -race (push) Successful in 4m23s
Tests and linters / gopls check (push) Successful in 4m46s
OCI image / Build container images (push) Successful in 5m27s
Change-Id: I72052fe11e66e4c77f4aef6cb2c0f038aa7b0d1f
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-04-04 20:40:15 +03:00
979d4bb2ae [#1701] tree: Form $Tree:ID resource property for APE
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m6s
Vulncheck / Vulncheck (push) Successful in 1m9s
Pre-commit hooks / Pre-commit (push) Successful in 1m55s
Build / Build Components (push) Successful in 3m0s
Tests and linters / Staticcheck (push) Successful in 3m36s
Tests and linters / Tests (push) Successful in 4m13s
Tests and linters / Tests with -race (push) Successful in 4m22s
Tests and linters / gopls check (push) Successful in 4m33s
Tests and linters / Lint (push) Successful in 4m44s
OCI image / Build container images (push) Successful in 5m46s
* Make `verifyClient`, `checkAPE` receive `treeID` from request body;
* Make `newAPERequest` set `$Tree:ID` property
* Add unit-test to check if a rule for `$Tree:ID` works

Close #1701

Change-Id: I834fed366e8adfd4b5c07bf50aac09af6239991b
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2025-04-04 17:48:00 +03:00
fbc623f34e [#1701] go.mod: Bump policy-engine version
Change-Id: I7aa359bf235034d6459275d366a276d9930fa227
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2025-04-04 17:48:00 +03:00
5350632e01 [#1705] engine/test: Increase evacuation timeout
All checks were successful
Vulncheck / Vulncheck (push) Successful in 2m27s
Pre-commit hooks / Pre-commit (push) Successful in 2m49s
Build / Build Components (push) Successful in 3m0s
OCI image / Build container images (push) Successful in 4m52s
Tests and linters / Run gofumpt (push) Successful in 4m56s
Tests and linters / gopls check (push) Successful in 5m38s
Tests and linters / Staticcheck (push) Successful in 5m54s
Tests and linters / Lint (push) Successful in 6m38s
Tests and linters / Tests (push) Successful in 6m44s
Tests and linters / Tests with -race (push) Successful in 10m1s
This test was flaky in CI probably because of runner load fluctuations.
Let's increase the timeout and see if the flakiness goes away.

(close #1705)

Change-Id: I76f96e3d6f4adb3d5de0e27b8ee6b47685236277
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2025-04-04 14:41:56 +00:00
2938498b52
[#1689] adm: Fix NNS root availability check
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m4s
Pre-commit hooks / Pre-commit (push) Successful in 1m27s
Build / Build Components (push) Successful in 2m32s
Tests and linters / gopls check (push) Successful in 4m16s
OCI image / Build container images (push) Successful in 4m51s
Tests and linters / Tests with -race (push) Successful in 6m27s
Tests and linters / Run gofumpt (push) Successful in 6m38s
Tests and linters / Lint (push) Successful in 6m51s
Tests and linters / Staticcheck (push) Successful in 6m52s
Tests and linters / Tests (push) Successful in 7m8s
After TrueCloudLab/frostfs-contract#117
we allow checking for root domain availability directly.
Before this commit, NNSRootRegistered() has always returned true, so the
actual root registration happened as a side-effect of the following
code, because NNS registers all parent domains, if they are missing.

Change-Id: Icf98f130e77d31b4af7b69697989183c1c8f6a56
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-04-04 15:33:52 +03:00
272128e61f
Revert "[#652] adm: Group independent stages in batches"
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m36s
Build / Build Components (push) Successful in 2m20s
Vulncheck / Vulncheck (push) Successful in 2m21s
Tests and linters / gopls check (push) Successful in 4m21s
Tests and linters / Tests with -race (push) Successful in 4m44s
OCI image / Build container images (push) Successful in 5m42s
Tests and linters / Run gofumpt (push) Successful in 5m58s
Tests and linters / Lint (push) Successful in 6m23s
Tests and linters / Staticcheck (push) Successful in 6m58s
Tests and linters / Tests (push) Successful in 7m0s
This reverts commit d00c606fee.

There are internal dependencies inside the last stage: first, we
register NNS root, only then register add records.
Revert for now, will revert back after more testing.

Change-Id: I760632b5628caf04849d4a64c714cf286051f357
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-04-04 14:11:43 +03:00
50dccff7c1 [#1633] morph/netmap: Merge node info in netmap with candidates list
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m12s
Pre-commit hooks / Pre-commit (push) Successful in 1m41s
Build / Build Components (push) Successful in 1m54s
Tests and linters / Run gofumpt (push) Successful in 3m35s
Tests and linters / Lint (push) Successful in 4m5s
Tests and linters / Staticcheck (push) Successful in 4m9s
Tests and linters / gopls check (push) Successful in 4m29s
Tests and linters / Tests (push) Successful in 4m52s
OCI image / Build container images (push) Successful in 5m9s
Tests and linters / Tests with -race (push) Successful in 6m14s
Applicable for both cases: when node uses local cache for netmap and when it disabled.

Change-Id: I3050f537e20312a4b39e944aca763b77bd1e74c4
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2025-04-03 16:29:54 +03:00
634de97509
[#1704] metabase: Do not ignore errors by Delete
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m12s
Pre-commit hooks / Pre-commit (push) Successful in 1m43s
Build / Build Components (push) Successful in 1m54s
Tests and linters / Run gofumpt (push) Successful in 3m31s
Tests and linters / Tests (push) Successful in 3m37s
Tests and linters / Lint (push) Successful in 3m44s
Tests and linters / Staticcheck (push) Successful in 3m49s
OCI image / Build container images (push) Successful in 4m39s
Tests and linters / gopls check (push) Successful in 4m32s
Tests and linters / Tests with -race (push) Successful in 7m16s
Change-Id: Ie7b89071a007f53f55879ff9e7e0c25d24ad5dbf
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-04-03 10:09:05 +03:00
2a6cdbdb72 [#1689] cli: Add split-header option for object patch command
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m18s
Pre-commit hooks / Pre-commit (push) Successful in 1m38s
Build / Build Components (push) Successful in 1m40s
Tests and linters / Run gofumpt (push) Successful in 3m34s
Tests and linters / Lint (push) Successful in 3m46s
Tests and linters / Staticcheck (push) Successful in 3m56s
Tests and linters / Tests (push) Successful in 4m8s
Tests and linters / gopls check (push) Successful in 4m25s
OCI image / Build container images (push) Successful in 4m51s
Tests and linters / Tests with -race (push) Successful in 8m10s
* Make `split-header` option read binary- or JSON-encoded split-header;
* Use `PatchHeader` instead of `PatchAttributes`.

Change-Id: I50ae1bd93d4695657249dacbea981199a39e1a35
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2025-04-02 13:34:46 +00:00
11493d587b
[#579] config: Change config example to be compatible with YAML 1.2 standard
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m0s
Pre-commit hooks / Pre-commit (push) Successful in 1m28s
Build / Build Components (push) Successful in 2m30s
Tests and linters / gopls check (push) Successful in 4m21s
Tests and linters / Tests with -race (push) Successful in 4m23s
Tests and linters / Run gofumpt (push) Successful in 5m5s
OCI image / Build container images (push) Successful in 5m18s
Tests and linters / Lint (push) Successful in 5m31s
Tests and linters / Staticcheck (push) Successful in 5m46s
Tests and linters / Tests (push) Successful in 6m2s
In accordance with the YAML 1.2 specification, octal numbers must begin with the 0o prefix.

Change-Id: Icb2e83a4aa75c1eb91decd0b7c9b146aaa9fb3e2
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-04-02 11:21:34 +03:00
b924ecb850 [#1689] object: Make patch streamer use ApplyHeaderPatch
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m56s
Build / Build Components (push) Successful in 2m3s
Tests and linters / Run gofumpt (push) Successful in 3m26s
Tests and linters / Lint (push) Successful in 3m52s
Tests and linters / Tests (push) Successful in 3m51s
Tests and linters / Staticcheck (push) Successful in 4m2s
OCI image / Build container images (push) Successful in 4m55s
Tests and linters / Tests with -race (push) Successful in 5m45s
Tests and linters / gopls check (push) Successful in 6m29s
Vulncheck / Vulncheck (push) Successful in 46s
Change-Id: I4fb94936621544f70ef4e08815c42efaa5ba846f
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2025-04-02 07:12:40 +00:00