#7226 Adding new sleep task
Pull request opened by
pmahindrakar-oss
Why are the changes needed?
We need a lightweight in-process sleep task for leaseworker stress testing that does not rely on global plugin config or create task pods.
What changes were proposed in this pull request?
This PR adds a new core task plugin, core-sleep, which:
• takes one typed Duration input
• stays Running until the duration elapses
• completes on reconcile once elapsed
• keeps per-task start time in memory
• clears state on finalize
It also returns a user failure for invalid or missing duration input.
How was this patch tested?
Added unit tests for:
• immediate success for zero duration
• running-to-success behavior after elapsed time
• invalid input handling
Tested with:
go test ./flyteplugins/go/tasks/plugins/core/sleep
Labels
• added
Setup process
N/A
Screenshots
N/A
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
Related PRs
• Related SDK PR for core-sleep
Docs link
N/A
•
main
•
#6583
•
Adding new sleep task 👈
flyteorg/flyte