Skip to content

Commit

Permalink
Improve error message for nested tasks (#2910)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
Co-authored-by: Thomas J. Fan <[email protected]>
  • Loading branch information
pingsutw and thomasjpfan authored Nov 9, 2024
1 parent 3475ddc commit d4171c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flytekit/core/promise.py
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,9 @@ def flyte_entity_call_handler(
ctx.execution_state.mode == ExecutionState.Mode.TASK_EXECUTION
or ctx.execution_state.mode == ExecutionState.Mode.LOCAL_TASK_EXECUTION
):
logger.error("You are not supposed to nest @Task/@Workflow inside a @Task!")
logger.error(
"You are not supposed to nest @task/@workflow because the nested task or workflow will run in the same container."
)
if ctx.compilation_state is not None and ctx.compilation_state.mode == 1:
return create_and_link_node(ctx, entity=entity, **kwargs)
if ctx.execution_state and ctx.execution_state.is_local_execution():
Expand Down

0 comments on commit d4171c3

Please sign in to comment.