From 793ca45a8ec4d209f9be527f72aaa704b7b2ef7c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 02:23:47 +0000 Subject: [PATCH] fix(translator): serialize pod_spec for node overrides regardless of fast_serialize The pod_spec in TaskNodeOverrides was only serialized when should_fast_serialize() was True. This meant dynamic tasks with pod_template overrides (via with_overrides) would produce an empty pod_spec in the DynamicJobSpec when fast_serialize was disabled, causing the propeller to fail to schedule the child task (UNKNOWN status). Aligns with upstream flytekit behavior: always serialize pod_spec when a pod_template override exists; only gate set_command_fn behind should_fast_serialize(). Co-Authored-By: benchan@exa.ai --- flytekit/tools/translator.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/flytekit/tools/translator.py b/flytekit/tools/translator.py index 60c1ef11c7..b208798edb 100644 --- a/flytekit/tools/translator.py +++ b/flytekit/tools/translator.py @@ -455,12 +455,9 @@ def get_serializable_node( # if entity._aliases: # node_model._output_aliases = entity._aliases elif isinstance(entity.flyte_entity, PythonTask): - # handle pod template overrides override_pod_spec = {} - if entity._pod_template is not None and settings.should_fast_serialize(): - # Only call set_command_fn for PythonAutoContainerTask and its subclasses - # ContainerTask doesn't have this method - if not isinstance(entity.flyte_entity, ContainerTask): + if entity._pod_template is not None: + if settings.should_fast_serialize() and not isinstance(entity.flyte_entity, ContainerTask): entity.flyte_entity.set_command_fn(_fast_serialize_command_fn(settings, entity.flyte_entity)) override_pod_spec = _serialize_pod_spec( entity._pod_template, entity.flyte_entity._get_container(settings), settings