Allow --validator-dir to be specified after subcommands#8329
Allow --validator-dir to be specified after subcommands#8329mergify[bot] merged 3 commits intosigp:unstablefrom
Conversation
|
There is a CI check that fails. May not be related to your change, maybe need to update to latest unstable, can you fix it? Thanks |
chong-he
left a comment
There was a problem hiding this comment.
While this PR is a 1-line change in the main code, I think the PR has merits in the test file change, as commented below.
Putting a note here that this change will be replaced by the clap derive migration PR #6493, where we can add a global = true here cc @eserilev
I have tested in both cases and it works
|
|
||
| let validator_import_key_cmd = || { | ||
| validator_cmd() | ||
| .arg(IMPORT_CMD) |
There was a problem hiding this comment.
This change is good, as it moves the subcommand import (and other subcommands) to before the --validator-dir flag.
The test will only pass with the change in mod.rs to add .global(true) to allow subcommands such as import be placed before the --valdiator-dir
| "The path to search for validator directories. \ | ||
| Defaults to ~/.lighthouse/{network}/validators", | ||
| ) | ||
| .global(true) |
There was a problem hiding this comment.
I am not sure if there is a better way than adding .global(true) here, because the --validator-dir flag is defined before the subcommands import, create etc. So I think adding a global here is fine.
|
Hi @MikeJerred and @chong-he, I was recently working on this exact same CLI issue (#3768) and my PR (#9073) was closed as a duplicate of this one. I saw this is approved but has been inactive for a few months due to the CI failure. Is this still being actively worked on? If you're busy @MikeJerred, I'd be more than happy to help rebase this on the latest Let me know how I can best help get this merged! |
There is no CI failure for this PR. I approved the PR as I think it is good to go, it hasn't been merged yet as I figured wanting to have a developer to take a look. I think your PR (#9073) is a duplicate of this PR hence I closed #9073 |
Merge Queue Status
This pull request spent 28 minutes 10 seconds in the queue, including 26 minutes 52 seconds running CI. Required conditions to merge
|
Issue Addressed
#3768
Proposed Changes
Made the --validator-dir flag global so that it can be specified in any order
Additional Info
Please provide any additional information. For example, future considerations
or information useful for reviewers.