Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor committed Feb 22, 2025
1 parent 9d221fc commit f12b1f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 31 deletions.
2 changes: 1 addition & 1 deletion flytekit/core/python_function_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def __init__(self, name: str, inputs: typing.Optional[typing.Dict[str, typing.Ty
interface=Interface(inputs=inputs, outputs=None),
task_config=None,
task_resolver=eager_failure_task_resolver,
secret_requests=[Secret(key="EAGER_API_KEY")], # todo: remove this before merging
secret_requests=[Secret(group="", key="EAGER_API_KEY")], # todo: remove this before merging
**kwargs,
)

Expand Down
33 changes: 3 additions & 30 deletions tests/flytekit/unit/core/test_eager_cleanup.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,9 @@
from flytekit.core.python_function_task import EagerFailureHandlerTask
import re
import os
import typing
from collections import OrderedDict

import mock
import pytest

import flytekit.configuration
from flytekit import ContainerTask, ImageSpec, kwtypes
from flytekit.configuration import Image, ImageConfig, SerializationSettings
from flytekit.core.condition import conditional
from flytekit.core.python_auto_container import get_registerable_container_image
from flytekit.core.task import task
from flytekit.core.workflow import workflow
from flytekit.exceptions.user import FlyteAssertion, FlyteMissingTypeException
from flytekit.image_spec.image_spec import ImageBuildEngine
from flytekit.models.admin.workflow import WorkflowSpec
from flytekit.models.annotation import TypeAnnotation
from flytekit.models.literals import (
BindingData,
BindingDataCollection,
BindingDataMap,
Literal,
Primitive,
Scalar,
Union,
Void,
)
from flytekit.models.types import LiteralType, SimpleType, TypeStructure, UnionType
from flytekit.configuration import Image, ImageConfig
from flytekit.core.python_function_task import EagerFailureHandlerTask
from flytekit.tools.translator import get_serializable
from flytekit.types.error.error import FlyteError

default_img = Image(name="default", fqn="test", tag="tag")
serialization_settings = flytekit.configuration.SerializationSettings(
Expand All @@ -43,7 +16,7 @@


def test_failure():
t = EagerFailureHandlerTask(inputs={"a": int})
t = EagerFailureHandlerTask(name="tester", inputs={"a": int})

spec = get_serializable(OrderedDict(), serialization_settings, t)
print(spec)
Expand Down

0 comments on commit f12b1f4

Please sign in to comment.