Closed pauljxtan closed 4 years ago
Merging #370 into master will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #370 +/- ##
=======================================
Coverage 97.69% 97.70%
=======================================
Files 52 52
Lines 6478 6485 +7
=======================================
+ Hits 6329 6336 +7
Misses 149 149
Impacted Files | Coverage Δ | |
---|---|---|
strawberryfields/api/connection.py | 100.00% <ø> (ø) |
|
strawberryfields/engine.py | 94.90% <ø> (ø) |
|
strawberryfields/api/job.py | 94.11% <100.00%> (+0.93%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5917bac...4c81ff2. Read the comment docs.
Just FYI, @lneuhaus and I coordinated an end-to-end test for a deliberately failing job and didn't find any problems.
Thanks so much for this @pauljxtan, looks really good! :100: Had a couple of suggestions which might be improvements to add, but I'm also happy with the current state.
Context:
Currently, a failed remote job produces a generic error message that is difficult to diagnose. The job info response from the remote platform contains a
meta
field that is currently unused, but has some information that may be useful, e.g.,Description of the Change:
meta
property to theJob
class. In the event of job failure, this dictionary will contain anerror-code
anderror-detail
.meta
attribute (along withstatus
) whenJob.refresh()
is called.meta
to the error message for a failed job.Example:
"The remote job 928ee53e-677a-48c0-8ba5-a0566ba3e295 failed due to an internal server error. Please try again."
"The remote job 928ee53e-677a-48c0-8ba5-a0566ba3e295 failed due to an internal server error. Please try again. {'error_code': 'hardware-message-error', 'error_detail': 'The job failed because the message received from the hardware could not be understood.'}"
Benefits:
The added context in a copy-pastable error message is likely to make it easier to diagnose and debug job failures.
Possible Drawbacks:
The new error message is slightly verbose.
Related GitHub Issues:
N/A