opendatamesh-initiative / odm-platform

A platform to manage the data product life cycle
https://platform.opendatamesh.org/
Apache License 2.0
11 stars 3 forks source link

DevOps Module: Add body in the task callback API #102

Closed Giandom closed 1 year ago

Giandom commented 1 year ago

Add the possibility of returning the actual task status and additional information in the callback call to ODM. Currently, it's only possible to STOP the task without the ability to declare the status (it's assumed it has been completed successfully).

Below is a proposed structure for the body to be added to the callback call:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Generated schema for Callback API",
  "type": "object",
  "properties": {
    "errors": {
      "type": ["string", "null"]
    },
    "results": {
      "type": ["object", "null"],
      "properties": {},
      "required": []
    },
    "status": {
      "type": "string",
      "enum": ["PROCESSED", "FAILED"]
    }
  },
  "required": [
    "status"
  ]
}

The "results" attribute can be used to return additional information generated by the task to ODM, such as pipeId, name, outputs generated by processes, and so on.

Let me know what you think.

Thanks, Giandomenico

mattia155 commented 1 year ago

First draft (with "results" as String) pushed on branch 102-devops-module-add-body-in-the-task-callback-api