Skip to content

Fix: Add --dry-run to the tool for applying state-parts - #8739

Merged
near-bulldozer[bot] merged 7 commits into
near:masterfrom
nikurt:nikurt-state-viewer-state-parts
Mar 20, 2023
Merged

Fix: Add --dry-run to the tool for applying state-parts#8739
near-bulldozer[bot] merged 7 commits into
near:masterfrom
nikurt:nikurt-state-viewer-state-parts

Conversation

@nikurt

@nikurt nikurt commented Mar 15, 2023

Copy link
Copy Markdown
Contributor

Also rework the state parts command API to be a single command with two subcommands instead of two separate commands.

@nikurt
nikurt requested a review from a team as a code owner March 15, 2023 15:21
@nikurt
nikurt requested a review from akhi3030 March 15, 2023 15:21
@akhi3030

Copy link
Copy Markdown
Contributor

I think @marcelo-gonzalez might be a good reviewer for this PR. As they are not a codeowner, I am happy to approve once they do the review.

Comment thread tools/state-viewer/src/cli.rs

/// Selects an epoch. The dump will be of the state at the beginning of this epoch.
#[clap(subcommand)]
epoch_selection: EpochSelection,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

epoch_selection appears in both subcommands. Should it go to the parent command? Not saying it necessarily should just because of that (you might have plans to add another command that doesnt want that flag). But maybe makes sense if it should be common to any state parts related cmd

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice, but clap doesn't allow more than 1 subcommand per command.
Have to go with a common sub-sub-command.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah no i meant like as one of the options in struct StatePartsCmd. not a huge deal though obviously

Comment thread tools/state-viewer/src/state_parts.rs Outdated
@near-bulldozer
near-bulldozer Bot merged commit 0352621 into near:master Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants