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

suite: handle cancelled requests #26

Open
VallariAg opened this issue Oct 31, 2023 · 4 comments
Open

suite: handle cancelled requests #26

VallariAg opened this issue Oct 31, 2023 · 4 comments

Comments

@VallariAg
Copy link
Member

Current behaviour: When a request is sent to /suite and the teuthology-suite command is being executed, then if the client request is cancelled (due to timeout or any other reason), the command continues to schedule.

Expected behaviour: If the request is cancelled, the scheduling command should also be cancelled/stopped.

@dikwickley
Copy link

hi @VallariAg i would like to work on this issue.

@dikwickley
Copy link

dikwickley commented Nov 2, 2023

The main issue here is there is no way to know at the FastAPI server if the client has disconnected.
After going through fastapi/fastapi#8805 and fastapi/fastapi#8699
i found this https://github.com/RedRoserade/fastapi-disconnect-example/blob/main/app.py.

A simple example that uses polling to check if the user has cancelled the request or not.

This works pretty well with only caveat that we would need to use uvicorn instead of gunicorn.
What do you think @VallariAg

@VallariAg
Copy link
Member Author

Hey @dikwickley, this issue would need more discussions before we can plan on working on this.
We might make the long-running functions execute asynchronously which should also handle this issue.

@dikwickley
Copy link

@VallariAg makes sense. I had created a PR that does just that #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants