Skip to content

Commit

Permalink
support upstream STRUCT downstream JSON case
Browse files Browse the repository at this point in the history
Signed-off-by: Future-Outlier <[email protected]>
  • Loading branch information
Future-Outlier committed Aug 5, 2024
1 parent f3682da commit 108350f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flytepropeller/pkg/compiler/validators/typing.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func (t trivialChecker) CastsFrom(upstreamType *flyte.LiteralType) bool {
downstreamTypeCopy.Metadata = &structpb.Struct{}
upstreamTypeCopy.Annotation = &flyte.TypeAnnotation{}
downstreamTypeCopy.Annotation = &flyte.TypeAnnotation{}
// Handle upstream: STRUCT, downstream JSON
if upstreamTypeCopy.GetSimple() == flyte.SimpleType_STRUCT && downstreamTypeCopy.GetSimple() == flyte.SimpleType_JSON {
return true

Check warning on line 49 in flytepropeller/pkg/compiler/validators/typing.go

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/compiler/validators/typing.go#L49

Added line #L49 was not covered by tests
}
return upstreamTypeCopy.String() == downstreamTypeCopy.String()
}

Expand Down

0 comments on commit 108350f

Please sign in to comment.