From ec4178f7fb6493d919321b5e6e655763322a6a0b Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Fri, 2 Aug 2024 16:47:14 +0800 Subject: [PATCH] feat: support initializing license key from env var Signed-off-by: Bugen Zhao --- src/frontend/src/handler/variable.rs | 1 + src/meta/node/src/lib.rs | 6 ++++++ src/meta/src/controller/system_param.rs | 1 - src/meta/src/manager/system_param/mod.rs | 1 - 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/handler/variable.rs b/src/frontend/src/handler/variable.rs index 96fd232215cc..506647ad65e3 100644 --- a/src/frontend/src/handler/variable.rs +++ b/src/frontend/src/handler/variable.rs @@ -152,6 +152,7 @@ async fn handle_show_system_params(handler_args: HandlerArgs) -> Result, + /// The license key to activate enterprise features. + #[educe(Debug(ignore))] + #[clap(long, hide = true, env = "RW_LICENSE_KEY")] + #[override_opts(path = system.license_key)] + pub license_key: Option, + /// 128-bit AES key for secret store in HEX format. #[educe(Debug(ignore))] #[clap(long, hide = true, env = "RW_SECRET_STORE_PRIVATE_KEY_HEX")] diff --git a/src/meta/src/controller/system_param.rs b/src/meta/src/controller/system_param.rs index 75b1e22cb1f9..ba7eee9e96bb 100644 --- a/src/meta/src/controller/system_param.rs +++ b/src/meta/src/controller/system_param.rs @@ -143,7 +143,6 @@ impl SystemParamsController { let params = SystemParameter::find().all(&db).await?; let params = merge_params(system_params_from_db(params)?, init_params); - info!("system parameters: {:?}", params); check_missing_params(¶ms).map_err(|e| anyhow!(e))?; let ctl = Self { diff --git a/src/meta/src/manager/system_param/mod.rs b/src/meta/src/manager/system_param/mod.rs index dbc4a743fa72..a471bbe6dbf8 100644 --- a/src/meta/src/manager/system_param/mod.rs +++ b/src/meta/src/manager/system_param/mod.rs @@ -77,7 +77,6 @@ impl SystemParamsManager { return Err(require_sql_meta_store_err().into()); } - info!("system parameters: {:?}", params); check_missing_params(¶ms).map_err(|e| anyhow!(e))?; Ok(Self {