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

The serverless fast_api endpoint does not support GET for /status/{job_id} endpoints #369

Open
Bartvelp opened this issue Oct 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Bartvelp
Copy link

Describe the bug
The status endpoint over the serverless fast api endpoint does not support HTTP GET requests.
As can be seen here: https://github.com/runpod/runpod-python/blob/df771026ebe8baf99a7e6bff319a1a01a63ce858/runpod/serverless/modules/rp_fastapi.py#L257C1-L265C10
Only POSTs are allowed. Given that the "real" API supports GET requests, and it is more suitable this should be fixed.

To Reproduce
Steps to reproduce the behavior:

  1. Create an async job using the /run/ endpoint.
  2. Retrieve a request id from the above call, e.g. test-c9c63e7b-7931-4a82-a336-40668bac2f00
  3. Try to check the status http://localhost:8000/status/test-c9c63e7b-7931-4a82-a336-40668bac2f00 in your browser url simply using curl, without using a POST request.
  4. Receive a {"detail":"Method Not Allowed"} error, instead of the status.

Expected behavior
The same behavior as the real API.

@Bartvelp Bartvelp added the bug Something isn't working label Oct 18, 2024
@Bartvelp
Copy link
Author

In the mean time I am running

sed -i 's#\["POST"\]#\["GET","POST"\]#g' "$(pip show runpod | grep Location | cut -d " " -f 2)/runpod/serverless/modules/rp_fastapi.py"

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

2 participants