datacraft-dsc / DEPs

Data Ecosystem Proposals (DEPs) - Open Standards for Decentralised Data Ecosystems
Apache License 2.0
10 stars 2 forks source link

DEP 6 - Notes #55

Closed pedrorgirardi closed 4 years ago

pedrorgirardi commented 4 years ago

The Job result payload must have errorcode and description fields in case of error in executing the operation.

I don't think DEP 6 should require Agents to return an error code. I think we could require an error key which its value is an Object with at least the description key. Since error is an Object, Agents could potentially add custom keys.

Error shouldn't be part of the result

I find it semantically strange that error is in results. If there was an error, the Operation didn't produce a "result", so the error key should be at the root level and there shouldn't be a results key:

{"status": "failed",
  "error": {
    "description": "Friendly error description"
  }
}

Rename results to outputs

We even use the word 'outputs' to describe results, so why not simply use outputs then?

... implementations are free to define schemas for inputs (params) and outputs (results).

Rename params to inputs

Same for params. Why don't we use inputs instead?

Rename jobid to job-id

We use operation-id, so it makes sense to use job-id instead of jobid.

mikera commented 4 years ago

I think I agree with these changes, but would like to confirm that with everyone who is doing DEP-based interop that this makes sense before we make any breaking changes.

@billbsing @shark8me @superstructor @AyushVerma2 Please comment from the perspective of your respective implementations.

AyushVerma2 commented 4 years ago

https://github.com/DEX-Company/starfish-java/pull/169