You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR flyteorg/flytepropeller#373 added support for union types, but also removed an extra check that allows having None values as default values for types like collections.
This change introduced a regression, that affects empty defaults for a workflow parameter. Example
Compilation now fails. This is because, in protobuf to represent an empty type the only option is to support empty messages.
The empty type check happens in Flyteadmin here
Note, that the default value is not None, and the guessed type for an empty list - [] is of type collection:None
After the PR#373 the isVoid check was removed, which implies that collection:None is no longer castable to collection:int
I think one of the problems is guessing the type on the RHS, but there does not seem to be a better option
Expected behavior
Users should be able to use l = [] or m = {} as default values
parameters {
key: "i"
value {
var {
type {
map_value_type {
simple: INTEGER
}
}
description: "i"
}
default {
map {
}
}
}
Screenshots
No response
Are you sure this issue hasn't been raised already?
Yes
Have you read the Code of Conduct?
Yes
The text was updated successfully, but these errors were encountered:
kumare3
added
bug
Something isn't working
untriaged
This issues has not yet been looked at by the Maintainers
and removed
untriaged
This issues has not yet been looked at by the Maintainers
labels
Apr 27, 2022
I see the PR is in which is good, but FYI, it's impossible to even send an empty string using the UI. So the work-around of default='' unfortunately only works if launching programmatically.
Describe the bug
PR flyteorg/flytepropeller#373 added support for union types, but also removed an extra check that allows having None values as default values for types like collections.
This change introduced a regression, that affects empty defaults for a workflow parameter. Example
OR
Compilation now fails. This is because, in protobuf to represent an empty type the only option is to support empty messages.
The empty type check happens in Flyteadmin here
Note, that the default value is not None, and the guessed type for an
empty list - []
is of typecollection:None
After the PR#373 the
isVoid
check was removed, which implies thatcollection:None
is no longer castable tocollection:int
I think one of the problems is guessing the type on the RHS, but there does not seem to be a better option
Expected behavior
Users should be able to use
l = [] or m = {}
as default valuesAdditional context to reproduce
Simple example that can fail
Example generated struct for Default
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: