From d9007cc2e0dedd49fd0fe1fe39b2211785480fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Jir=C3=A1t?= Date: Wed, 20 May 2026 11:35:33 +0200 Subject: [PATCH] feat: Add ext.keboola.runner-sync-api.syncActionExecuted event schema Schema covers status/exitCode/output/durationMs in results, plus componentId/action/mode/tag/configData in params. Emitted by runner-sync-api after every sync action execution to give platform operators visibility into sync-action runs. Co-Authored-By: Claude Opus 4.7 (1M context) --- ...la.runner-sync-api.syncActionExecuted.json | 67 +++++++++++++++++++ ...la.runner-sync-api.syncActionExecuted.json | 48 +++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 schema/ext.keboola.runner-sync-api.syncActionExecuted.json create mode 100644 tests/events/ext.keboola.runner-sync-api.syncActionExecuted.json diff --git a/schema/ext.keboola.runner-sync-api.syncActionExecuted.json b/schema/ext.keboola.runner-sync-api.syncActionExecuted.json new file mode 100644 index 0000000..6b9e728 --- /dev/null +++ b/schema/ext.keboola.runner-sync-api.syncActionExecuted.json @@ -0,0 +1,67 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "params": { + "type": "object", + "properties": { + "componentId": { + "type": "string" + }, + "action": { + "type": "string" + }, + "mode": { + "type": "string", + "enum": ["run", "debug"] + }, + "tag": { + "type": ["string", "null"] + }, + "configData": { + "type": "object" + } + }, + "required": ["componentId", "action", "mode"] + }, + "results": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "success", + "error", + "terminated", + "out-of-memory", + "start-timeout", + "run-timeout", + "image-not-found" + ] + }, + "exitCode": { + "type": ["integer", "null"] + }, + "output": { + "type": ["string", "null"] + }, + "durationMs": { + "type": "integer" + } + }, + "required": ["status", "durationMs"] + }, + "performance": { + "type": "object", + "properties": { + "duration": { + "type": "integer" + } + } + } + }, + "required": ["message", "params", "results"] +} diff --git a/tests/events/ext.keboola.runner-sync-api.syncActionExecuted.json b/tests/events/ext.keboola.runner-sync-api.syncActionExecuted.json new file mode 100644 index 0000000..b945bc4 --- /dev/null +++ b/tests/events/ext.keboola.runner-sync-api.syncActionExecuted.json @@ -0,0 +1,48 @@ +{ + "id": 9900000001, + "event": "ext.keboola.runner-sync-api.syncActionExecuted", + "component": "keboola.runner-sync-api", + "message": "Sync action \"testConnection\" on \"keboola.ex-db-mysql\" finished: success", + "description": "", + "type": "info", + "runId": "run-abc123", + "created": "2026-05-20T10:00:00+0200", + "configurationId": "syncActionExecuted", + "objectId": "", + "objectName": "", + "objectType": "", + "context": { + "remoteAddr": "10.0.0.1", + "httpReferer": null, + "httpUserAgent": "SyncApiService", + "apiVersion": "v2" + }, + "params": { + "componentId": "keboola.ex-db-mysql", + "action": "testConnection", + "mode": "run", + "tag": null, + "configData": { + "parameters": { + "host": "db.example.com", + "#password": "KBC::Encrypted==abc123..." + } + } + }, + "results": { + "status": "success", + "exitCode": 0, + "output": "{\"status\": \"ok\"}", + "durationMs": 1523 + }, + "performance": { + "duration": 2 + }, + "token": { + "id": 12345, + "name": "my-token@keboola.com" + }, + "idBranch": 67890, + "uri": "https://connection.keboola.com/v2/storage/events/9900000001", + "attachments": [] +}