Skip to content

Commit

Permalink
include rust in version compatibility matrix
Browse files Browse the repository at this point in the history
Signed-off-by: Keran Yang <[email protected]>
  • Loading branch information
KeranYang committed Sep 13, 2024
1 parent c964c16 commit 6fd1a7e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/sdkclient/serverinfo/serverinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions pkg/sdkclient/serverinfo/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
Go Language = "go"
Python Language = "python"
Java Language = "java"
Rust Language = "rust"
)

type sdkConstraints map[Language]string
Expand All @@ -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
Expand Down

0 comments on commit 6fd1a7e

Please sign in to comment.