Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <pingsutw@apache.org>
  • Loading branch information
pingsutw committed Oct 28, 2024
1 parent 76012f7 commit 2c971bf
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package utils
package common

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package utils
package common

import (
"testing"
Expand Down
3 changes: 1 addition & 2 deletions flytepropeller/pkg/compiler/transformers/k8s/inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/flyteorg/flyte/flytepropeller/pkg/compiler/common"
"github.com/flyteorg/flyte/flytepropeller/pkg/compiler/errors"
"github.com/flyteorg/flyte/flytepropeller/pkg/compiler/validators"
"github.com/flyteorg/flyte/flytestdlib/utils"
)

func validateInputs(nodeID common.NodeID, iface *core.TypedInterface, inputs core.LiteralMap, errs errors.CompileErrors) (ok bool) {
Expand Down Expand Up @@ -43,7 +42,7 @@ func validateInputs(nodeID common.NodeID, iface *core.TypedInterface, inputs cor
continue
}
if !validators.AreTypesCastable(inputType, v.Type) {
errs.Collect(errors.NewMismatchingTypesErr(nodeID, inputVar, utils.LiteralTypeToStr(v.Type), utils.LiteralTypeToStr(inputType)))
errs.Collect(errors.NewMismatchingTypesErr(nodeID, inputVar, common.LiteralTypeToStr(v.Type), common.LiteralTypeToStr(inputType)))
continue
}

Expand Down
7 changes: 3 additions & 4 deletions flytepropeller/pkg/compiler/validators/bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
c "github.com/flyteorg/flyte/flytepropeller/pkg/compiler/common"
"github.com/flyteorg/flyte/flytepropeller/pkg/compiler/errors"
"github.com/flyteorg/flyte/flytepropeller/pkg/compiler/typing"
"github.com/flyteorg/flyte/flytestdlib/utils"
)

func validateBinding(w c.WorkflowBuilder, node c.Node, nodeParam string, binding *flyte.BindingData,
Expand Down Expand Up @@ -132,7 +131,7 @@ func validateBinding(w c.WorkflowBuilder, node c.Node, nodeParam string, binding
// If the variable has an index. We expect param to be a collection.
if v.Index != nil {
if cType := param.GetType().GetCollectionType(); cType == nil {
errs.Collect(errors.NewMismatchingVariablesErr(nodeID, outputVar, utils.LiteralTypeToStr(param.Type), inputVar, utils.LiteralTypeToStr(expectedType)))
errs.Collect(errors.NewMismatchingVariablesErr(nodeID, outputVar, c.LiteralTypeToStr(param.Type), inputVar, c.LiteralTypeToStr(expectedType)))
} else {
sourceType = cType
}
Expand Down Expand Up @@ -165,7 +164,7 @@ func validateBinding(w c.WorkflowBuilder, node c.Node, nodeParam string, binding
return param.GetType(), []c.NodeID{val.Promise.NodeId}, true
}

errs.Collect(errors.NewMismatchingVariablesErr(node.GetId(), outputVar, utils.LiteralTypeToStr(sourceType), inputVar, utils.LiteralTypeToStr(expectedType)))
errs.Collect(errors.NewMismatchingVariablesErr(node.GetId(), outputVar, c.LiteralTypeToStr(sourceType), inputVar, c.LiteralTypeToStr(expectedType)))
return nil, nil, !errs.HasErrors()
}
}
Expand All @@ -181,7 +180,7 @@ func validateBinding(w c.WorkflowBuilder, node c.Node, nodeParam string, binding
if literalType == nil {
errs.Collect(errors.NewUnrecognizedValueErr(nodeID, reflect.TypeOf(val.Scalar.GetValue()).String()))
} else if validateParamTypes && !AreTypesCastable(literalType, expectedType) {
errs.Collect(errors.NewMismatchingTypesErr(nodeID, nodeParam, utils.LiteralTypeToStr(literalType), utils.LiteralTypeToStr(expectedType)))
errs.Collect(errors.NewMismatchingTypesErr(nodeID, nodeParam, c.LiteralTypeToStr(literalType), c.LiteralTypeToStr(expectedType)))
}

if expectedType.GetEnumType() != nil {
Expand Down
3 changes: 1 addition & 2 deletions flytepropeller/pkg/compiler/validators/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
flyte "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
c "github.com/flyteorg/flyte/flytepropeller/pkg/compiler/common"
"github.com/flyteorg/flyte/flytepropeller/pkg/compiler/errors"
"github.com/flyteorg/flyte/flytestdlib/utils"
)

func validateOperand(node c.NodeBuilder, paramName string, operand *flyte.Operand,
Expand Down Expand Up @@ -45,7 +44,7 @@ func ValidateBooleanExpression(w c.WorkflowBuilder, node c.NodeBuilder, expr *fl
if op1Valid && op2Valid && op1Type != nil && op2Type != nil {
if op1Type.String() != op2Type.String() {
errs.Collect(errors.NewMismatchingTypesErr(node.GetId(), "RightValue",
utils.LiteralTypeToStr(op1Type), utils.LiteralTypeToStr(op2Type)))
c.LiteralTypeToStr(op1Type), c.LiteralTypeToStr(op2Type)))
}
}
} else if expr.GetConjunction() != nil {
Expand Down
3 changes: 1 addition & 2 deletions flytepropeller/pkg/compiler/validators/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
flyte "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
c "github.com/flyteorg/flyte/flytepropeller/pkg/compiler/common"
"github.com/flyteorg/flyte/flytepropeller/pkg/compiler/errors"
"github.com/flyteorg/flyte/flytestdlib/utils"
)

func validateOutputVar(n c.NodeBuilder, paramName string, errs errors.CompileErrors) (
Expand Down Expand Up @@ -41,7 +40,7 @@ func validateInputVar(n c.NodeBuilder, paramName string, requireParamType bool,
func validateVarType(nodeID c.NodeID, paramName string, param *flyte.Variable,
expectedType *flyte.LiteralType, errs errors.CompileErrors) (ok bool) {
if param.GetType().String() != expectedType.String() {
errs.Collect(errors.NewMismatchingTypesErr(nodeID, paramName, utils.LiteralTypeToStr(param.GetType()), utils.LiteralTypeToStr(expectedType)))
errs.Collect(errors.NewMismatchingTypesErr(nodeID, paramName, c.LiteralTypeToStr(param.GetType()), c.LiteralTypeToStr(expectedType)))
}

return !errs.HasErrors()
Expand Down
2 changes: 0 additions & 2 deletions flytestdlib/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607
github.com/fatih/color v1.13.0
github.com/fatih/structtag v1.2.0
github.com/flyteorg/flyte/flyteidl v0.0.0-00010101000000-000000000000
github.com/flyteorg/stow v0.3.10
github.com/fsnotify/fsnotify v1.6.0
github.com/ghodss/yaml v1.0.0
Expand Down Expand Up @@ -154,7 +153,6 @@ require (
replace (
github.com/flyteorg/flyte/datacatalog => ../datacatalog
github.com/flyteorg/flyte/flyteadmin => ../flyteadmin
github.com/flyteorg/flyte/flyteidl => ../flyteidl
github.com/flyteorg/flyte/flyteplugins => ../flyteplugins
github.com/flyteorg/flyte/flytepropeller => ../flytepropeller
github.com/flyteorg/flyte/flytestdlib => ../flytestdlib
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/flyteorg/flyte/flyteadmin v0.0.0-00010101000000-000000000000
github.com/flyteorg/flyte/flytepropeller v0.0.0-00010101000000-000000000000
github.com/flyteorg/flyte/flytestdlib v0.0.0-00010101000000-000000000000
github.com/flyteorg/flytectl v0.0.0-00010101000000-000000000000
github.com/golang/glog v1.2.0
github.com/prometheus/client_golang v1.20.5
github.com/spf13/cobra v1.7.0
Expand All @@ -25,7 +24,7 @@ require (
cloud.google.com/go/storage v1.36.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/Azure/azure-sdk--forgo/sdk/internal v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
Expand Down Expand Up @@ -291,7 +290,6 @@ replace (
github.com/flyteorg/flyte/flyteplugins => ./flyteplugins
github.com/flyteorg/flyte/flytepropeller => ./flytepropeller
github.com/flyteorg/flyte/flytestdlib => ./flytestdlib
github.com/flyteorg/flytectl => ./flytectl
github.com/google/gnostic-models => github.com/google/gnostic-models v0.6.8
github.com/robfig/cron/v3 => github.com/unionai/cron/v3 v3.0.2-0.20220915080349-5790c370e63a
k8s.io/api => k8s.io/api v0.28.2
Expand Down

0 comments on commit 2c971bf

Please sign in to comment.