Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task timeout_seconds not enforced #15760

Open
EmilRex opened this issue Oct 18, 2024 · 0 comments
Open

Task timeout_seconds not enforced #15760

EmilRex opened this issue Oct 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@EmilRex
Copy link
Contributor

EmilRex commented Oct 18, 2024

Bug summary

Task timeouts do not appear to actually be enforced. A TimeoutError is eventually raised but not when it's supposed to be.

The docs contain the following example:

from prefect import task
import time

@task(timeout_seconds=1, log_prints=True)
def show_timeouts():
    print("I will execute")
    time.sleep(5)
    print("I will not execute")

Inspect the logs to see that 5 seconds actually pass before the TimeoutError occurs. Increase the seconds to a higher number to make it more noticeable.

Version info (prefect version output)

Version:             2.20.10
API version:         0.8.4
Python version:      3.12.7
Git commit:          4fb64ec3
Built:               Wed, Oct 16, 2024 1:24 PM
OS/Arch:             darwin/arm64
Profile:             local
Server type:         server

Additional context

No response

@EmilRex EmilRex added the bug Something isn't working label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant