Use PageserverConf field for dev mode instead of CLI flag

Co-Authored-By: John Spray <john@neon.tech>
This commit is contained in:
Devin AI
2025-04-11 13:57:12 +00:00
parent 7cdb292b37
commit 0efe08b74f
3 changed files with 9 additions and 1 deletions

View File

@@ -180,6 +180,8 @@ pub struct ConfigToml {
#[serde(skip_serializing_if = "Option::is_none")]
pub generate_unarchival_heatmap: Option<bool>,
pub tracing: Option<Tracing>,
pub dev_mode: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
@@ -631,6 +633,7 @@ impl Default for ConfigToml {
load_previous_heatmap: None,
generate_unarchival_heatmap: None,
tracing: None,
dev_mode: false,
}
}
}

View File

@@ -79,7 +79,7 @@ fn main() -> anyhow::Result<()> {
return Ok(());
}
let dev_mode = arg_matches.get_flag("dev");
let cli_dev_mode = arg_matches.get_flag("dev");
// Initialize up failpoints support
let scenario = failpoint_support::init();
@@ -101,6 +101,8 @@ fn main() -> anyhow::Result<()> {
let (conf, ignored) = initialize_config(&identity_file_path, &cfg_file_path, &workdir)?;
let dev_mode = cli_dev_mode || conf.dev_mode;
if !dev_mode {
if matches!(conf.http_auth_type, AuthType::Trust)
|| matches!(conf.pg_auth_type, AuthType::Trust)

View File

@@ -219,6 +219,8 @@ pub struct PageServerConf {
pub generate_unarchival_heatmap: bool,
pub tracing: Option<pageserver_api::config::Tracing>,
pub dev_mode: bool,
}
/// Token for authentication to safekeepers
@@ -441,6 +443,7 @@ impl PageServerConf {
page_service_pipelining,
get_vectored_concurrent_io,
tracing,
dev_mode,
// ------------------------------------------------------------
// fields that require additional validation or custom handling