Skip to content

Allow --validator-dir to be specified after subcommands#8329

Merged
mergify[bot] merged 3 commits intosigp:unstablefrom
MikeJerred:global_validator_dir
Apr 9, 2026
Merged

Allow --validator-dir to be specified after subcommands#8329
mergify[bot] merged 3 commits intosigp:unstablefrom
MikeJerred:global_validator_dir

Conversation

@MikeJerred
Copy link
Copy Markdown

@MikeJerred MikeJerred commented Oct 30, 2025

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.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Oct 30, 2025

CLA assistant check
All committers have signed the CLA.

@chong-he
Copy link
Copy Markdown
Member

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 chong-he self-requested a review October 31, 2025 14:19
Copy link
Copy Markdown
Member

@chong-he chong-he left a comment

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@alok-108
Copy link
Copy Markdown

alok-108 commented Apr 1, 2026

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 unstable branch to get the CI passing, or I can push my PR forward if that's easier for the team.

Let me know how I can best help get this merged!

@chong-he
Copy link
Copy Markdown
Member

chong-he commented Apr 1, 2026

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 unstable branch to get the CI passing, or I can push my PR forward if that's easier for the team.

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

@chong-he chong-he added the ready-for-merge This PR is ready to merge. label Apr 9, 2026
@mergify mergify Bot added the queued label Apr 9, 2026
@mergify
Copy link
Copy Markdown

mergify Bot commented Apr 9, 2026

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

mergify Bot added a commit that referenced this pull request Apr 9, 2026
mergify Bot added a commit that referenced this pull request Apr 9, 2026
mergify Bot added a commit that referenced this pull request Apr 9, 2026
@mergify mergify Bot merged commit 815aad3 into sigp:unstable Apr 9, 2026
38 checks passed
@mergify mergify Bot removed the queued label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge This PR is ready to merge. UX-and-logs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants