cuddly-jelly-27016
05/25/2025, 12:11 AMdataclass input such as:
@dataclass_json
@dataclass
class MyClass:
a: str
b: str
If a workflow contains an input of type MyClass and an optional input of type MyClass, we are unable to type in an input for the MyClass type in the Flyte Console. There does not appear to be type boxes for this input.
### Expected behavior
I would be able to specify a value for both of these struct inputs in the Flyte Console.
### Additional context to reproduce
from typing import Optional
from flytekit import task, workflow
from dataclasses import dataclass
from dataclasses_json import dataclass_json
@dataclass_json
@dataclass
class MyClass:
a: str
b: str
@task()
def my_task(input: MyClass):
return
@workflow
def my_workflow(
input: MyClass,
optional_input: Optional[MyClass] = MyClass(a="", b="") # Workaround for https://github.com/flyteorg/flyte/issues/4736
):
my_task(input=input)
### Screenshots
Screen.Recording.2024-02-16.at.3.13.29.PM.mov
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/25/2025, 12:11 AM