fix: Update from clap ArgEnum to ValueEnum

See <https://github.com/clap-rs/clap/pull/4127>
pull/24376/head
Carol (Nichols || Goulding) 2022-09-29 10:42:43 -04:00 committed by Jake Goulding
parent 3c11d3640f
commit 73d7105f20
5 changed files with 7 additions and 7 deletions

View File

@ -48,7 +48,7 @@ fn default_hotswap_poll_interval_timeout() -> &'static str {
pub struct CatalogDsnConfig {
/// The type of catalog to use. "memory" is only useful for testing purposes.
#[clap(
arg_enum,
value_enum,
long = "--catalog",
env = "INFLUXDB_IOX_CATALOG_TYPE",
default_value = "postgres",
@ -110,7 +110,7 @@ pub struct CatalogDsnConfig {
}
/// Catalog type.
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, clap::ArgEnum)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, clap::ValueEnum)]
pub enum CatalogType {
/// PostgreSQL.
Postgres,

View File

@ -70,7 +70,7 @@ pub struct ObjectStoreConfig {
/// * azure: Microsoft Azure blob storage. Must also set `--bucket`, `--azure-storage-account`,
/// and `--azure-storage-access-key`.
#[clap(
arg_enum,
value_enum,
long = "--object-store",
env = "INFLUXDB_IOX_OBJECT_STORE",
ignore_case = true,
@ -242,7 +242,7 @@ impl ObjectStoreConfig {
}
/// Object-store type.
#[derive(Debug, Copy, Clone, PartialEq, Eq, clap::ArgEnum)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, clap::ValueEnum)]
pub enum ObjectStoreType {
/// In-memory.
Memory,

View File

@ -26,7 +26,7 @@ pub struct Config {
/// specified, the generated files will have compaction level 1, won't overlap with each other,
/// and will be marked that they were created between 8 and 24 hours ago.
#[clap(
arg_enum,
value_enum,
value_parser,
long = "--compaction-type",
env = "INFLUXDB_IOX_COMPACTOR_GENERATE_TYPE",

View File

@ -43,7 +43,7 @@ pub struct Config {
/// Test action
#[clap(
arg_enum,
value_enum,
long = "--test-action",
env = "IOX_TEST_ACTION",
default_value = "None",

View File

@ -28,7 +28,7 @@ impl HttpApiErrorSource for ApplicationError {
}
}
#[derive(Debug, Clone, PartialEq, Eq, clap::ArgEnum)]
#[derive(Debug, Clone, PartialEq, Eq, clap::ValueEnum)]
pub enum TestAction {
None,
EarlyReturnFromGrpcWorker,