From d909638f8d09571133df26e12615e8a9bd9bd284 Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Tue, 20 Feb 2024 15:29:06 +0100 Subject: [PATCH 1/2] Add invoke key and key to StartMessage --- dev/restate/service/protocol.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev/restate/service/protocol.proto b/dev/restate/service/protocol.proto index 97b7f46..8131bfb 100644 --- a/dev/restate/service/protocol.proto +++ b/dev/restate/service/protocol.proto @@ -41,6 +41,9 @@ message StartMessage { bool partial_state = 5; repeated Header headers = 6; + + // If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. + string key = 7; } // Type: 0x0000 + 1 @@ -200,6 +203,9 @@ message InvokeEntryMessage { repeated Header headers = 4; + // If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. + string key = 5; + oneof result { bytes value = 14; Failure failure = 15; @@ -222,6 +228,9 @@ message BackgroundInvokeEntryMessage { uint64 invoke_time = 4; repeated Header headers = 5; + + // If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. + string key = 6; } // Completable: Yes From d6f4def446c78b58f060204f0a9cac3c5af68ff1 Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Tue, 20 Feb 2024 16:26:48 +0100 Subject: [PATCH 2/2] Deployment manifest (this should replace the old service discovery protobuf). --- deployment_manifest_schema.json | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 deployment_manifest_schema.json diff --git a/deployment_manifest_schema.json b/deployment_manifest_schema.json new file mode 100644 index 0000000..ae6e57b --- /dev/null +++ b/deployment_manifest_schema.json @@ -0,0 +1,59 @@ +{ + "$id": "https://restate.dev/deployment.manifest.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Deployment", + "description": "Restate deployment manifest", + "properties": { + "protocolMode": { + "title": "ProtocolMode", + "enum": ["BIDI_STREAM", "REQUEST_RESPONSE"] + }, + "minProtocolVersion": { + "type": "integer", + "minimum": 0 + }, + "maxProtocolVersion": { + "type": "integer", + "maximum": 0 + }, + "components": { + "type": "array", + "items": { + "type": "object", + "title": "Component", + "properties": { + "fullyQualifiedComponentName": { + "type": "string", + "pattern": "^[a-zA-Z]+[a-zA-Z0-9._-]*$" + }, + "componentType": { + "title": "ComponentType", + "enum": ["VIRTUAL_OBJECT", "SERVICE"] + }, + "handlers": { + "type": "array", + "items": { + "type": "object", + "title": "Handler", + "properties": { + "name": { + "type": "string", + "pattern": "^[a-zA-Z]+[a-zA-Z0-9_-]*$" + }, + "inputSchema": {}, + "outputSchema": {} + }, + "required": [ "name" ], + "additionalProperties": false + } + } + }, + "required": [ "fullyQualifiedComponentName","componentType", "handlers" ], + "additionalProperties": false + } + } + }, + "required": [ "minProtocolVersion", "maxProtocolVersion", "components" ], + "additionalProperties": false +} \ No newline at end of file