Skip to content

Commit 6cccbbf

Browse files
Merge pull request #74 from Azure/dev
Merge dev to main
2 parents 7cce215 + 3cef6c2 commit 6cccbbf

File tree

2 files changed

+25
-27
lines changed

2 files changed

+25
-27
lines changed

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

src/proto/FunctionRpc.proto

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@ message StreamingMessage {
2626
oneof content {
2727

2828
// Worker initiates stream
29-
StartStream start_stream = 20;
29+
StartStream start_stream = 20;
3030

3131
// Host sends capabilities/init data to worker
3232
WorkerInitRequest worker_init_request = 17;
3333
// Worker responds after initializing with its capabilities & status
3434
WorkerInitResponse worker_init_response = 16;
3535

36+
// Worker periodically sends empty heartbeat message to host
37+
WorkerHeartbeat worker_heartbeat = 15;
38+
3639
// Host sends terminate message to worker.
3740
// Worker terminates if it can, otherwise host terminates after a grace period
3841
WorkerTerminate worker_terminate = 14;
3942

40-
// Host periodically sends status request to the worker
43+
// Add any worker relevant status to response
4144
WorkerStatusRequest worker_status_request = 12;
4245
WorkerStatusResponse worker_status_response = 13;
4346

@@ -46,25 +49,25 @@ message StreamingMessage {
4649

4750
// Worker requests a desired action (restart worker, reload function)
4851
WorkerActionResponse worker_action_response = 7;
49-
52+
5053
// Host sends required metadata to worker to load function
5154
FunctionLoadRequest function_load_request = 8;
5255
// Worker responds after loading with the load result
5356
FunctionLoadResponse function_load_response = 9;
54-
57+
5558
// Host requests a given invocation
5659
InvocationRequest invocation_request = 4;
5760

5861
// Worker responds to a given invocation
5962
InvocationResponse invocation_response = 5;
6063

61-
// Host sends cancel message to attempt to cancel an invocation.
64+
// Host sends cancel message to attempt to cancel an invocation.
6265
// If an invocation is cancelled, host will receive an invocation response with status cancelled.
6366
InvocationCancel invocation_cancel = 21;
6467

6568
// Worker logs a message back to the host
6669
RpcLog rpc_log = 2;
67-
70+
6871
FunctionEnvironmentReloadRequest function_environment_reload_request = 25;
6972

7073
FunctionEnvironmentReloadResponse function_environment_reload_response = 26;
@@ -88,15 +91,15 @@ message StreamingMessage {
8891
// Process.Start required info
8992
// connection details
9093
// protocol type
91-
// protocol version
94+
// protocol version
9295

9396
// Worker sends the host information identifying itself
9497
message StartStream {
9598
// id of the worker
9699
string worker_id = 2;
97100
}
98101

99-
// Host requests the worker to initialize itself
102+
// Host requests the worker to initialize itself
100103
message WorkerInitRequest {
101104
// version of the host sending init request
102105
string host_version = 1;
@@ -147,6 +150,11 @@ message StatusResult {
147150
repeated RpcLog logs = 3;
148151
}
149152

153+
// TODO: investigate grpc heartbeat - don't limit to grpc implemention
154+
155+
// Message is empty by design - Will add more fields in future if needed
156+
message WorkerHeartbeat {}
157+
150158
// Warning before killing the process after grace_period
151159
// Worker self terminates ..no response on this
152160
message WorkerTerminate {
@@ -177,25 +185,24 @@ message FileChangeEventRequest {
177185

178186
// Indicates whether worker reloaded successfully or needs a restart
179187
message WorkerActionResponse {
180-
// indicates whether a restart is needed, or reload successfully
188+
// indicates whether a restart is needed, or reload succesfully
181189
enum Action {
182190
Restart = 0;
183191
Reload = 1;
184192
}
185-
193+
186194
// action for this response
187195
Action action = 1;
188196

189197
// text reason for the response
190198
string reason = 2;
191199
}
192200

193-
// Used by the host to determine worker health
194-
message WorkerStatusRequest {
201+
// NOT USED
202+
message WorkerStatusRequest{
195203
}
196204

197-
// Worker responds with status message
198-
// TODO: Add any worker relevant status to response
205+
// NOT USED
199206
message WorkerStatusResponse {
200207
}
201208

@@ -264,7 +271,7 @@ message RpcFunctionMetadata {
264271

265272
// base directory for the Function
266273
string directory = 1;
267-
274+
268275
// Script file specified
269276
string script_file = 2;
270277

@@ -485,7 +492,7 @@ message BindingInfo {
485492
DataType data_type = 4;
486493
}
487494

488-
// Used to send logs back to the Host
495+
// Used to send logs back to the Host
489496
message RpcLog {
490497
// Matching ILogger semantics
491498
// https://github.com/aspnet/Logging/blob/9506ccc3f3491488fe88010ef8b9eb64594abf95/src/Microsoft.Extensions.Logging/Logger.cs
@@ -536,7 +543,7 @@ message RpcLog {
536543
map<string, TypedData> propertiesMap = 9;
537544
}
538545

539-
// Encapsulates an Exception
546+
// Encapsulates an Exception
540547
message RpcException {
541548
// Source of the exception
542549
string source = 3;
@@ -598,7 +605,7 @@ message RpcHttpCookie {
598605
// TODO - solidify this or remove it
599606
message RpcHttp {
600607
string method = 1;
601-
string url = 2;
608+
string url = 2;
602609
map<string,string> headers = 3;
603610
TypedData body = 4;
604611
map<string,string> params = 10;

0 commit comments

Comments
 (0)