<#1727 Throw warning for nested @Task functions> P...
# flyte-github
a
#1727 Throw warning for nested @Task functions Pull request opened by oliverhu TL;DR Address flyteorg/flyte#3734 that nested Tasks/Workflows is not warned. Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☐ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description In order to detect entities that are nested inside `@task`: 1. During local execution, create a new
FlyteContext
with
LOCAL_TASK_EXECUTION
for
@task
,and
LOCAL_WORKFLOW_EXECUTION
if it is
@workflow
. 2. If
flyte_entity_call_handler
is invoked inside
LOCAL_TASK_EXECUTION
or
TASK_EXECUTION
, that means it is called inside
@task
, warn the users of nested
@tasks/@workflows
. Created a helper function
is_local_execution()
to shorthand the checks. Tracking Issue flyteorg/flyte#3734 Follow-up issue The *call*() function in remote_callable and reference_entity duplicates and can be replaced with
flyte_entity_call_handler
as well in the future. flyteorg/flytekit ✅ All checks have passed 30/30 successful checks