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

ledger-tool: Fix create-snapshot default value for output_directory #3148

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

steviez
Copy link

@steviez steviez commented Oct 11, 2024

Problem

The arguments to specify full and incremental snapshot archives paths used to be a global argument; these were moved to only be instantiated on commands that needed them in #1773.

But, when the arguments were moved from app-level to subcommand-level, the code that matches the arguments was not updated to look at subcommand-matches instead of app-matches.

Summary of Changes

Examine the correct matches

Fixes #3117

The arguments to specify full and incremental snapshot archives paths
used to be a global argument; these were moved to only be instantiated
on commands that needed them in solana-labs#1773.

But, when the arguments were moved from app-level to subcommand-level,
the code that matches the arguments was not updated to look at
subcommand-matches instead of app-matches.
@steviez
Copy link
Author

steviez commented Oct 11, 2024

I looked through ledger-tool/src/main.rs, and saw no other instances where we parse the wrong matches. I think this change should be BP'd so I'd like to keep this diff minimal, but I will probably look to see how we can avoid this class of bug in the future

@steviez steviez requested a review from brooksprumo October 11, 2024 22:09
Copy link

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

:shipit:

This is straight-forward, which makes it easier for a backport. After merging, wdyt about adding tests so this isn't broken in the future?

@steviez
Copy link
Author

steviez commented Oct 13, 2024

This is straight-forward, which makes it easier for a backport. After merging, wdyt about adding tests so this isn't broken in the future?

100%; not at the top of my priority list, but will certainly do so before any more refactoring

@steviez steviez merged commit 1d9947c into anza-xyz:master Oct 13, 2024
38 checks passed
@steviez steviez deleted the lt_create_snap_fix_output_dir branch October 13, 2024 16:36
@steviez steviez added the v2.0 Backport to v2.0 branch label Oct 13, 2024
Copy link

mergify bot commented Oct 13, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

mergify bot pushed a commit that referenced this pull request Oct 13, 2024
…3148)

The arguments to specify full and incremental snapshot archives paths
used to be a global argument; these were moved to only be instantiated
on commands that needed them in #1773.

But, when the arguments were moved from app-level to subcommand-level,
the code that matches the arguments was not updated to look at
subcommand-matches instead of app-matches.

(cherry picked from commit 1d9947c)
steviez added a commit that referenced this pull request Oct 15, 2024
…tory (backport of #3148) (#3153)

ledger-tool: Fix create-snapshot default value for output_directory (#3148)

The arguments to specify full and incremental snapshot archives paths
used to be a global argument; these were moved to only be instantiated
on commands that needed them in #1773.

But, when the arguments were moved from app-level to subcommand-level,
the code that matches the arguments was not updated to look at
subcommand-matches instead of app-matches.

(cherry picked from commit 1d9947c)

Co-authored-by: steviez <steven@anza.xyz>
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
…nza-xyz#3148)

The arguments to specify full and incremental snapshot archives paths
used to be a global argument; these were moved to only be instantiated
on commands that needed them in anza-xyz#1773.

But, when the arguments were moved from app-level to subcommand-level,
the code that matches the arguments was not updated to look at
subcommand-matches instead of app-matches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.0 Backport to v2.0 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ledger-tool: The snapshot is being created in a different folder than expected
2 participants