workflow-execution-service-schemas
workflow-execution-service-schemas copied to clipboard
Proposal: Support for Workflow Run status update
As part of the asynchronous callback_url
proposal for TES, we would like to have a mechanism to allow TES endpoints to POST status updates back to a WES endpoint.
Requirements:
- Need for a
POST /runs/{run_id}/status
as a mechanism that will accept a TesResponse - TES will use the submission auth headers as part of the POST request
Related Issue: TES#121
I think it might make sense for this to be a PUT
operation. I believe most WES implementations would create some initial status
whenever a new run
is created (and before sending anything to TES). The callback would then be used to update the status.
Happy with PUT
or POST
. I suggested POST
as it was similar to webhook conventions
A brief note with a link to the relevant section in the TES specs added to the /runs/{run_id}/status
path description might perhaps suffice, since not every WES will be implementing a TES backend, nor will every TES client be a WES. Therefore, any relevant necessary and sufficient info on how to implement an endpoint for the callback might perhaps better go inside the TES specs. That is, unless there are other use cases for that endpoint.
@uniqueg thanks - now that various issues with the docs build system, bumping to OpenAPI 3, and integrating the new service-info API are getting close to finished, I'm hoping to look into the status callbacks as the next real substantive update to the spec. I appreciate the detailed proposals that @susheel and you have put together, and your additional notes in this thread. I'll take a closer look soon!
Thanks a lot @jaeddy, sounds great. Looks like OpenAPI3 supports the definition of callbacks, so with the bump to v3, that's probably something that we could make use of. Please let me know if you need some help spec'cing that out, during the upcoming hackathon or otherwise.
WES does not have any other API for modifying any of the internal state of the workflows it is managing. IMO I feel like this functionality should be implementation specific. Once tes implements the call back url, WES does not need a specific endpoint to allow for this, instead they just need to provide a callback url when submitting tasks to TES.
Agreed. And this is also how we implemented the PoC showing how callbacks can be used.