From 6fd1a7ef9dc21b3c51a619c8b0162e8600f2ed9f Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Fri, 13 Sep 2024 11:00:36 -0400 Subject: [PATCH] include rust in version compatibility matrix Signed-off-by: Keran Yang --- pkg/sdkclient/serverinfo/serverinfo_test.go | 16 ++++++++++++++++ pkg/sdkclient/serverinfo/types.go | 2 ++ 2 files changed, 18 insertions(+) diff --git a/pkg/sdkclient/serverinfo/serverinfo_test.go b/pkg/sdkclient/serverinfo/serverinfo_test.go index 4886b9f796..e96919e243 100644 --- a/pkg/sdkclient/serverinfo/serverinfo_test.go +++ b/pkg/sdkclient/serverinfo/serverinfo_test.go @@ -135,6 +135,7 @@ func Test_CheckSDKCompatibility(t *testing.T) { Go: "0.6.0-0", Python: "0.6.0a", Java: "0.6.0-0", + Rust: "0.1.0", } tests := []struct { name string @@ -174,6 +175,21 @@ func Test_CheckSDKCompatibility(t *testing.T) { minimumSupportedSDKVersions: testMinimumSupportedSDKVersions, shouldErr: false, }, + { + name: "Test with incompatible Rust version", + sdkVersion: "v0.0.3", + sdkLanguage: Rust, + minimumSupportedSDKVersions: testMinimumSupportedSDKVersions, + shouldErr: true, + errMessage: "SDK version 0.0.3 must be upgraded to at least 0.1.0, in order to work with current numaflow version", + }, + { + name: "Test with compatible Rust version", + sdkVersion: "v0.1.1", + sdkLanguage: Rust, + minimumSupportedSDKVersions: testMinimumSupportedSDKVersions, + shouldErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/pkg/sdkclient/serverinfo/types.go b/pkg/sdkclient/serverinfo/types.go index ca117e1d98..fc8fdd9b81 100644 --- a/pkg/sdkclient/serverinfo/types.go +++ b/pkg/sdkclient/serverinfo/types.go @@ -22,6 +22,7 @@ const ( Go Language = "go" Python Language = "python" Java Language = "java" + Rust Language = "rust" ) type sdkConstraints map[Language]string @@ -30,6 +31,7 @@ var minimumSupportedSDKVersions = sdkConstraints{ Go: "0.8.0", Python: "0.8.0", Java: "0.8.0", + Rust: "0.1.0", } type Protocol string