Skip to content

Update PowerShell language worker protobuf to version 1.5.8 #876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions protobuf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <tag-name>. Commit: <commit hash>"`
- `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<M>.<m>.<p>-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*

Expand Down
41 changes: 38 additions & 3 deletions protobuf/src/proto/FunctionRpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<string, string> 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<string, string> custom_properties = 5;
}

// Used by the host to determine success/failure/cancellation
Expand All @@ -134,6 +159,7 @@ message StatusResult {
Success = 1;
Cancelled = 2;
}

// Status for the given result
Status status = 4;

Expand All @@ -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 {
Expand Down Expand Up @@ -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<string,string> Properties = 16;
}

// Host tells worker it is ready to receive metadata
Expand Down Expand Up @@ -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
Expand Down