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

Async /run does not work when testing locally #304

Open
abaybektursun opened this issue Mar 19, 2024 · 9 comments
Open

Async /run does not work when testing locally #304

abaybektursun opened this issue Mar 19, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@abaybektursun
Copy link

abaybektursun commented Mar 19, 2024

Describe the bug
When I create a handler runpod.serverless.start({"handler": async_generator_handler})
Only http://localhost:8000/runsync triggers async_generator_handler
However when posting against http://localhost:8000/run async_generator_handler is not triggered. Just returns

{"id":"test-20023617-4048-4f73-9511-8ae17a1ad7a5","status":"IN_PROGRESS"}

But nothing happens in the backend

To Reproduce
Steps to reproduce the behavior:

  1. Implement async handler
  2. Start the local server
runpod.serverless.start(
    {
        "handler": async_handler
    }
)
  1. Do a request: curl -X POST -H "Content-Type: application/json" -d '{"input":{}}' http://localhost:8000/run
  2. Observer how async_handler is not triggered

Expected behavior
async_handler should be triggered.

Desktop (please complete the following information):

  • OS: Ubuntu 23
  • Version: Runpod python SDK: 1.6.2

Also posted in Discord support: https://www.answeroverflow.com/m/1219122522612830279

@abaybektursun abaybektursun added the bug Something isn't working label Mar 19, 2024
@discordianfish
Copy link

@justinmerrell Is there a timeline to fix this? It would make local development and testing so much easier if I could use async / status locally. Just storing the job status in memory would be sufficient.

@discordianfish
Copy link

Hrm maybe I'm missing something because from looking at the code, it seems that it should actually:

But it seems that when I try to get the job status it always returns:

"status": "FAILED",
"error": "Job ID not found"

@geovanisouza92
Copy link

But it seems that when I try to get the job status it always returns:

"status": "FAILED", "error": "Job ID not found"

Same here. My guess it's removing the jobs from memory 🤔

@xerdink
Copy link

xerdink commented Apr 29, 2024

also have the same problem

@discordianfish
Copy link

Looks like it removes the job here:

job_list.remove_job(job.id)

I don't get why.. looks like on the first request its still there and then gets removed by this.

@petem24
Copy link

petem24 commented Aug 13, 2024

Same issue here. Very annoying

@petem24
Copy link

petem24 commented Aug 13, 2024

@justinmerrell any timeline on this? It makes local development extremely frustrating

@Ostefanini
Copy link

Looks like calling the POST/status/{job-id} execute the job

@chemaguerra
Copy link

chemaguerra commented Sep 26, 2024

Same problem here. I receive {"detail":"Not Found"} when testing /run locally.

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

8 participants