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

Adds default info to cli arg for --accounts-hash-cache-path #33331

Merged

Conversation

brooksprumo
Copy link
Contributor

@brooksprumo brooksprumo commented Sep 20, 2023

Problem

The accounts hash cache path CLI arg does not inform the user what it's default value is.

Summary of Changes

Add default info.

Note, this PR is simple/minimal on purpose for ease of backporting. I'll do a subsequent PR to better generate the default string using AccountsDb::DEFAULT_ACCOUNTS_HASH_CACHE_DIR. (See #33117 (comment) for more context.)

@brooksprumo brooksprumo self-assigned this Sep 20, 2023
@brooksprumo brooksprumo added the v1.16 PRs that should be backported to v1.16 label Sep 20, 2023
@brooksprumo brooksprumo marked this pull request as ready for review September 20, 2023 20:16
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #33331 (8a81ce0) into master (bc2b372) will decrease coverage by 0.1%.
Report is 20 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #33331     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         793      793             
  Lines      214828   214828             
=========================================
- Hits       176134   176126      -8     
- Misses      38694    38702      +8     

@@ -1150,7 +1150,10 @@ fn main() {
.long("accounts-hash-cache-path")
.value_name("PATH")
.takes_value(true)
.help("Use PATH as accounts hash cache location");
.help("Use PATH as accounts hash cache location")
.long_help(
Copy link
Contributor

Choose a reason for hiding this comment

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

why not in .help()? afaik, clap would automatically append a string to .help() for .default()'s value if we could use it in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yep, you're right. Regular help does include defaults. I'll make that change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 8a81ce0

Copy link
Contributor

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

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

:shipit:

@brooksprumo brooksprumo merged commit 1d39c31 into solana-labs:master Sep 21, 2023
15 checks passed
@brooksprumo brooksprumo deleted the accounts-hash-cache-dir/cli branch September 21, 2023 03:46
mergify bot pushed a commit that referenced this pull request Sep 21, 2023
(cherry picked from commit 1d39c31)

# Conflicts:
#	ledger-tool/src/main.rs
brooksprumo added a commit that referenced this pull request Sep 21, 2023
(cherry picked from commit 1d39c31)

# Conflicts:
#	ledger-tool/src/main.rs
willhickey pushed a commit that referenced this pull request Sep 21, 2023
…ackport of #33331) (#33336)

* Adds default info to cli arg for --accounts-hash-cache-path (#33331)

(cherry picked from commit 1d39c31)

# Conflicts:
#	ledger-tool/src/main.rs

* resolve merge conflicts

---------

Co-authored-by: Brooks <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.16 PRs that should be backported to v1.16
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants