fix: support iavl.* pruning config keys with legacy fallback#2767
fix: support iavl.* pruning config keys with legacy fallback#2767blindchaser merged 4 commits intomainfrom
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51e21e65d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| strategy := cast.ToString(appOpts.Get(FlagIAVLPruning)) | ||
| if strategy == "" { | ||
| strategy = cast.ToString(appOpts.Get(FlagPruning)) | ||
| } |
There was a problem hiding this comment.
Preserve CLI pruning overrides when iavl config exists
With the generated config template, iavl.pruning is always present (defaulted to a non-empty value), so this logic will always take that value and never consult the legacy --pruning flag. That means running seid start --pruning=everything (or custom --pruning-keep-* flags) won’t override the config anymore once a node has an app.toml with the [iavl] section, even though those flags are still registered. This is a regression in CLI behavior; consider checking whether the legacy flag was explicitly set (or binding new iavl.* flags) before unconditionally preferring iavl.pruning.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2767 +/- ##
==========================================
- Coverage 57.03% 56.32% -0.72%
==========================================
Files 2004 2000 -4
Lines 164633 164048 -585
==========================================
- Hits 93901 92395 -1506
- Misses 62526 63564 +1038
+ Partials 8206 8089 -117
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
## Describe your changes and provide context In v6.3.0, pruning config moved from top-level keys to [iavl] section (e.g., `pruning` -> `iavl.pruning`). Add fallback logic to read new `iavl.*` keys first, falling back to legacy top-level keys for backward compatibility with older configs. ## Testing performed to validate your change (cherry picked from commit 804252f)
|
Successfully created backport PR for |
## Describe your changes and provide context In v6.3.0, pruning config moved from top-level keys to [iavl] section (e.g., `pruning` -> `iavl.pruning`). Add fallback logic to read new `iavl.*` keys first, falling back to legacy top-level keys for backward compatibility with older configs. ## Testing performed to validate your change
Describe your changes and provide context
In v6.3.0, pruning config moved from top-level keys to [iavl] section
(e.g.,
pruning->iavl.pruning). Add fallback logic to read newiavl.*keys first, falling back tolegacy top-level keys for backward compatibility with older configs.
Testing performed to validate your change