-
Notifications
You must be signed in to change notification settings - Fork 0
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
test: precedence of flag vs toml for abci client type #419
Conversation
Also more documentation for TOML template.
Failing lint check expected, since upstream also fails this check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catches here.
# ABCIClientType selects the type of ABCI client. | ||
# Default is "committing". | ||
# Valid settings are "committing" (default) or "local". | ||
# The committing client allows greater query parallelism, | ||
# but the local client is more defensive. | ||
abci-client-type = "{{ .BaseConfig.ABCIClientType }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, the buggy manual synchronization in this file is painful. I'm torn on whether or not we want to fix "ABCIClientType selects the type of ABCI client" to "abci-client-type selects the type of ABCI client" for correctness or leave it alone for local consistency, but am inclined towards the latter. The whole thing is crying out for a reflective approach à la https://go.dev/play/p/W74nda-DQKZ .
No changes needed here, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes 100% agree, we are going to use struct annotations and
github.com/pelletier/go-toml/v2
library for server/v2:
https://github.com/cosmos/cosmos-sdk/blob/605b724/server/v2/api/grpc/config.go#L19-L34
🎉
Description
Refs: Agoric/agoric-sdk#9224
Add unit tests to confirm order of precedence for flag and TOML settings for ABCI client type. The previous test in
start_test.go
confirms that the setting is interpreted as desired.Also more documentation for TOML template. (Flag help strings are more terse and needn't be as wordy.)
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change