Skip to content

Commit 7cce215

Browse files
Merge pull request #72 from Azure/dev
Merge dev -> main
2 parents 245e640 + 24fed0e commit 7cce215

File tree

3 files changed

+54
-27
lines changed

3 files changed

+54
-27
lines changed

CODEOWNERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# See https://help.github.com/articles/about-codeowners/
2+
# for more info about CODEOWNERS file
3+
#
4+
# It uses the same pattern rule for gitignore file
5+
# https://git-scm.com/docs/gitignore#_pattern_format
6+
7+
8+
9+
# AZURE FUNCTIONS TEAM
10+
# For all file changes, github would automatically
11+
# include the following people in the PRs.
12+
# Language owners should get notified of any new changes to the proto file.
13+
14+
src/proto/FunctionRpc.proto @vrdmr @gavin-aguiar @YunchuWang @surgupta-msft @satvu @ejizba @alrod @anatolib @kaibocai @shreyas-gopalakrishna @amamounelsayed @Francisco-Gamino

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ From within the Azure Functions language worker repo:
4242
- Be sure to include details of the release
4343
2. Create a release version, following semantic versioning guidelines ([semver.org](https://semver.org/))
4444
3. Tag the version with the pattern: `v<M>.<m>.<p>-protofile` (example: `v1.1.0-protofile`)
45-
3. Merge `dev` to `master`
45+
4. Merge `dev` to `main`
46+
5. Run the release you'd created
4647

4748
## Consuming FunctionRPC.proto
4849
*Note: Update versionNumber before running following commands*

src/proto/FunctionRpc.proto

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,18 @@ 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-
3936
// Host sends terminate message to worker.
4037
// Worker terminates if it can, otherwise host terminates after a grace period
4138
WorkerTerminate worker_terminate = 14;
4239

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

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

5047
// Worker requests a desired action (restart worker, reload function)
5148
WorkerActionResponse worker_action_response = 7;
52-
49+
5350
// Host sends required metadata to worker to load function
5451
FunctionLoadRequest function_load_request = 8;
5552
// Worker responds after loading with the load result
5653
FunctionLoadResponse function_load_response = 9;
57-
54+
5855
// Host requests a given invocation
5956
InvocationRequest invocation_request = 4;
6057

6158
// Worker responds to a given invocation
6259
InvocationResponse invocation_response = 5;
6360

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

6865
// Worker logs a message back to the host
6966
RpcLog rpc_log = 2;
70-
67+
7168
FunctionEnvironmentReloadRequest function_environment_reload_request = 25;
7269

7370
FunctionEnvironmentReloadResponse function_environment_reload_response = 26;
@@ -82,21 +79,24 @@ message StreamingMessage {
8279

8380
// Host sends required metadata to worker to load functions
8481
FunctionLoadRequestCollection function_load_request_collection = 31;
82+
83+
// Host gets the list of function load responses
84+
FunctionLoadResponseCollection function_load_response_collection = 32;
8585
}
8686
}
8787

8888
// Process.Start required info
8989
// connection details
9090
// protocol type
91-
// protocol version
91+
// protocol version
9292

9393
// Worker sends the host information identifying itself
9494
message StartStream {
9595
// id of the worker
9696
string worker_id = 2;
9797
}
9898

99-
// Host requests the worker to initialize itself
99+
// Host requests the worker to initialize itself
100100
message WorkerInitRequest {
101101
// version of the host sending init request
102102
string host_version = 1;
@@ -110,6 +110,9 @@ message WorkerInitRequest {
110110

111111
// Full path of worker.config.json location
112112
string worker_directory = 4;
113+
114+
// base directory for function app
115+
string function_app_directory = 5;
113116
}
114117

115118
// Worker responds with the result of initializing itself
@@ -144,11 +147,6 @@ message StatusResult {
144147
repeated RpcLog logs = 3;
145148
}
146149

147-
// TODO: investigate grpc heartbeat - don't limit to grpc implemention
148-
149-
// Message is empty by design - Will add more fields in future if needed
150-
message WorkerHeartbeat {}
151-
152150
// Warning before killing the process after grace_period
153151
// Worker self terminates ..no response on this
154152
message WorkerTerminate {
@@ -179,24 +177,25 @@ message FileChangeEventRequest {
179177

180178
// Indicates whether worker reloaded successfully or needs a restart
181179
message WorkerActionResponse {
182-
// indicates whether a restart is needed, or reload succesfully
180+
// indicates whether a restart is needed, or reload successfully
183181
enum Action {
184182
Restart = 0;
185183
Reload = 1;
186184
}
187-
185+
188186
// action for this response
189187
Action action = 1;
190188

191189
// text reason for the response
192190
string reason = 2;
193191
}
194192

195-
// NOT USED
196-
message WorkerStatusRequest{
193+
// Used by the host to determine worker health
194+
message WorkerStatusRequest {
197195
}
198196

199-
// NOT USED
197+
// Worker responds with status message
198+
// TODO: Add any worker relevant status to response
200199
message WorkerStatusResponse {
201200
}
202201

@@ -228,6 +227,11 @@ message FunctionLoadRequestCollection {
228227
repeated FunctionLoadRequest function_load_requests = 1;
229228
}
230229

230+
// Host gets the list of function load responses
231+
message FunctionLoadResponseCollection {
232+
repeated FunctionLoadResponse function_load_responses = 1;
233+
}
234+
231235
// Load request of a single Function
232236
message FunctionLoadRequest {
233237
// unique function identifier (avoid name collisions, facilitate reload case)
@@ -260,7 +264,7 @@ message RpcFunctionMetadata {
260264

261265
// base directory for the Function
262266
string directory = 1;
263-
267+
264268
// Script file specified
265269
string script_file = 2;
266270

@@ -304,7 +308,7 @@ message FunctionMetadataResponse {
304308
StatusResult result = 2;
305309

306310
// if set to true then host will perform indexing
307-
bool useDefaultMetadataIndexing = 3;
311+
bool use_default_metadata_indexing = 3;
308312
}
309313

310314
// Host requests worker to invoke a Function
@@ -481,7 +485,7 @@ message BindingInfo {
481485
DataType data_type = 4;
482486
}
483487

484-
// Used to send logs back to the Host
488+
// Used to send logs back to the Host
485489
message RpcLog {
486490
// Matching ILogger semantics
487491
// https://github.com/aspnet/Logging/blob/9506ccc3f3491488fe88010ef8b9eb64594abf95/src/Microsoft.Extensions.Logging/Logger.cs
@@ -532,7 +536,7 @@ message RpcLog {
532536
map<string, TypedData> propertiesMap = 9;
533537
}
534538

535-
// Encapsulates an Exception
539+
// Encapsulates an Exception
536540
message RpcException {
537541
// Source of the exception
538542
string source = 3;
@@ -542,6 +546,14 @@ message RpcException {
542546

543547
// Textual message describing the exception
544548
string message = 2;
549+
550+
// Worker specifies whether exception is a user exception,
551+
// for purpose of application insights logging. Defaults to false.
552+
optional bool is_user_exception = 4;
553+
554+
// Type of exception. If it's a user exception, the type is passed along to app insights.
555+
// Otherwise, it's ignored for now.
556+
optional string type = 5;
545557
}
546558

547559
// Http cookie type. Note that only name and value are used for Http requests
@@ -586,7 +598,7 @@ message RpcHttpCookie {
586598
// TODO - solidify this or remove it
587599
message RpcHttp {
588600
string method = 1;
589-
string url = 2;
601+
string url = 2;
590602
map<string,string> headers = 3;
591603
TypedData body = 4;
592604
map<string,string> params = 10;

0 commit comments

Comments
 (0)