cuddly-jelly-27016
02/19/2025, 5:36 PMKeyError: 'items'
is raised at flytekit/core/type_engine.py:839 in generate_attribute_list_from_dataclass_json_mixin (flytekit==1.13.14).
Expected behavior
Workflow is started with the given dataclass instance.
Additional context to reproduce
from dataclasses import dataclass
from typing import Optional
from flytekit import task, workflow
from flytekit.configuration import Config
from flytekit.remote import FlyteRemote
from mashumaro.mixins.json import DataClassJSONMixin
@dataclass
class MyConfig(DataClassJSONMixin):
op_list: Optional[list[str]]
@task
def t() -> None:
pass
@workflow
def wf(config: MyConfig) -> None:
t()
if __name__ == "__main__":
config = MyConfig(op_list=["a", "b"])
remote = FlyteRemote(
config=Config.auto(config_file="../config.yaml"),
default_project="flytesnacks",
default_domain="development",
)
remote_wf = remote.fetch_workflow(name="<http://mywf.wf|mywf.wf>")
execution = remote.execute(remote_wf, inputs={"config": config})
Screenshots
No response
Are you sure this issue hasn't been raised already?
• Yes
Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
02/19/2025, 5:36 PM