From 569b563347bfb8c5892d1f61cd83f42edd78a87b Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Wed, 1 Mar 2023 17:43:10 +0100 Subject: [PATCH] minor cleanup Signed-off-by: Felix Ruess --- flytekit/core/container_task.py | 6 +++--- flytekit/core/utils.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/flytekit/core/container_task.py b/flytekit/core/container_task.py index 15c05b410c..d51f71d837 100644 --- a/flytekit/core/container_task.py +++ b/flytekit/core/container_task.py @@ -61,14 +61,14 @@ def __init__( sec_ctx = SecurityContext(secrets=secret_requests) # pod_template_name overwrites the metadata.pod_template_name - kwargs["metadata"] = kwargs["metadata"] if "metadata" in kwargs else TaskMetadata() - kwargs["metadata"].pod_template_name = pod_template_name + metadata = metadata or TaskMetadata() + metadata.pod_template_name = pod_template_name super().__init__( task_type="raw-container", name=name, interface=Interface(inputs, outputs), - # metadata=metadata, + metadata=metadata, task_config=None, security_ctx=sec_ctx, **kwargs, diff --git a/flytekit/core/utils.py b/flytekit/core/utils.py index ee2427d358..24ce4d07d8 100644 --- a/flytekit/core/utils.py +++ b/flytekit/core/utils.py @@ -173,8 +173,6 @@ def _serialize_pod_spec(pod_template: PodTemplate, primary_container: _task_mode final_containers.append(container) cast(PodTemplate, pod_template).pod_spec.containers = final_containers - cast(PodTemplate, pod_template).data_config = primary_container.data_loading_config - return ApiClient().sanitize_for_serialization(cast(PodTemplate, pod_template).pod_spec)