From e2083daaeda16d066f88c9afc27267a9cb5d8809 Mon Sep 17 00:00:00 2001 From: redartera <120470035+redartera@users.noreply.github.com> Date: Tue, 28 Jan 2025 14:15:26 +0000 Subject: [PATCH] Use a boolvalue wrapper for interruptible Signed-off-by: redartera <120470035+redartera@users.noreply.github.com> --- flytekit/models/execution.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flytekit/models/execution.py b/flytekit/models/execution.py index 4f2e684227..0019e4d79b 100644 --- a/flytekit/models/execution.py +++ b/flytekit/models/execution.py @@ -10,6 +10,7 @@ import flyteidl.admin.execution_pb2 as _execution_pb2 import flyteidl.admin.node_execution_pb2 as _node_execution_pb2 import flyteidl.admin.task_execution_pb2 as _task_execution_pb2 +from google.protobuf.wrappers_pb2 import BoolValue import flytekit from flytekit.models import common as _common_models @@ -328,7 +329,7 @@ def to_flyte_idl(self): max_parallelism=self.max_parallelism, security_context=self.security_context.to_flyte_idl() if self.security_context else None, overwrite_cache=self.overwrite_cache, - interruptible=self.interruptible if self.interruptible is not None else None, + interruptible=BoolValue(value=self.interruptible) if self.interruptible is not None else None, envs=self.envs.to_flyte_idl() if self.envs else None, tags=self.tags, cluster_assignment=self._cluster_assignment.to_flyte_idl() if self._cluster_assignment else None,