diff --git a/pageserver/src/bin/pageserver.rs b/pageserver/src/bin/pageserver.rs index fb79ad3945..46a36c6118 100644 --- a/pageserver/src/bin/pageserver.rs +++ b/pageserver/src/bin/pageserver.rs @@ -31,11 +31,20 @@ use utils::{ project_git_version!(GIT_VERSION); +const FEATURES: &[&str] = &[ + #[cfg(feature = "testing")] + "testing", + #[cfg(feature = "fail/failpoints")] + "fail/failpoints", + #[cfg(feature = "profiling")] + "profiling", +]; + fn version() -> String { format!( - "{GIT_VERSION} profiling:{} failpoints:{}", - cfg!(feature = "profiling"), - fail::has_failpoints() + "{GIT_VERSION} failpoints: {}, features: {:?}", + fail::has_failpoints(), + FEATURES, ) } @@ -86,13 +95,7 @@ fn main() -> anyhow::Result<()> { .get_matches(); if arg_matches.is_present("enabled-features") { - let features: &[&str] = &[ - #[cfg(feature = "testing")] - "testing", - #[cfg(feature = "profiling")] - "profiling", - ]; - println!("{{\"features\": {features:?} }}"); + println!("{{\"features\": {FEATURES:?} }}"); return Ok(()); } diff --git a/pageserver/src/http/routes.rs b/pageserver/src/http/routes.rs index e743f27aff..f1318cb325 100644 --- a/pageserver/src/http/routes.rs +++ b/pageserver/src/http/routes.rs @@ -784,7 +784,7 @@ async fn tenant_config_handler(mut request: Request
) -> Result