Skip to content

Commit

Permalink
fix(pd): acme-staging flag should default to false
Browse files Browse the repository at this point in the history
Follow up to #3705, which
was subtly broken: the `--acme-staging` flag was *always* set to true,
so I was getting staging certs even when I wanted prod ones. The problem
was mistaken use of `default_value` in the clap derive markers. Simply
setting the arg type as bool is sufficient; neither `default_value` nor
`default_value_t` are appropriate here.
  • Loading branch information
conorsch committed Feb 2, 2024
1 parent c7aefdc commit 71f14df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bin/pd/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub enum RootCommand {
/// if you're trying out the `--grpc-auto-https` option for the first time,
/// to validate your configuration, before subjecting yourself to production
/// ratelimits. This option has no effect if `--grpc-auto-https` is not set.
#[clap(long, display_order = 201, default_value = "false")]
#[clap(long, display_order = 201)]
acme_staging: bool,
/// Bind the metrics endpoint to this socket.
#[clap(
Expand Down
1 change: 1 addition & 0 deletions crates/bin/pd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ async fn main() -> anyhow::Result<()> {
?abci_bind,
?grpc_bind,
?grpc_auto_https,
?acme_staging,
?metrics_bind,
%cometbft_addr,
?enable_expensive_rpc,
Expand Down

0 comments on commit 71f14df

Please sign in to comment.