Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Mar 20, 2023

Conversation

nikurt
Copy link
Contributor

@nikurt nikurt commented Mar 15, 2023

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
Collaborator

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.

tools/state-viewer/src/cli.rs Show resolved Hide resolved

/// Selects an epoch. The dump will be of the state at the beginning of this epoch.
#[clap(subcommand)]
epoch_selection: EpochSelection,
Copy link
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
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
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

tools/state-viewer/src/state_parts.rs Outdated Show resolved Hide resolved
@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