126 lines
3.2 KiB
JSON
126 lines
3.2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "job-node-execute-v1.json",
|
|
"title": "Job Node Execute V1",
|
|
"description": "调度编排器请求 Job Worker 执行一个稳定版本节点。",
|
|
"allOf": [
|
|
{
|
|
"$ref": "event-envelope-v1.json"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"event_type": {
|
|
"const": "job.node.execute"
|
|
},
|
|
"aggregate_type": {
|
|
"const": "schedule_node_run"
|
|
},
|
|
"payload": {
|
|
"$ref": "job-node-execute-v1.json#/$defs/payload"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"$defs": {
|
|
"ulid": {
|
|
"type": "string",
|
|
"minLength": 26,
|
|
"maxLength": 26,
|
|
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
},
|
|
"payload": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"workspace_id",
|
|
"run_id",
|
|
"node_run_id",
|
|
"node_id",
|
|
"versions_id",
|
|
"attempt_no",
|
|
"script_type",
|
|
"artifact_object_id",
|
|
"artifact_path",
|
|
"timeout_seconds",
|
|
"arguments"
|
|
],
|
|
"properties": {
|
|
"workspace_id": {
|
|
"$ref": "job-node-execute-v1.json#/$defs/ulid"
|
|
},
|
|
"run_id": {
|
|
"$ref": "job-node-execute-v1.json#/$defs/ulid"
|
|
},
|
|
"node_run_id": {
|
|
"$ref": "job-node-execute-v1.json#/$defs/ulid"
|
|
},
|
|
"node_id": {
|
|
"$ref": "job-node-execute-v1.json#/$defs/ulid"
|
|
},
|
|
"versions_id": {
|
|
"$ref": "job-node-execute-v1.json#/$defs/ulid"
|
|
},
|
|
"attempt_no": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 11
|
|
},
|
|
"script_type": {
|
|
"enum": [
|
|
"python",
|
|
"notebook"
|
|
]
|
|
},
|
|
"artifact_object_id": {
|
|
"$ref": "job-node-execute-v1.json#/$defs/ulid"
|
|
},
|
|
"artifact_path": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 1024
|
|
},
|
|
"timeout_seconds": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 86400
|
|
},
|
|
"arguments": {
|
|
"type": "array",
|
|
"maxItems": 100,
|
|
"items": {
|
|
"type": "string",
|
|
"maxLength": 1000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"examples": [
|
|
{
|
|
"event_id": "01K123456789ABCDEFGHJKMNPZ",
|
|
"event_type": "job.node.execute",
|
|
"schema_version": 1,
|
|
"occurred_at": "2026-07-27T08:00:01Z",
|
|
"producer": "schedule-orchestrator",
|
|
"trace_id": "req-demo-0001",
|
|
"aggregate_type": "schedule_node_run",
|
|
"aggregate_id": "01K123456789ABCDEFGHJKMNQ0",
|
|
"idempotency_key": "01K123456789ABCDEFGHJKMNQ0:1",
|
|
"payload": {
|
|
"workspace_id": "01K123456789ABCDEFGHJKMNPS",
|
|
"run_id": "01K123456789ABCDEFGHJKMNPR",
|
|
"node_run_id": "01K123456789ABCDEFGHJKMNQ0",
|
|
"node_id": "01K123456789ABCDEFGHJKMNPW",
|
|
"versions_id": "01K123456789ABCDEFGHJKMNPX",
|
|
"attempt_no": 1,
|
|
"script_type": "python",
|
|
"artifact_object_id": "01K123456789ABCDEFGHJKMNPY",
|
|
"artifact_path": "versions/prepare/v1.py",
|
|
"timeout_seconds": 600,
|
|
"arguments": []
|
|
}
|
|
}
|
|
]
|
|
}
|