<#6167 [BUG] Interruptible ignored when directly r...
# flytekit
c
#6167 [BUG] Interruptible ignored when directly running tasks Issue created by pimdh ### Describe the bug Register the file below. import time from flytekit import task, workflow @task(interruptible=True, retries=5) def sleep_task() -> None: time.sleep(10) @workflow def sleep_wf() -> None: sleep_task() Then if I run
Copy code
pyflyte run -p scratch -d main remote-workflow sleep_wf
A pod is created which correctly includes the
interruptible=true
label, as well as the Spot node selector I configured. However, if I directly run the task with
Copy code
pyflyte run -p scratch -d main remote-task sleep_task
Then the task is wrongly create with the
interruptible=false
label, and without the Spot node selector. Note that also when directly executing the task, the task metadata indicate interruptible, even though the pod is not created as such:
Copy code
{
  "tags": {},
  "cacheIgnoreInputVars": [],
  "runtime": {
    "type": "FLYTE_SDK",
    "version": "1.14.3",
    "flavor": "python"
  },
  "retries": {
    "retries": 5
  },
  "interruptible": true
}
### Expected behavior I expect both execution to be interruptible, but only the workflow execution creates an interruptible Pod, not the task execution. ### Additional context to reproduce Flyte core version 1.13.3 Flytekit version 1.14.3 ### Screenshots No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte