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

Update go updates #112

Merged
merged 2 commits into from
Jan 7, 2025
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
2 changes: 0 additions & 2 deletions atp/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ func testExecuteWithChannels(closeChannel bool, t *testing.T) {
wg.Wait()
}

//nolint:funlen
func TestProtocol_Client_ATP_v1(t *testing.T) {
// Client ReadSchema and Execute atp v1 happy path.
// This is not a fragile test because the ATP v1 is not changing. It is the legacy supported version.
Expand Down Expand Up @@ -741,7 +740,6 @@ func TestProtocol_Error_Server_WorkStart(t *testing.T) {
time.Sleep(time.Millisecond * 2)
}

//nolint:funlen
func TestProtocol_Error_Client_WorkStart(t *testing.T) {
// Induce error on client's (and server incidentally)
// start work message by closing the client's cbor
Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module go.flow.arcalot.io/pluginsdk

go 1.22.0
go 1.23.0

toolchain go1.23.4

require (
github.com/fxamacker/cbor/v2 v2.7.0
Expand All @@ -11,6 +13,6 @@ require (

require (
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/term v0.28.0 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ go.arcalot.io/assert v1.8.0 h1:hGcHMPncQXwQvjj7MbyOu2gg8VIBB00crUJZpeQOjxs=
go.arcalot.io/assert v1.8.0/go.mod h1:nNmWPoNUHFyrPkNrD2aASm5yPuAfiWdB/4X7Lw3ykHk=
go.arcalot.io/log/v2 v2.2.0 h1:a4wVAqQ/6zFyEG6I9Dnd7eFA52KKGaBK3hj9PgZ/e0c=
go.arcalot.io/log/v2 v2.2.0/go.mod h1:h/Hlyz6wH+mjRUKdL3W2fG2oMrAm2qgPxb0rNJJDUuY=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
1 change: 0 additions & 1 deletion schema/any_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ func TestAnyValidateCompatibilityLists(t *testing.T) {
}))
}

//nolint:funlen
func TestAnyValidateCompatibilityMaps(t *testing.T) {
// Test custom maps with schemas and data
s1 := schema.NewAnySchema()
Expand Down
2 changes: 2 additions & 0 deletions schema/bool.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ func (b BoolSchema) Unserialize(data any) (any, error) {
case int:
return intConverter(int64(v))
case uint:
//nolint:gosec // Not a security problem. It's only checking for 0 or 1 values.
return intConverter(int64(v))
case int64:
return intConverter(v)
case uint64:
//nolint:gosec // Not a security problem. It's only checking for 0 or 1 values.
return intConverter(int64(v))
case int32:
return intConverter(int64(v))
Expand Down
3 changes: 3 additions & 0 deletions schema/int.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ func intInputMapper(data any, u *UnitsDefinition) (int64, error) {
case int:
return int64(v), nil
case uint:
if v > math.MaxInt64 {
return 0, fmt.Errorf("number is too large for an int64: %d", v)
}
return int64(v), nil
case int32:
return int64(v), nil
Expand Down
2 changes: 0 additions & 2 deletions schema/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ func TestMapSchemaTypesValidation(t *testing.T) {
}()
}

//nolint:funlen
func TestMapSchemaCompatibilityValidation(t *testing.T) {
s1 := schema.NewMapSchema(
schema.NewStringSchema(nil, nil, nil),
Expand Down Expand Up @@ -273,7 +272,6 @@ func TestMapSchemaCompatibilityValidation(t *testing.T) {
assert.Error(t, s1.ValidateCompatibility(schema.NewIntEnumSchema(map[int64]*schema.DisplayValue{}, nil)))
}

//nolint:funlen
func TestMapCompatibilityValidation(t *testing.T) {
s1 := schema.NewMapSchema(
schema.NewStringSchema(nil, nil, nil),
Expand Down
Loading