Small refactorings for adm/helper package #1522

Merged
fyrchik merged 11 commits from fyrchik/frostfs-node:local-actor into master 2024-11-26 08:13:36 +00:00
Owner
  1. Unexport function that aren't used outside the package.
  2. Remove unused code.
  3. Make constructor naming more precise and matching between local/remote scenario.
1. Unexport function that aren't used outside the package. 2. Remove unused code. 3. Make constructor naming more precise and matching between local/remote scenario.
fyrchik added 11 commits 2024-11-25 11:38:32 +00:00
It is better to have small scope.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Just reuse `actor.RPCActor`. No functional changes.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
No functional changes.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
The old code was there before Copy() method was introduced.
It was also supposed to check errors, however, they are already checked
server-side.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
It is used in `helper` package only, besides unit-tests.
Move unit-tests to the same package, where they belong.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
It is used once, it is used only internally and it is single-statement.
I see no justification in having it as a separate function.
It introduces confusion, because we also have NewLocalActor().

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
It doesn't create any accounts, purely finds them in the wallet.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
adm/frostfsid: Remove unreachable condition
Some checks failed
DCO action / DCO (pull_request) Failing after 1m37s
Tests and linters / Run gofumpt (pull_request) Successful in 1m49s
Vulncheck / Vulncheck (pull_request) Successful in 2m41s
Build / Build Components (pull_request) Successful in 3m20s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m22s
Tests and linters / gopls check (pull_request) Successful in 4m6s
Tests and linters / Staticcheck (pull_request) Successful in 4m27s
Tests and linters / Lint (pull_request) Successful in 4m59s
Tests and linters / Tests (pull_request) Successful in 6m29s
Tests and linters / Tests with -race (pull_request) Successful in 7m10s
4a19ed5565
SendConsensusTx() modifies SendTxs field, if it is not the case, there
is a bug in code.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik requested review from storage-core-committers 2024-11-25 11:40:22 +00:00
fyrchik requested review from storage-core-developers 2024-11-25 11:40:24 +00:00
fyrchik added the
frostfs-adm
internal
refactoring
labels 2024-11-25 11:40:56 +00:00
fyrchik added this to the v0.45.0 milestone 2024-11-25 11:40:58 +00:00
fyrchik force-pushed local-actor from 4a19ed5565 to 0f3ed39bf9 2024-11-25 13:23:43 +00:00 Compare
aarifullin approved these changes 2024-11-25 15:02:39 +00:00
dstepanov-yadro approved these changes 2024-11-25 15:07:19 +00:00
fyrchik merged commit aac65001e5 into master 2024-11-26 08:13:36 +00:00
fyrchik deleted branch local-actor 2024-11-26 08:13:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 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#1522
No description provided.