Skip to content

Commit

Permalink
chore: add minimum client version to server info struct (#115)
Browse files Browse the repository at this point in the history
Signed-off-by: a3hadi <[email protected]>
  • Loading branch information
ayildirim21 authored Apr 9, 2024
1 parent 7009262 commit 100a9a4
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 31 deletions.
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"

// 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

0 comments on commit 100a9a4

Please sign in to comment.