Skip to content

Commit e8e7920

Browse files
Updated subtree from https://github.com/azure/azure-functions-language-worker-protobuf. Tag: v1.5.8-protofile. Commit: 14b2ba5ccb188c160c0f6c519ec1d4521ee36440
1 parent 565ea8b commit e8e7920

File tree

2 files changed

+38
-12
lines changed

2 files changed

+38
-12
lines changed

protobuf/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@ From within the Azure Functions language worker repo:
3636
- `git commit -m "Updated subtree from https://github.com/azure/azure-functions-language-worker-protobuf. Tag: <tag-name>. Commit: <commit hash>"`
3737
- `git push`
3838

39-
## Releasing a Language Worker Protobuf version
40-
41-
1. Draft a release in the GitHub UI
42-
- Be sure to include details of the release
43-
2. Create a release version, following semantic versioning guidelines ([semver.org](https://semver.org/))
44-
3. Tag the version with the pattern: `v<M>.<m>.<p>-protofile` (example: `v1.1.0-protofile`)
45-
4. Merge `dev` to `main`
46-
5. Run the release you'd created
47-
4839
## Consuming FunctionRPC.proto
4940
*Note: Update versionNumber before running following commands*
5041

protobuf/src/proto/FunctionRpc.proto

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ message StreamingMessage {
3232
WorkerInitRequest worker_init_request = 17;
3333
// Worker responds after initializing with its capabilities & status
3434
WorkerInitResponse worker_init_response = 16;
35+
36+
// Worker periodically sends empty heartbeat message to host
37+
WorkerHeartbeat worker_heartbeat = 15;
3538

3639
// Host sends terminate message to worker.
3740
// Worker terminates if it can, otherwise host terminates after a grace period
@@ -117,13 +120,35 @@ message WorkerInitRequest {
117120

118121
// Worker responds with the result of initializing itself
119122
message WorkerInitResponse {
120-
// Version of worker
123+
// NOT USED
124+
// TODO: Remove from protobuf during next breaking change release
121125
string worker_version = 1;
126+
122127
// A map of worker supported features/capabilities
123128
map<string, string> capabilities = 2;
124129

125130
// Status of the response
126131
StatusResult result = 3;
132+
133+
// Worker metadata captured for telemetry purposes
134+
WorkerMetadata worker_metadata = 4;
135+
}
136+
137+
message WorkerMetadata {
138+
// The runtime/stack name
139+
string runtime_name = 1;
140+
141+
// The version of the runtime/stack
142+
string runtime_version = 2;
143+
144+
// The version of the worker
145+
string worker_version = 3;
146+
147+
// The worker bitness/architecture
148+
string worker_bitness = 4;
149+
150+
// Optional additional custom properties
151+
map<string, string> custom_properties = 5;
127152
}
128153

129154
// Used by the host to determine success/failure/cancellation
@@ -134,6 +159,7 @@ message StatusResult {
134159
Success = 1;
135160
Cancelled = 2;
136161
}
162+
137163
// Status for the given result
138164
Status status = 4;
139165

@@ -147,6 +173,10 @@ message StatusResult {
147173
repeated RpcLog logs = 3;
148174
}
149175

176+
// NOT USED
177+
// TODO: Remove from protobuf during next breaking change release
178+
message WorkerHeartbeat {}
179+
150180
// Warning before killing the process after grace_period
151181
// Worker self terminates ..no response on this
152182
message WorkerTerminate {
@@ -291,6 +321,11 @@ message RpcFunctionMetadata {
291321

292322
// A flag indicating if managed dependency is enabled or not
293323
bool managed_dependency_enabled = 14;
324+
325+
// Properties for function metadata
326+
// They're usually specific to a worker and largely passed along to the controller API for use
327+
// outside the host
328+
map<string,string> Properties = 16;
294329
}
295330

296331
// Host tells worker it is ready to receive metadata
@@ -549,11 +584,11 @@ message RpcException {
549584

550585
// Worker specifies whether exception is a user exception,
551586
// for purpose of application insights logging. Defaults to false.
552-
optional bool is_user_exception = 4;
587+
bool is_user_exception = 4;
553588

554589
// Type of exception. If it's a user exception, the type is passed along to app insights.
555590
// Otherwise, it's ignored for now.
556-
optional string type = 5;
591+
string type = 5;
557592
}
558593

559594
// Http cookie type. Note that only name and value are used for Http requests

0 commit comments

Comments
 (0)