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

Add a "has result" flag or link #453

Closed
m-mohr opened this issue Jun 3, 2022 · 3 comments
Closed

Add a "has result" flag or link #453

m-mohr opened this issue Jun 3, 2022 · 3 comments
Labels
feedback required job management incl. /result minor requires a minor-version (x.1.0 for example)
Milestone

Comments

@m-mohr
Copy link
Member

m-mohr commented Jun 3, 2022

Right now the "finished" (and sometimes "error") state says that there might be results. Nevertheless, this is ambiguous. If you update the process graph, some implementations may revert back to "created" and then it's unclear whether results are still available or not.
It would probably be a good idea to decouple the "status" and the "has result" indicators. We can keep the status as is and add either a flag "has_result" and/or a link to the results in the metadata regardless of the status.

@m-mohr m-mohr added job management incl. /result minor requires a minor-version (x.1.0 for example) labels Jun 3, 2022
@m-mohr m-mohr added this to the 1.2.0 milestone Jun 3, 2022
@m-mohr m-mohr self-assigned this Jun 3, 2022
@soxofaan
Copy link
Member

soxofaan commented Jun 27, 2022

Alternative proposal: Reconsider the fact that batch jobs can be updated.
This mutability causes quite some complications around how to reason about and handle batch job status, state, results, etc. (E.g. also see #442, #436, #384 )
I think creating a new batch job is so cheap/easy in all clients and on all back-ends, that supporting batch job updates is just not worth having to deal with all the complications it brings.

I understand that this would be a breaking API change, but technically with the current API, a back-end could is allowed to not support PATCH /jobs/{job_id} and not having to worry about batch job updates, right?

@m-mohr
Copy link
Member Author

m-mohr commented Jun 27, 2022

I think it's okay and pretty useful to update title and description (i.e. metadata). But we may want to disallow updating the process graph. That would simplify things in most clients except the Web Editor, I guess. And simplify the back-end implementation for sure.

In the current API it is allowed to not support PATCH /jobs/:id, indeed.

The flag would still be useful as the ambiguity regarding the error state is still relevant.

@m-mohr m-mohr removed their assignment Oct 20, 2022
m-mohr added a commit that referenced this issue Nov 2, 2022
@m-mohr
Copy link
Member Author

m-mohr commented Nov 2, 2022

GET /jobs and GET /jobs/{job_id}: Added a links property that can for example link to results and logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback required job management incl. /result minor requires a minor-version (x.1.0 for example)
Projects
None yet
Development

No branches or pull requests

2 participants