From db133a91d32f326caa2784db0697feb326df5b5d Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Thu, 19 Sep 2024 20:58:14 -0400 Subject: [PATCH 1/3] docs: add instructions on minimum numaflow version update Signed-off-by: Keran Yang --- src/shared.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/shared.rs b/src/shared.rs index d65709f..9c9e412 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -14,7 +14,23 @@ use tracing::info; 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"; + +// Minimum version of Numaflow required by the current SDK version +// +// How to update this value: +// 1. If the minimum version is a rc version, then directly put the rc version string. +// E.g., if the minimum version is 1.3.1-rc1, then put "1.3.1-rc1" +// 2. If the minimum version is a stable version, then put the stable version string followed by "-z". +// E.g., if the minimum version is 1.3.1, then put "1.3.1-z" +// +// Why "-z"? +// It's to support validating pre-releases like rc1, rc2 with the constraint. +// The semantic versioning library(https://github.com/Masterminds/semver) we use +// to evaluate the version constraint requires specifying a pre-release version in the constraint, +// to be able to compare with a pre-release version. +// To translate the constraint of ">= a.b.c" into a pre-release one, we use ">=a.b.c-z", +// as `z` is relatively the largest character in the ASCII table. +const MINIMUM_NUMAFLOW_VERSION: &str = "1.3.1-z"; const SDK_VERSION: &str = env!("CARGO_PKG_VERSION"); // ServerInfo structure to store server-related information From 4ee33535154a763cf9b6c4fa3989681e2fe48e5c Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Thu, 19 Sep 2024 21:08:38 -0400 Subject: [PATCH 2/3] . Signed-off-by: Keran Yang --- src/shared.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/shared.rs b/src/shared.rs index 9c9e412..9bb77a5 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -24,12 +24,14 @@ pub(crate) const BATCH_MAP: &str = "batch-map"; // E.g., if the minimum version is 1.3.1, then put "1.3.1-z" // // Why "-z"? -// It's to support validating pre-releases like rc1, rc2 with the constraint. -// The semantic versioning library(https://github.com/Masterminds/semver) we use -// to evaluate the version constraint requires specifying a pre-release version in the constraint, -// to be able to compare with a pre-release version. +// It's to support validating pre-releases like rc1, rc2. +// A pre-release a.b.c-rc1 is considered smaller than a.b.c, but the semantic versioning library +// cannot validate a.b.c-rc1 against a constraint of ">= a.b.c". +// Instead, the library(https://github.com/Masterminds/semver) requires a pre-release version in the version constraint, +// to be able to validate a pre-release version. // To translate the constraint of ">= a.b.c" into a pre-release one, we use ">=a.b.c-z", -// as `z` is relatively the largest character in the ASCII table. +// because `z` is relatively the largest character in the ASCII table. +// All the rc versions are considered smaller than `z`. const MINIMUM_NUMAFLOW_VERSION: &str = "1.3.1-z"; const SDK_VERSION: &str = env!("CARGO_PKG_VERSION"); From fd822f5c240df0b1f625b9bc97ec67674d231590 Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Fri, 20 Sep 2024 11:13:34 -0400 Subject: [PATCH 3/3] . Signed-off-by: Keran Yang --- src/shared.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/shared.rs b/src/shared.rs index 9bb77a5..af4c08e 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -17,21 +17,21 @@ pub(crate) const BATCH_MAP: &str = "batch-map"; // Minimum version of Numaflow required by the current SDK version // -// How to update this value: -// 1. If the minimum version is a rc version, then directly put the rc version string. -// E.g., if the minimum version is 1.3.1-rc1, then put "1.3.1-rc1" -// 2. If the minimum version is a stable version, then put the stable version string followed by "-z". -// E.g., if the minimum version is 1.3.1, then put "1.3.1-z" +// Updating this value: +// 1. For release candidate (RC) versions, use the RC version string directly. +// Example: For version 1.3.1-rc1, enter "1.3.1-rc1" +// 2. For stable versions, append "-z" to the stable version string. +// Example: For version 1.3.1, enter "1.3.1-z" // -// Why "-z"? -// It's to support validating pre-releases like rc1, rc2. -// A pre-release a.b.c-rc1 is considered smaller than a.b.c, but the semantic versioning library -// cannot validate a.b.c-rc1 against a constraint of ">= a.b.c". -// Instead, the library(https://github.com/Masterminds/semver) requires a pre-release version in the version constraint, -// to be able to validate a pre-release version. -// To translate the constraint of ">= a.b.c" into a pre-release one, we use ">=a.b.c-z", -// because `z` is relatively the largest character in the ASCII table. -// All the rc versions are considered smaller than `z`. +// Why use "-z"? +// The "-z" suffix allows validation of pre-release versions (e.g., rc1, rc2) against the minimum version. +// In semantic versioning, a pre-release version like a.b.c-rc1 is considered less than its stable counterpart a.b.c. +// However, the semantic versioning library (https://github.com/Masterminds/semver) does not support directly validating +// a pre-release version against a constraint like ">= a.b.c". +// For it to work, a pre-release must be specified in the constraint. +// Therefore, we translate ">= a.b.c" into ">= a.b.c-z". +// The character 'z' is the largest in the ASCII table, ensuring that all RC versions are recognized as +// smaller than any stable version suffixed with '-z'. const MINIMUM_NUMAFLOW_VERSION: &str = "1.3.1-z"; const SDK_VERSION: &str = env!("CARGO_PKG_VERSION");