✨ Add support for opening existing jobs - #485
Conversation
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #485 +/- ##
=========================================
+ Coverage 90.3% 90.5% +0.1%
=========================================
Files 6 6
Lines 734 749 +15
Branches 142 146 +4
=========================================
+ Hits 663 678 +15
Misses 71 71
🚀 New features to boost your workflow:
|
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Keep the source-level provider contract explicit while preserving runtime compatibility with older provider binaries. Assisted-by: GPT-5.6 via Codex
Name the default provider parameters and exclude only compatibility and positive-provider paths that deliberately have no in-tree fixture. Assisted-by: GPT-5.6 via Codex
burgholzer
left a comment
There was a problem hiding this comment.
Two small corrections.
Co-authored-by: Lukas Burgholzer <burgholzer@me.com> Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
ystade
left a comment
There was a problem hiding this comment.
@burgholzer Definitely a functionailty that is needed (and also implemented in QDMIv2). Overall, the modifications look good to me. I just have a comment on naming, see the comments.
| * @return @ref QDMI_ERROR_FATAL if opening the job failed due to a fatal | ||
| * error. | ||
| */ | ||
| int QDMI_device_open_job(QDMI_Device device, const char *job_id, QDMI_Job *job); |
There was a problem hiding this comment.
This kind of function also exists in V2 but under another name, see
QDMI/include/qdmi/job/functions.h
Line 306 in cbd06ab
I actually like the other name more because it is more specific, and the user knows immediately what the function is doing and which parameters it needs. If changed, these changes must also be reflected in the docstrings.
| int QDMI_device_open_job(QDMI_Device device, const char *job_id, QDMI_Job *job); | |
| int QDMI_session_retrieve_job_by_id(QDMI_Device device, const char *job_id, QDMI_Job *job); |
There was a problem hiding this comment.
I like the other name. Will incorporate that consistently in the next revision!
Thanks for the suggestion!
| * @param[out] job A pointer to a handle that will store the opened job. Must | ||
| * not be @c NULL. The handle must be freed by calling @ref | ||
| * QDMI_device_job_free when it is no longer used. Freeing the handle does not | ||
| * cancel or delete the remote job. |
There was a problem hiding this comment.
Very minor: Not sure whether I would mention this here so explicitly. Some device implementations may indeed delete a job when it is freed. These device implementations obviously do not support retrieving the job by id again.
There was a problem hiding this comment.
Hm. I see the point, which is fairly nuanced.
Devices that want to support retrieval (and implement the new function) must not delete jobs upon freeing from QDMI.
Devices that do not support persistent jobs can do what they want.
Any idea for how to make the wording better here? I can also ask Codex on this.
There was a problem hiding this comment.
What about
| * cancel or delete the remote job. | |
| * necessarily cancel or delete the remote job. |
?
There was a problem hiding this comment.
Yeah. That would work, but now that I think about it a little more deeply, this sentence (no matter how it is worded) does not even really belong here. If at all, it belongs to the QDMI_device_job_free method to describe its semantics. I'll revisit this in my revision.
Co-authored-by: Yannick Stade <100073938+ystade@users.noreply.github.com> Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
🤖 AI text below 🤖
Description
Adds job reopening for the next patch release (1.3.3). Clients can obtain a fresh local handle for a previously submitted job from its opaque QDMI job ID. Opening uses the current session credentials and does not clone, submit, or modify the remote job.
The device interface and generated prefix definitions expose the corresponding provider symbol. The example device and generated device template export it and return
QDMI_ERROR_NOTSUPPORTEDby default. Drivers remain ABI-compatible with provider libraries built against older QDMI releases: an absent symbol is treated as unsupported.Validation
uvx prek run --all-filespassed.git diff --checkpassed.