diff --git a/database-utils/src/lib.rs b/database-utils/src/lib.rs index 7c37c5b581..9c2c14f637 100644 --- a/database-utils/src/lib.rs +++ b/database-utils/src/lib.rs @@ -47,7 +47,7 @@ pub struct UpstreamConfig { /// trusted, any certificate for any site will be trusted for use, including expired /// certificates. This introduces significant vulnerabilities, and should only be used as a /// last resort. - #[clap(long, env = "DISABLE_UPSTREAM_SSL_VERIFICATION")] + #[clap(long, env = "DISABLE_UPSTREAM_SSL_VERIFICATION", hide = true)] #[serde(default)] pub disable_upstream_ssl_verification: bool, @@ -59,7 +59,7 @@ pub struct UpstreamConfig { /// Disable running DDL Streaming Replication Setup for PostgreSQL. If this flag is set /// the DDL Streaming Replication Setup SQL queries will need to be manually run on the /// primary server before streaming replication will start. - #[clap(long, env = "DISABLE_SETUP_DDL_REPLICATION")] + #[clap(long, env = "DISABLE_SETUP_DDL_REPLICATION", hide = true)] #[serde(default)] pub disable_setup_ddl_replication: bool, @@ -67,7 +67,7 @@ pub struct UpstreamConfig { /// /// This can be used to differentiate different ReadySet deployments connected to the same /// upstream DB. - #[clap(long, env = "REPLICATION_SERVER_ID")] + #[clap(long, env = "REPLICATION_SERVER_ID", hide = true)] #[serde(default)] pub replication_server_id: Option, @@ -82,12 +82,12 @@ pub struct UpstreamConfig { /// Sets the time (in seconds) between reports of progress snapshotting the database. A value /// of 0 disables reporting. - #[clap(long, default_value = "30")] + #[clap(long, default_value = "30", hide = true)] #[serde(default = "default_snapshot_report_interval_secs")] pub snapshot_report_interval_secs: u16, /// Sets the connection count for the pool that is used for replication and snapshotting. - #[clap(long, default_value = "50")] + #[clap(long, default_value = "50", hide = true)] #[serde(default)] pub replication_pool_size: usize, } diff --git a/readyset-server/src/lib.rs b/readyset-server/src/lib.rs index 6b2121e0bc..a402019fb5 100644 --- a/readyset-server/src/lib.rs +++ b/readyset-server/src/lib.rs @@ -545,11 +545,11 @@ pub struct WorkerOptions { /// on disk, but `ephemeral` deletes the data when the ReadySet Server is stopped. /// `memory` stores base tables entirely in memory. `ephemeral` and `memory` are /// suitable for testing only. Use `persistent` for production deployments. - #[clap(long, default_value = "persistent")] + #[clap(long, default_value = "persistent", hide = true)] pub durability: DurabilityMode, /// Number of background threads used by RocksDB - #[clap(long, default_value = "6")] + #[clap(long, default_value = "6", hide = true)] pub persistence_threads: i32, /// Memory high water mark, in bytes. If process heap memory exceeds this value, we @@ -562,12 +562,13 @@ pub struct WorkerOptions { #[clap( long = "memory-check-every", default_value = "1", - env = "MEMORY_CHECK_EVERY" + env = "MEMORY_CHECK_EVERY", + hide = true )] pub memory_check_freq: u64, /// The strategy to use when memory is freed from reader nodes - #[clap(long = "eviction-policy", default_value_t = dataflow::EvictionKind::LRU)] + #[clap(long = "eviction-policy", default_value_t = dataflow::EvictionKind::LRU, hide = true)] pub eviction_kind: dataflow::EvictionKind, /// Disable partial @@ -575,7 +576,7 @@ pub struct WorkerOptions { pub no_partial: bool, /// Allow the creation of fully materialized nodes. - #[clap(long, env = "ALLOW_FULL_MATERIALIZATION")] + #[clap(long, env = "ALLOW_FULL_MATERIALIZATION", hide = true)] pub allow_full_materialization: bool, /// Enable packet filters in egresses before readers @@ -623,7 +624,12 @@ pub struct WorkerOptions { pub replicator_config: UpstreamConfig, /// Timeout in seconds for all requests made from the controller to workers - #[clap(long, env = "WORKER_REQUEST_TIMEOUT_SECONDS", default_value = "1800")] + #[clap( + long, + env = "WORKER_REQUEST_TIMEOUT_SECONDS", + default_value = "1800", + hide = true + )] pub worker_request_timeout_seconds: u64, } diff --git a/readyset/src/lib.rs b/readyset/src/lib.rs index 7a9b915195..6d2e252f27 100644 --- a/readyset/src/lib.rs +++ b/readyset/src/lib.rs @@ -174,7 +174,8 @@ pub struct Options { long, env = "DATABASE_TYPE", value_enum, - required_unless_present("upstream_db_url") + required_unless_present("upstream_db_url"), + hide = true )] pub database_type: Option, @@ -183,11 +184,13 @@ pub struct Options { standalone: bool, /// The authority to use + // NOTE: hidden because the value can be derived from `--standalone` #[clap( long, env = "AUTHORITY", default_value_if("standalone", "true", Some("standalone")), - default_value = "consul" + default_value = "consul", + hide = true )] authority: AuthorityType, @@ -208,7 +211,7 @@ pub struct Options { log_slow: bool, /// Don't require authentication for any client connections - #[clap(long, env = "ALLOW_UNAUTHENTICATED_CONNECTIONS")] + #[clap(long, env = "ALLOW_UNAUTHENTICATED_CONNECTIONS", hide = true)] allow_unauthenticated_connections: bool, /// Specify the migration mode for ReadySet to use. The default "explicit" mode is the only @@ -230,7 +233,12 @@ pub struct Options { max_processing_minutes: u64, /// Sets the migration handlers's loop interval in milliseconds. - #[clap(long, env = "MIGRATION_TASK_INTERVAL", default_value = "20000")] + #[clap( + long, + env = "MIGRATION_TASK_INTERVAL", + default_value = "20000", + hide = true + )] migration_task_interval: u64, /// IP:PORT to host endpoint for scraping metrics from the adapter. @@ -291,7 +299,7 @@ pub struct Options { /// Allow executing, but ignore, unsupported `SET` statements. /// /// Takes precedence over any value passed to `--unsupported-set-mode` - #[clap(long, hide = true, env = "ALLOW_UNSUPPORTED_SET")] + #[clap(long, hide = true, env = "ALLOW_UNSUPPORTED_SET", hide = true)] allow_unsupported_set: bool, /// Configure how ReadySet behaves when receiving unsupported SET statements. @@ -302,12 +310,17 @@ pub struct Options { /// * "proxy" - proxy all subsequent statements // NOTE: In order to keep `allow_unsupported_set` hidden, we're keeping these two flags separate // and *not* marking them as conflicting with each other. - #[clap(long, env = "UNSUPPORTED_SET_MODE", default_value = "error")] + #[clap( + long, + env = "UNSUPPORTED_SET_MODE", + default_value = "error", + hide = true + )] unsupported_set_mode: UnsupportedSetMode, // TODO(DAN): require explicit migrations /// Specifies the polling interval in seconds for requesting views from the Leader. - #[clap(long, env = "VIEWS_POLLING_INTERVAL", default_value = "5")] + #[clap(long, env = "VIEWS_POLLING_INTERVAL", default_value = "5", hide = true)] views_polling_interval: u64, /// The time to wait before canceling a migration request. Defaults to 30 minutes. @@ -344,7 +357,7 @@ pub struct Options { fallback_recovery_seconds: u64, /// Whether to use non-blocking or blocking reads against the cache. - #[clap(long, env = "NON_BLOCKING_READS")] + #[clap(long, env = "NON_BLOCKING_READS", hide = true)] non_blocking_reads: bool, /// Run ReadySet in embedded readers mode, running reader replicas (and only reader replicas) @@ -377,14 +390,14 @@ pub struct Options { /// /// If set, we will create a cache with literals inlined in the unsupported placeholder /// positions every time the statement is executed with a new set of parameters. - #[clap(long, env = "EXPERIMENTAL_PLACEHOLDER_INLINING")] + #[clap(long, env = "EXPERIMENTAL_PLACEHOLDER_INLINING", hide = true)] experimental_placeholder_inlining: bool, /// Don't make connections to the upstream aatabase for new client connections. /// /// If this flag is set queries will never be proxied upstream - even if they are unsupported, /// fail to execute, or are run in a transaction. - #[clap(long, env = "NO_UPSTREAM_CONNECTIONS")] + #[clap(long, env = "NO_UPSTREAM_CONNECTIONS", hide = true)] no_upstream_connections: bool, /// If supplied we will clean up assets for the supplied deployment. If an upstream url is