cuddly-jelly-27016
08/14/2025, 4:12 PMContainerTask lacks built-in timeout functionality, which is available for regular Python tasks via the @task decorator.
## What changes were proposed in this pull request?
This PR adds a timeout parameter to ContainerTask that accepts datetime.timedelta objects:
## How was this patch tested?
1. test_container_task_timeout(): Tests local execution timeout with timedelta
2. test_container_task_timeout_k8s_serialization(): Verifies K8s activeDeadlineSeconds serialization
3. test_container_task_no_timeout(): Ensures normal execution works with sufficient timeout
### Setup process
### Screenshots
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
https://bito.ai#summarystart|
### Summary by Bito
This pull request enhances the ContainerTask functionality by adding a timeout parameter for maximum execution duration, enabling it to accept a timeout parameter via a datetime.timedelta object. Modifications include updates to the ContainerTask class and Kubernetes pod specification, along with new unit tests to verify the feature's functionality during local execution and Kubernetes serialization, enhancing the task's capabilities to match those of standard Python tasks.
flyteorg/flytekit