Skip to content

Commit

Permalink
Fix how ShellTask retrieves the Pod class name (#1132)
Browse files Browse the repository at this point in the history
* Fix how ShellTask retrieves the Pod class name

Signed-off-by: Matheus Moreno <[email protected]>

* Set Pod class name as a constant

Signed-off-by: Matheus Moreno <[email protected]>

* Revert last commit

Signed-off-by: Matheus Moreno <[email protected]>

* Execute automatic linting

Signed-off-by: Matheus Moreno <[email protected]>

Signed-off-by: Matheus Moreno <[email protected]>
  • Loading branch information
matheusMoreno authored Aug 16, 2022
1 parent 994a8bf commit dbe485d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flytekit/extras/tasks/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def __init__(
script_file = os.path.abspath(script_file)

if task_config is not None:
if str(type(task_config)) != "flytekitplugins.pod.task.Pod":
fully_qualified_class_name = task_config.__module__ + "." + task_config.__class__.__name__
if not fully_qualified_class_name == "flytekitplugins.pod.task.Pod":
raise ValueError("TaskConfig can either be empty - indicating simple container task or a PodConfig.")

# Each instance of NotebookTask instantiates an underlying task with a dummy function that will only be used
Expand Down

0 comments on commit dbe485d

Please sign in to comment.