workflow-execution-service-schemas icon indicating copy to clipboard operation
workflow-execution-service-schemas copied to clipboard

Proposal: Support for Workflow Run status update

Open susheel opened this issue 5 years ago • 7 comments

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

susheel avatar May 08 '19 14:05 susheel

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.

jaeddy avatar May 09 '19 19:05 jaeddy

Happy with PUT or POST. I suggested POST as it was similar to webhook conventions

susheel avatar May 10 '19 10:05 susheel

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 avatar Jun 09 '20 00:06 uniqueg

@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!

jaeddy avatar Jun 28 '20 17:06 jaeddy

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.

uniqueg avatar Jul 06 '20 13:07 uniqueg

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.

patmagee avatar Sep 22 '22 09:09 patmagee

Agreed. And this is also how we implemented the PoC showing how callbacks can be used.

uniqueg avatar Sep 22 '22 12:09 uniqueg