diff --git a/protobuf/README.md b/protobuf/README.md index f6c9cc4c..81deb0b9 100644 --- a/protobuf/README.md +++ b/protobuf/README.md @@ -36,15 +36,6 @@ From within the Azure Functions language worker repo: - `git commit -m "Updated subtree from https://github.com/azure/azure-functions-language-worker-protobuf. Tag: . Commit: "` - `git push` -## Releasing a Language Worker Protobuf version - -1. Draft a release in the GitHub UI - - Be sure to include details of the release -2. Create a release version, following semantic versioning guidelines ([semver.org](https://semver.org/)) -3. Tag the version with the pattern: `v..

-protofile` (example: `v1.1.0-protofile`) -4. Merge `dev` to `main` -5. Run the release you'd created - ## Consuming FunctionRPC.proto *Note: Update versionNumber before running following commands* diff --git a/protobuf/src/proto/FunctionRpc.proto b/protobuf/src/proto/FunctionRpc.proto index 72f5069a..12809828 100644 --- a/protobuf/src/proto/FunctionRpc.proto +++ b/protobuf/src/proto/FunctionRpc.proto @@ -32,6 +32,9 @@ message StreamingMessage { WorkerInitRequest worker_init_request = 17; // Worker responds after initializing with its capabilities & status WorkerInitResponse worker_init_response = 16; + + // Worker periodically sends empty heartbeat message to host + WorkerHeartbeat worker_heartbeat = 15; // Host sends terminate message to worker. // Worker terminates if it can, otherwise host terminates after a grace period @@ -117,13 +120,35 @@ message WorkerInitRequest { // Worker responds with the result of initializing itself message WorkerInitResponse { - // Version of worker + // NOT USED + // TODO: Remove from protobuf during next breaking change release string worker_version = 1; + // A map of worker supported features/capabilities map capabilities = 2; // Status of the response StatusResult result = 3; + + // Worker metadata captured for telemetry purposes + WorkerMetadata worker_metadata = 4; +} + +message WorkerMetadata { + // The runtime/stack name + string runtime_name = 1; + + // The version of the runtime/stack + string runtime_version = 2; + + // The version of the worker + string worker_version = 3; + + // The worker bitness/architecture + string worker_bitness = 4; + + // Optional additional custom properties + map custom_properties = 5; } // Used by the host to determine success/failure/cancellation @@ -134,6 +159,7 @@ message StatusResult { Success = 1; Cancelled = 2; } + // Status for the given result Status status = 4; @@ -147,6 +173,10 @@ message StatusResult { repeated RpcLog logs = 3; } +// NOT USED +// TODO: Remove from protobuf during next breaking change release +message WorkerHeartbeat {} + // Warning before killing the process after grace_period // Worker self terminates ..no response on this message WorkerTerminate { @@ -291,6 +321,11 @@ message RpcFunctionMetadata { // A flag indicating if managed dependency is enabled or not bool managed_dependency_enabled = 14; + + // Properties for function metadata + // They're usually specific to a worker and largely passed along to the controller API for use + // outside the host + map Properties = 16; } // Host tells worker it is ready to receive metadata @@ -549,11 +584,11 @@ message RpcException { // Worker specifies whether exception is a user exception, // for purpose of application insights logging. Defaults to false. - optional bool is_user_exception = 4; + bool is_user_exception = 4; // Type of exception. If it's a user exception, the type is passed along to app insights. // Otherwise, it's ignored for now. - optional string type = 5; + string type = 5; } // Http cookie type. Note that only name and value are used for Http requests