acoustic-carpenter-78188
09/02/2023, 12:36 AM@inputs(value_to_print=Types.Integer)
@python_task(cache_version='1', cache=False)
def print_int(wf_params, value_to_print):
<http://wf_params.logging.info|wf_params.logging.info>("Value: {}".format(value_to_print))
Then in another file
fetched_printer_task = _sdk_task.SdkTask.fetch('flytetester', 'development', 'app.workflows.sample_tasks.print_int',
'0d5779f7eb093df23ec50212fe3a34dd238ed393')
@workflow_class
class TestTaskFetching(object):
wf_input_to_print = Input(Types.Integer, default=5, help="Input for printer function")
fetched_task_run = fetched_printer_task(value_to_print=wf_input_to_print)
After registering,
$ flyte-cli -p flytetester -d development list-task-names | grep fetched
cookbook.sample_workflows.formula_1.inner.fetched_printer_task
Expected behavior
Flytekit should detect that this is a fetched task, and not reregister. The workflow should simply reference the original task in Admin.
This reregistration also happens when fetched launch plans and workflows are detected.
This change will need the dynamic node task node handler in propeller updated as well. Do not release the Flytekit change until the propeller change is done, otherwise certain dynamic tasks will break.
Flyte component
☐ Overall
☐ Flyte Setup and Installation scripts
☐ Flyte Documentation
☐ Flyte communication (slack/email etc)
☑︎ FlytePropeller
☐ FlyteIDL (Flyte specification language)
☑︎ Flytekit (Python SDK)
☐ FlyteAdmin (Control Plane service)
☐ FlytePlugins
☐ DataCatalog
☐ FlyteStdlib (common libraries)
☐ FlyteConsole (UI)
☐ Other
flyteorg/flyteacoustic-carpenter-78188
09/02/2023, 12:36 AM