From e9d195f77faffe1bd4dd213e5b94f13faac0ec73 Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Mon, 9 Sep 2024 10:49:40 -0400 Subject: [PATCH 1/4] chore: retrieve sdk version from env Signed-off-by: Keran Yang --- src/shared.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared.rs b/src/shared.rs index 3261870..d05a499 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -15,6 +15,7 @@ pub(crate) const MAP_MODE_KEY: &str = "MAP_MODE"; pub(crate) const UNARY_MAP: &str = "unary-map"; pub(crate) const BATCH_MAP: &str = "batch-map"; const MINIMUM_NUMAFLOW_VERSION: &str = "1.3.1"; +const SDK_VERSION: &str = env!("CARGO_PKG_VERSION"); // ServerInfo structure to store server-related information #[derive(Serialize, Deserialize, Debug)] @@ -39,11 +40,12 @@ impl ServerInfo { let metadata: HashMap = HashMap::new(); // Return the default server info json content // Create a ServerInfo object with default values + info!("keran is testing, the current sdk version is: {}", SDK_VERSION); ServerInfo { protocol: "uds".to_string(), language: "rust".to_string(), minimum_numaflow_version: MINIMUM_NUMAFLOW_VERSION.to_string(), - version: "0.0.1".to_string(), + version: SDK_VERSION.to_string(), metadata: Option::from(metadata), } } From 16f58506112df36285858fabadfc18ee221c657f Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Mon, 9 Sep 2024 10:54:07 -0400 Subject: [PATCH 2/4] Revert "chore: retrieve sdk version from env" This reverts commit e9d195f77faffe1bd4dd213e5b94f13faac0ec73. --- src/shared.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/shared.rs b/src/shared.rs index d05a499..3261870 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -15,7 +15,6 @@ pub(crate) const MAP_MODE_KEY: &str = "MAP_MODE"; pub(crate) const UNARY_MAP: &str = "unary-map"; pub(crate) const BATCH_MAP: &str = "batch-map"; const MINIMUM_NUMAFLOW_VERSION: &str = "1.3.1"; -const SDK_VERSION: &str = env!("CARGO_PKG_VERSION"); // ServerInfo structure to store server-related information #[derive(Serialize, Deserialize, Debug)] @@ -40,12 +39,11 @@ impl ServerInfo { let metadata: HashMap = HashMap::new(); // Return the default server info json content // Create a ServerInfo object with default values - info!("keran is testing, the current sdk version is: {}", SDK_VERSION); ServerInfo { protocol: "uds".to_string(), language: "rust".to_string(), minimum_numaflow_version: MINIMUM_NUMAFLOW_VERSION.to_string(), - version: SDK_VERSION.to_string(), + version: "0.0.1".to_string(), metadata: Option::from(metadata), } } From a30e8cc2e9048d05ea3689568afb6b6b4480ee44 Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Mon, 9 Sep 2024 10:54:41 -0400 Subject: [PATCH 3/4] Revert "Revert "chore: retrieve sdk version from env"" This reverts commit 16f58506112df36285858fabadfc18ee221c657f. --- src/shared.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared.rs b/src/shared.rs index 3261870..d05a499 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -15,6 +15,7 @@ pub(crate) const MAP_MODE_KEY: &str = "MAP_MODE"; pub(crate) const UNARY_MAP: &str = "unary-map"; pub(crate) const BATCH_MAP: &str = "batch-map"; const MINIMUM_NUMAFLOW_VERSION: &str = "1.3.1"; +const SDK_VERSION: &str = env!("CARGO_PKG_VERSION"); // ServerInfo structure to store server-related information #[derive(Serialize, Deserialize, Debug)] @@ -39,11 +40,12 @@ impl ServerInfo { let metadata: HashMap = HashMap::new(); // Return the default server info json content // Create a ServerInfo object with default values + info!("keran is testing, the current sdk version is: {}", SDK_VERSION); ServerInfo { protocol: "uds".to_string(), language: "rust".to_string(), minimum_numaflow_version: MINIMUM_NUMAFLOW_VERSION.to_string(), - version: "0.0.1".to_string(), + version: SDK_VERSION.to_string(), metadata: Option::from(metadata), } } From 14b1b346d3fb6c75cc8f252f18b67868c6d63328 Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Mon, 9 Sep 2024 10:56:29 -0400 Subject: [PATCH 4/4] . Signed-off-by: Keran Yang --- src/shared.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared.rs b/src/shared.rs index d05a499..d65709f 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -40,7 +40,6 @@ impl ServerInfo { let metadata: HashMap = HashMap::new(); // Return the default server info json content // Create a ServerInfo object with default values - info!("keran is testing, the current sdk version is: {}", SDK_VERSION); ServerInfo { protocol: "uds".to_string(), language: "rust".to_string(),