-
Notifications
You must be signed in to change notification settings - Fork 159
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
Investigate/fix test_cancel_running_job
#1019
Comments
For more context, here in the cancel method we are manually setting the job status to CANCELLED on line 252 even though in some cases the job is actually completed. qiskit-ibm-runtime/qiskit_ibm_runtime/runtime_job.py Lines 238 to 252 in 3d8b9c9
|
@kt474 I believe there might be an issue I think the following might resolve the problem:
|
I think the test can be fixed quite simply by replacing the lines:
by the lines:
However, I think there is a deeper issue here, and that is why |
Closing this for now, will reopen if it becomes an issue again |
This test has been failing for a while now - https://github.com/Qiskit/qiskit-ibm-runtime/actions/runs/5863436233/job/15896900505
It appears that when attempting to cancel a running job, calling
job.cancel()
can return a 204 and raise no errors while the job is actually completed.This snippet shows that the status of
job
isCANCELLED
but retrieving the job and status again showsDONE
, which is the correct status.I'm guessing this is some sort of race condition where the job runs too quickly and if this is the case, it should be handled appropriately on the client side.
The text was updated successfully, but these errors were encountered: