reshare: use newer worker implementation#79
Conversation
WalkthroughThe update changes the version of the Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package session: could not load export data: no export data for "github.com/vultisig/go-wrappers/go-dkls/sessions"" 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements updates to use the newer worker implementation for reshare functionality. Key changes include:
- Updating dependency versions in go.mod for recipes and verifier.
- Inserting a minor formatting change in the worker's main function.
- Renaming configuration keys in the DCAWorkerConfig struct to better reflect their purpose.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| go.mod | Dependency versions for recipes and verifier updated. |
| cmd/dca/worker/main.go | Added an extra newline (formatting adjustment). |
| cmd/dca/worker/config.go | Updated mapstructure keys for BlockStorage and VaultServiceConfig. |
Comments suppressed due to low confidence (2)
cmd/dca/worker/config.go:16
- Renaming the mapstructure key for VaultServiceConfig requires updating the related configuration sources. Verify that these changes are consistently applied across all configuration files and documentation.
VaultServiceConfig vault.Config `mapstructure:"vault_service_config" json:"vault_service,omitempty"`
cmd/dca/worker/config.go:15
- Renaming the mapstructure key for BlockStorage may break existing configuration files. Please ensure that the corresponding configuration and documentation are updated accordingly.
BlockStorage vault.BlockStorageConfig `mapstructure:"block_storage_config" json:"block_storage,omitempty"`
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
go.mod (1)
22-22: Run go mod tidy
Ensurego.sumis updated and unused modules are pruned by running:go mod tidycmd/dca/worker/main.go (1)
24-27: Improve error wrapping consistency
At line 26,panic(fmt.Sprintf(...))discards the original error type. Usefmt.Errorfwith%wto wrap errors:- panic(fmt.Sprintf("failed to initialize vault storage: %v", err)) + panic(fmt.Errorf("failed to initialize vault storage: %w", err))cmd/dca/worker/config.go (2)
15-16: Consider aligning JSON tags with new config keys
If this struct is serialized to JSON, you may want to update thejsontags to include_configfor consistency:- BlockStorage vault.BlockStorageConfig `mapstructure:"block_storage_config" json:"block_storage,omitempty"` - VaultServiceConfig vault.Config `mapstructure:"vault_service_config" json:"vault_service,omitempty"` + BlockStorage vault.BlockStorageConfig `mapstructure:"block_storage_config" json:"block_storage_config,omitempty"` + VaultServiceConfig vault.Config `mapstructure:"vault_service_config" json:"vault_service_config,omitempty"`
37-39: Fix error message grammar
The messagefail to reading config fileis ungrammatical. Consider:- return nil, fmt.Errorf("fail to reading config file, %w", err) + return nil, fmt.Errorf("failed to read config file: %w", err)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (3)
cmd/dca/worker/config.go(1 hunks)cmd/dca/worker/main.go(1 hunks)go.mod(1 hunks)
🔇 Additional comments (3)
go.mod (1)
22-22: Approve dependency update
Version bump ofgithub.com/vultisig/verifieraligns with the related changes in the sister PR.cmd/dca/worker/main.go (1)
48-48: LGTM: formatting only
The added blank line between server initialization and vault service creation improves readability and has no functional impact.cmd/dca/worker/config.go (1)
15-16: Approve updated mapstructure tags
Theblock_storage_configandvault_service_configtags align with the updated naming conventions for the DCA worker configuration.
Sister PR to vultisig/verifier#122
Implements the changes necessary to get reshare to work
Summary by CodeRabbit
Chores
Refactor