-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow execution JSON schema (#270)
* Add workflow execution jsonschema Signed-off-by: Kevin Su <[email protected]> * Updated schema Signed-off-by: Kevin Su <[email protected]> * Added Readme Signed-off-by: Kevin Su <[email protected]> * updated Signed-off-by: Kevin Su <[email protected]> Signed-off-by: Eduardo Apolinario <[email protected]>
- Loading branch information
1 parent
5c7647a
commit ed95795
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# JSON SCHEMA | ||
|
||
This folder contains the JSON Schema of execution event, and this schema will | ||
be used by [cloudevent publisher](https://github.com/flyteorg/flyteadmin/blob/a0ca4b07d3b1c3cccfe3830307df50bc73152ddb/pkg/async/cloudevent/implementations/cloudevent_publisher.go#L96). | ||
|
||
The URL for the JSON file will be included with the cloudevent message. For example | ||
```json | ||
{ | ||
"specversion" : "1.0", | ||
"type" : "com.flyte.resource.workflow", | ||
"source" : "https://github.com/flyteorg/flyteadmin", | ||
"id" : "D234-1234-1234", | ||
"time" : "2018-04-05T17:31:00Z", | ||
"jsonschemaurl": "https://github.com/flyteorg/flyteidl/blob/master/jsonschema/workflow_execution.json", | ||
"data" : "workflow execution event" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin/workflow-execution-event-request", | ||
"properties": { | ||
"RequestId": { | ||
"type": "string" | ||
}, | ||
"Event": { | ||
"type": "object", | ||
"properties": { | ||
"execution_id": { | ||
"$ref": "#/$defs/WorkflowExecutionIdentifier" | ||
}, | ||
"producer_id": { | ||
"type": "string" | ||
}, | ||
"phase": { | ||
"type": "integer" | ||
}, | ||
"occurred_at": { | ||
"$ref": "#/$defs/Timestamp" | ||
}, | ||
"output_result": { | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"output_uri": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
{ | ||
"$ref": "#/$defs/ExecutionError" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"$defs": { | ||
"WorkflowExecutionIdentifier": { | ||
"properties": { | ||
"project": { | ||
"type": "string" | ||
}, | ||
"domain": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
}, | ||
"Timestamp": { | ||
"properties": { | ||
"seconds": { | ||
"type": "integer" | ||
}, | ||
"nanos": { | ||
"type": "integer" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
}, | ||
"ExecutionError": { | ||
"properties": { | ||
"code": { | ||
"type": "string" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"error_uri": { | ||
"type": "string" | ||
}, | ||
"kind": { | ||
"type": "integer" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"type": "object" | ||
} |