Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add minimum client version to server info struct #115

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkg/info/server_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ func Test_Read_Write(t *testing.T) {
filepath := os.TempDir() + "/server-info"
defer os.Remove(filepath)
info := &ServerInfo{
Protocol: TCP,
Language: Java,
Version: "11",
Metadata: map[string]string{"key1": "value1", "key2": "value2"},
Protocol: TCP,
Language: Java,
MinimumClientVersion: MinimumClientVersion,
Version: "11",
Metadata: map[string]string{"key1": "value1", "key2": "value2"},
}
err := Write(info, WithServerInfoFilePath(filepath))
assert.NoError(t, err)
Expand Down
11 changes: 7 additions & 4 deletions pkg/info/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ const (
Java Language = "java"
)

const MinimumClientVersion = ">= 1.2.0-0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's create a release.md file and document that this field should be updated if there is a change?


// ServerInfo is the information about the server
type ServerInfo struct {
Protocol Protocol `json:"protocol"`
Language Language `json:"language"`
Version string `json:"version"`
Metadata map[string]string `json:"metadata"`
Protocol Protocol `json:"protocol"`
Language Language `json:"language"`
MinimumClientVersion string `json:"minimumClientVersion"`
Version string `json:"version"`
Metadata map[string]string `json:"metadata"`
}
2 changes: 1 addition & 1 deletion pkg/mapper/examples/even_odd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/mapper/examples/flatmap/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/mapper/examples/forward_message/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/mapper/examples/retry/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/mapper/examples/tickgen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/mapstreamer/examples/flatmap_stream/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/reducer/examples/counter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/reducer/examples/sum/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/reducestreamer/examples/counter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/reducestreamer/examples/sum/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/sessionreducer/examples/counter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
replace github.com/numaproj/numaflow-go => ../../../..

require (
github.com/numaproj/numaflow-go v0.6.0
github.com/numaproj/numaflow-go v0.7.0-rc1
go.uber.org/atomic v1.11.0
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/sessionreducer/examples/sum/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
replace github.com/numaproj/numaflow-go => ../../../..

require (
github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069
github.com/numaproj/numaflow-go v0.7.0-rc1
go.uber.org/atomic v1.11.0
)

Expand Down
4 changes: 0 additions & 4 deletions pkg/sessionreducer/examples/sum/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY=
github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI=
github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 h1:yY1ZjhfqdxE9H4T9YRff+GJHilv9CJgslWEYfsE/EPo=
github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
Expand Down
2 changes: 1 addition & 1 deletion pkg/shared/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
func PrepareServer(sockAddr string, infoFilePath string) (net.Listener, error) {
// If infoFilePath is not empty, write the server info to the file.
if infoFilePath != "" {
serverInfo := &info.ServerInfo{Protocol: info.UDS, Language: info.Go, Version: info.GetSDKVersion()}
serverInfo := &info.ServerInfo{Protocol: info.UDS, Language: info.Go, MinimumClientVersion: info.MinimumClientVersion, Version: info.GetSDKVersion()}
if err := info.Write(serverInfo, info.WithServerInfoFilePath(infoFilePath)); err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/sideinput/examples/simple-sideinput/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/sideinput/examples/simple-sideinput/udf/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replace github.com/numaproj/numaflow-go => ../../../../..

require (
github.com/fsnotify/fsnotify v1.6.0
github.com/numaproj/numaflow-go v0.6.0
github.com/numaproj/numaflow-go v0.7.0-rc1
)

require (
Expand Down
2 changes: 1 addition & 1 deletion pkg/sinker/examples/log/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/sourcer/examples/simple_source/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replace github.com/numaproj/numaflow-go => ../../../..

require (
github.com/google/uuid v1.3.0
github.com/numaproj/numaflow-go v0.6.0
github.com/numaproj/numaflow-go v0.7.0-rc1
github.com/stretchr/testify v1.8.1
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/sourcetransformer/examples/assign_event_time/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

replace github.com/numaproj/numaflow-go => ../../../..

require github.com/numaproj/numaflow-go v0.6.0
require github.com/numaproj/numaflow-go v0.7.0-rc1

require (
github.com/golang/protobuf v1.5.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/sourcetransformer/examples/event_time_filter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
replace github.com/numaproj/numaflow-go => ../../../..

require (
github.com/numaproj/numaflow-go v0.6.0
github.com/numaproj/numaflow-go v0.7.0-rc1
github.com/stretchr/testify v1.8.1
)

Expand Down
Loading