Skip to content

Commit 8c6fcbe

Browse files
Updated subtree from https://github.com/azure/azure-functions-language-worker-protobuf. Tag: v1.2.0-protofile. Commit: 77b0401b85b6bf89494f0fab2313a336fcacb41f (#262)
1 parent 8001606 commit 8c6fcbe

File tree

5 files changed

+90
-16
lines changed

5 files changed

+90
-16
lines changed

protobuf/README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,30 @@ From within the Azure Functions language worker repo:
2626
1. Define remote branch for cleaner git commands
2727
- `git remote add proto-file https://github.com/azure/azure-functions-language-worker-protobuf.git`
2828
- `git fetch proto-file`
29-
2. Merge updates
30-
- `git merge -s subtree proto-file/<version branch> --squash --allow-unrelated-histories`
31-
- You can also merge with an explicit path to subtree: `git merge -X subtree=<path in language worker repo> --squash proto-file/<version branch> --allow-unrelated-histories`
32-
3. Finalize with commit
33-
- `git commit -m "Updated subtree from https://github.com/azure/azure-functions-language-worker-protobuf. Branch: <version branch>. Commit: <latest protobuf commit hash>"`
29+
2. Pull a specific release tag
30+
- `git fetch proto-file refs/tags/<tag-name>`
31+
- Example: `git fetch proto-file refs/tags/v1.1.0-protofile`
32+
3. Merge updates
33+
- Merge with an explicit path to subtree: `git merge -X subtree=<path in language worker repo> --squash <tag-name> --allow-unrelated-histories`
34+
- Example: `git merge -X subtree=src/WebJobs.Script.Grpc/azure-functions-language-worker-protobuf --squash v1.1.0-protofile --allow-unrelated-histories`
35+
4. Finalize with commit
36+
- `git commit -m "Updated subtree from https://github.com/azure/azure-functions-language-worker-protobuf. Tag: <tag-name>. Commit: <commit hash>"`
3437
- `git push`
35-
38+
39+
## Releasing a Language Worker Protobuf version
40+
41+
1. Draft a release in the GitHub UI
42+
- Be sure to inculde 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+
3. Merge `dev` to `master`
46+
3647
## Consuming FunctionRPC.proto
3748
*Note: Update versionNumber before running following commands*
3849

3950
## CSharp
4051
```
41-
set NUGET_PATH=%UserProfile%\.nuget\packages
52+
set NUGET_PATH="%UserProfile%\.nuget\packages"
4253
set GRPC_TOOLS_PATH=%NUGET_PATH%\grpc.tools\<versionNumber>\tools\windows_x86
4354
set PROTO_PATH=.\azure-functions-language-worker-protobuf\src\proto
4455
set PROTO=.\azure-functions-language-worker-protobuf\src\proto\FunctionRpc.proto

protobuf/src/proto/FunctionRpc.proto

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package AzureFunctionsRpcMessages;
1111

1212
import "google/protobuf/duration.proto";
1313
import "identity/ClaimsIdentityRpc.proto";
14+
import "shared/NullableTypes.proto";
1415

1516
// Interface exported by the server.
1617
service FunctionRpc {
@@ -236,6 +237,9 @@ message RpcFunctionMetadata {
236237

237238
// Bindings info
238239
map<string, BindingInfo> bindings = 6;
240+
241+
// Is set to true for proxy
242+
bool is_proxy = 7;
239243
}
240244

241245
// Host requests worker to invoke a Function
@@ -375,6 +379,44 @@ message RpcException {
375379
string message = 2;
376380
}
377381

382+
// Http cookie type. Note that only name and value are used for Http requests
383+
message RpcHttpCookie {
384+
// Enum that lets servers require that a cookie shouoldn't be sent with cross-site requests
385+
enum SameSite {
386+
None = 0;
387+
Lax = 1;
388+
Strict = 2;
389+
}
390+
391+
// Cookie name
392+
string name = 1;
393+
394+
// Cookie value
395+
string value = 2;
396+
397+
// Specifies allowed hosts to receive the cookie
398+
NullableString domain = 3;
399+
400+
// Specifies URL path that must exist in the requested URL
401+
NullableString path = 4;
402+
403+
// Sets the cookie to expire at a specific date instead of when the client closes.
404+
// It is generally recommended that you use "Max-Age" over "Expires".
405+
NullableTimestamp expires = 5;
406+
407+
// Sets the cookie to only be sent with an encrypted request
408+
NullableBool secure = 6;
409+
410+
// Sets the cookie to be inaccessible to JavaScript's Document.cookie API
411+
NullableBool http_only = 7;
412+
413+
// Allows servers to assert that a cookie ought not to be sent along with cross-site requests
414+
SameSite same_site = 8;
415+
416+
// Number of seconds until the cookie expires. A zero or negative number will expire the cookie immediately.
417+
NullableDouble max_age = 9;
418+
}
419+
378420
// TODO - solidify this or remove it
379421
message RpcHttp {
380422
string method = 1;
@@ -387,4 +429,5 @@ message RpcHttp {
387429
bool enable_content_negotiation= 16;
388430
TypedData rawBody = 17;
389431
repeated RpcClaimsIdentity identities = 18;
432+
repeated RpcHttpCookie cookies = 19;
390433
}

protobuf/src/proto/identity/ClaimsIdentityRpc.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
syntax = "proto3";
22
// protobuf vscode extension: https://marketplace.visualstudio.com/items?itemName=zxh404.vscode-proto3
33

4-
import "shared/NullableString.proto";
4+
import "shared/NullableTypes.proto";
55

66
// Light-weight representation of a .NET System.Security.Claims.ClaimsIdentity object.
77
// This is the same serialization as found in EasyAuth, and needs to be kept in sync with

protobuf/src/proto/shared/NullableString.proto

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
syntax = "proto3";
2+
// protobuf vscode extension: https://marketplace.visualstudio.com/items?itemName=zxh404.vscode-proto3
3+
4+
import "google/protobuf/timestamp.proto";
5+
6+
message NullableString {
7+
oneof string {
8+
string value = 1;
9+
}
10+
}
11+
12+
message NullableDouble {
13+
oneof double {
14+
double value = 1;
15+
}
16+
}
17+
18+
message NullableBool {
19+
oneof bool {
20+
bool value = 1;
21+
}
22+
}
23+
24+
message NullableTimestamp {
25+
oneof timestamp {
26+
google.protobuf.Timestamp value = 1;
27+
}
28+
}

0 commit comments

Comments
 (0)