Skip to content

Commit

Permalink
chore: update version compatibility matrix (#2212)
Browse files Browse the repository at this point in the history
Signed-off-by: Keran Yang <[email protected]>
  • Loading branch information
KeranYang authored Nov 8, 2024
1 parent 63d5f77 commit afe6914
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe
github.com/nats-io/nats-server/v2 v2.10.20
github.com/nats-io/nats.go v1.37.0
github.com/numaproj/numaflow-go v0.8.2-0.20241030023053-f6819383aa7b
github.com/numaproj/numaflow-go v0.9.0
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.55.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDm
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/numaproj/numaflow-go v0.8.2-0.20241030023053-f6819383aa7b h1:UEhFHfBwe2DwtnYzdFteTZ2tKwMX739llzfebfEMGg4=
github.com/numaproj/numaflow-go v0.8.2-0.20241030023053-f6819383aa7b/go.mod h1:FaCMeV0V9SiLcVf2fwT+GeTJHNaK2gdQsTAIqQ4x7oc=
github.com/numaproj/numaflow-go v0.9.0 h1:+bIREyAys6ArWdnTJb6FUbrhLf2oTF6hb+8x65Qzrws=
github.com/numaproj/numaflow-go v0.9.0/go.mod h1:FaCMeV0V9SiLcVf2fwT+GeTJHNaK2gdQsTAIqQ4x7oc=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdkclient/serverinfo/serverinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Test_SDKServerInfo(t *testing.T) {
Protocol: TCP,
Language: Java,
MinimumNumaflowVersion: "1.3.0-rc1",
Version: "v0.8.0",
Version: "v0.9.0",
Metadata: map[string]string{"key1": "value1", "key2": "value2"},
}
err := write(info, WithServerInfoFilePath(filepath))
Expand Down
61 changes: 30 additions & 31 deletions pkg/sdkclient/serverinfo/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,49 +81,48 @@ This is because the go semver library considers pre-releases to be invalid if th
Therefore, we have to put a pre-release version of the stable version in the map and choose the largest one.
For python, we use "rc100" as the largest pre-release version. For go, rust, we use "-z" as the largest pre-release version.
E.g., if the minimum supported version is "0.8.0", then put "0.8.0-z" for java, go, rust, "0.8.0rc100" for python.
A constraint ">=0.8.0-z" will match any pre-release version of 0.8.0, including "0.8.0-rc1", "0.8.0-rc2", etc.
More details about version comparison can be found in the PEP 440 and semver documentation.
*/
var minimumSupportedSDKVersions = sdkConstraints{
Python: map[ContainerType]string{
// meaning the minimum supported python SDK version is 0.8.0
sourcer: "0.8.0rc100",
sourcetransformer: "0.8.0rc100",
sinker: "0.8.0rc100",
mapper: "0.8.0rc100",
reducer: "0.8.0rc100",
reducestreamer: "0.8.0rc100",
sessionreducer: "0.8.0rc100",
sideinput: "0.8.0rc100",
fbsinker: "0.8.0rc100",
// meaning the minimum supported python SDK version is 0.9.0
sourcer: "0.9.0rc100",
sourcetransformer: "0.9.0rc100",
sinker: "0.9.0rc100",
mapper: "0.9.0rc100",
reducer: "0.9.0rc100",
reducestreamer: "0.9.0rc100",
sessionreducer: "0.9.0rc100",
sideinput: "0.9.0rc100",
fbsinker: "0.9.0rc100",
},
Go: map[ContainerType]string{
// meaning the minimum supported go SDK version is 0.8.0
sourcer: "0.8.0-z",
sourcetransformer: "0.8.0-z",
sinker: "0.8.0-z",
mapper: "0.8.0-z",
reducer: "0.8.0-z",
reducestreamer: "0.8.0-z",
sessionreducer: "0.8.0-z",
sideinput: "0.8.0-z",
fbsinker: "0.8.0-z",
sourcer: "0.9.0-z",
sourcetransformer: "0.9.0-z",
sinker: "0.9.0-z",
mapper: "0.9.0-z",
reducer: "0.9.0-z",
reducestreamer: "0.9.0-z",
sessionreducer: "0.9.0-z",
sideinput: "0.9.0-z",
fbsinker: "0.9.0-z",
},
Java: map[ContainerType]string{
// meaning the minimum supported go SDK version is 0.8.0
sourcer: "0.8.0-z",
sourcetransformer: "0.8.0-z",
sinker: "0.8.0-z",
mapper: "0.8.0-z",
reducer: "0.8.0-z",
reducestreamer: "0.8.0-z",
sessionreducer: "0.8.0-z",
sideinput: "0.8.0-z",
fbsinker: "0.8.0-z",
// meaning the minimum supported java SDK version is 0.8.0
sourcer: "0.9.0-z",
sourcetransformer: "0.9.0-z",
sinker: "0.9.0-z",
mapper: "0.9.0-z",
reducer: "0.9.0-z",
reducestreamer: "0.9.0-z",
sessionreducer: "0.9.0-z",
sideinput: "0.9.0-z",
fbsinker: "0.9.0-z",
},
Rust: map[ContainerType]string{
// meaning the minimum supported go SDK version is 0.1.0
// meaning the minimum supported rust SDK version is 0.2.0
sourcer: "0.1.0-z",
sourcetransformer: "0.1.0-z",
sinker: "0.1.0-z",
Expand Down
17 changes: 9 additions & 8 deletions rust/numaflow-core/src/monovertex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,6 @@ mod tests {

#[tokio::test]
async fn run_forwarder() {
let (src_shutdown_tx, src_shutdown_rx) = tokio::sync::oneshot::channel();
let tmp_dir = tempfile::TempDir::new().unwrap();
let src_sock_file = tmp_dir.path().join("source.sock");
let src_info_file = tmp_dir.path().join("sourcer-server-info");
let server_info_obj = ServerInfo {
protocol: "uds".to_string(),
language: "rust".to_string(),
Expand All @@ -345,6 +341,11 @@ mod tests {
metadata: None,
};

let (src_shutdown_tx, src_shutdown_rx) = tokio::sync::oneshot::channel();
let tmp_dir = tempfile::TempDir::new().unwrap();
let src_sock_file = tmp_dir.path().join("source.sock");
let src_info_file = tmp_dir.path().join("sourcer-server-info");

write_server_info(src_info_file.to_str().unwrap(), &server_info_obj)
.await
.unwrap();
Expand All @@ -363,14 +364,14 @@ mod tests {
let (sink_shutdown_tx, sink_shutdown_rx) = tokio::sync::oneshot::channel();
let tmp_dir = tempfile::TempDir::new().unwrap();
let sink_sock_file = tmp_dir.path().join("sink.sock");
let sink_server_info = tmp_dir.path().join("sinker-server-info");
let sink_info_file = tmp_dir.path().join("sinker-server-info");

write_server_info(sink_server_info.to_str().unwrap(), &server_info_obj)
write_server_info(sink_info_file.to_str().unwrap(), &server_info_obj)
.await
.unwrap();

let server_socket = sink_sock_file.clone();
let server_info = sink_server_info.clone();
let server_info = sink_info_file.clone();
let sink_server_handle = tokio::spawn(async move {
sink::Server::new(SimpleSink)
.with_socket_file(server_socket)
Expand Down Expand Up @@ -408,7 +409,7 @@ mod tests {
components::sink::UserDefinedConfig {
socket_path: sink_sock_file.to_str().unwrap().to_string(),
grpc_max_message_size: 1024,
server_info_path: sink_server_info.to_str().unwrap().to_string(),
server_info_path: sink_info_file.to_str().unwrap().to_string(),
},
),
retry_config: Default::default(),
Expand Down
26 changes: 13 additions & 13 deletions rust/numaflow-core/src/shared/server_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn check_sdk_compatibility(

if !specifiers.contains(&sdk_version_pep440) {
return Err(Error::ServerInfo(format!(
"SDK version {} must be upgraded to at least {}, in order to work with the current numaflow version",
"Python SDK version {} must be upgraded to at least {}, in order to work with the current numaflow version",
sdk_version_pep440, human_readable(sdk_required_version)
)));
}
Expand Down Expand Up @@ -358,20 +358,20 @@ mod version {
// NOTE: the string content of the keys matches the corresponding server info file name.
// DO NOT change it unless the server info file name is changed.
let mut go_version_map = HashMap::new();
go_version_map.insert("sourcer".to_string(), "0.8.0-z".to_string());
go_version_map.insert("sourcetransformer".to_string(), "0.8.0-z".to_string());
go_version_map.insert("sinker".to_string(), "0.8.0-z".to_string());
go_version_map.insert("fb-sinker".to_string(), "0.8.0-z".to_string());
go_version_map.insert("sourcer".to_string(), "0.9.0-z".to_string());
go_version_map.insert("sourcetransformer".to_string(), "0.9.0-z".to_string());
go_version_map.insert("sinker".to_string(), "0.9.0-z".to_string());
go_version_map.insert("fb-sinker".to_string(), "0.9.0-z".to_string());
let mut python_version_map = HashMap::new();
python_version_map.insert("sourcer".to_string(), "0.8.0rc100".to_string());
python_version_map.insert("sourcetransformer".to_string(), "0.8.0rc100".to_string());
python_version_map.insert("sinker".to_string(), "0.8.0rc100".to_string());
python_version_map.insert("fb-sinker".to_string(), "0.8.0rc100".to_string());
python_version_map.insert("sourcer".to_string(), "0.9.0rc100".to_string());
python_version_map.insert("sourcetransformer".to_string(), "0.9.0rc100".to_string());
python_version_map.insert("sinker".to_string(), "0.9.0rc100".to_string());
python_version_map.insert("fb-sinker".to_string(), "0.9.0rc100".to_string());
let mut java_version_map = HashMap::new();
java_version_map.insert("sourcer".to_string(), "0.8.0-z".to_string());
java_version_map.insert("sourcetransformer".to_string(), "0.8.0-z".to_string());
java_version_map.insert("sinker".to_string(), "0.8.0-z".to_string());
java_version_map.insert("fb-sinker".to_string(), "0.8.0-z".to_string());
java_version_map.insert("sourcer".to_string(), "0.9.0-z".to_string());
java_version_map.insert("sourcetransformer".to_string(), "0.9.0-z".to_string());
java_version_map.insert("sinker".to_string(), "0.9.0-z".to_string());
java_version_map.insert("fb-sinker".to_string(), "0.9.0-z".to_string());
let mut rust_version_map = HashMap::new();
rust_version_map.insert("sourcer".to_string(), "0.1.0-z".to_string());
rust_version_map.insert("sourcetransformer".to_string(), "0.1.0-z".to_string());
Expand Down

0 comments on commit afe6914

Please sign in to comment.