Skip to content

Commit 57a4dda

Browse files
elpranspragnagopa
authored andcommitted
Update protos (#150)
Update protobuf definitions to a42a580e5211f89d5cc605a869a48425fccbd880. Bump grpc dependencies and host build. Closes: #146
1 parent 2cf6817 commit 57a4dda

File tree

6 files changed

+26
-17
lines changed

6 files changed

+26
-17
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ addons:
1616
key_url: https://packages.microsoft.com/keys/microsoft.asc
1717

1818
packages:
19-
- dotnet-sdk-2.1.4
19+
- libunwind8
20+
- dotnet-sdk-2.1.300
2021
- azure-functions-core-tools
2122

2223
cache:

azure/functions_worker/protos/_src/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,19 @@ set OUTDIR=%MSGDIR%\DotNet
5252
mkdir %OUTDIR%
5353
%GRPC_TOOLS_PATH%\protoc.exe %PROTO% --csharp_out %OUTDIR% --grpc_out=%OUTDIR% --plugin=protoc-gen-grpc=%GRPC_TOOLS_PATH%\grpc_csharp_plugin.exe --proto_path=%PROTO_PATH% --proto_path=%PROTOBUF_TOOLS%
5454
```
55-
## Java
56-
--TODO--
57-
5855
## JavaScript
56+
In package.json, add to the build script the following commands to build .js files and to build .ts files. Use and install npm package `protobufjs`.
57+
58+
Generate JavaScript files:
59+
```
60+
pbjs -t json-module -w commonjs -o azure-functions-language-worker-protobuf/src/rpc.js azure-functions-language-worker-protobuf/src/proto/FunctionRpc.proto
61+
```
62+
Generate TypeScript files:
63+
```
64+
pbjs -t static-module azure-functions-language-worker-protobuf/src/proto/FunctionRpc.proto -o azure-functions-language-worker-protobuf/src/rpc_static.js && pbts -o azure-functions-language-worker-protobuf/src/rpc.d.ts azure-functions-language-worker-protobuf/src/rpc_static.js
65+
```
66+
67+
## Java
5968
Maven plugin : [protobuf-maven-plugin](https://www.xolstice.org/protobuf-maven-plugin/)
6069
In pom.xml add following under configuration for this plugin
6170
<protoSourceRoot>${basedir}/<path to this repo>/azure-functions-language-worker-protobuf/src/proto</protoSourceRoot>

azure/functions_worker/protos/_src/src/proto/FunctionRpc.proto

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ syntax = "proto3";
44
option java_multiple_files = true;
55
option java_package = "com.microsoft.azure.functions.rpc.messages";
66
option java_outer_classname = "FunctionProto";
7-
option objc_class_prefix = "FunctionRpc";
87
option csharp_namespace = "Microsoft.Azure.WebJobs.Script.Grpc.Messages";
98

10-
package FunctionRpc;
9+
package AzureFunctionsRpcMessages;
1110

1211
import "google/protobuf/duration.proto";
1312

azure/functions_worker/testutils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,7 @@ def popen_webhost(*, stdout, stderr, script_root=FUNCS_PATH, port=None):
518518
# path objects there on Windows.
519519
extra_env = {
520520
'AzureWebJobsScriptRoot': str(script_root),
521-
'workers:config:path': str(worker_path),
522-
'workers:python:path': str(worker_path / 'python' / 'worker.py'),
521+
'languageWorkers:python:workerDirectory': str(worker_path),
523522
'host:logger:consoleLoggingMode': 'always',
524523
}
525524

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616

1717
# TODO: change this to something more stable when available.
18-
WEBHOST_URL = ('https://ci.appveyor.com/api/buildjobs/r1d0pxmtkib47bc4'
19-
'/artifacts/Functions.Binaries.2.0.11737-alpha.zip')
18+
WEBHOST_URL = ('https://ci.appveyor.com/api/buildjobs/0exdyn0sak341kea'
19+
'/artifacts/Functions.Binaries.2.0.11886-alpha.no-runtime.zip')
2020

2121
# Extensions necessary for non-core bindings.
2222
AZURE_EXTENSIONS = [
@@ -184,12 +184,12 @@ def run(self):
184184
'azure.functions_worker.bindings'],
185185
provides=['azure.functions'],
186186
setup_requires=[
187-
'grpcio~=1.9.1',
188-
'grpcio-tools~=1.9.1',
187+
'grpcio~=1.12.1',
188+
'grpcio-tools~=1.12.1',
189189
],
190190
install_requires=[
191-
'grpcio~=1.9.1',
192-
'grpcio-tools~=1.9.1',
191+
'grpcio~=1.12.1',
192+
'grpcio-tools~=1.12.1',
193193
],
194194
extras_require={
195195
'dev': [

tests/cosmosdb_functions/host.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
"maxOutstandingRequests": 30
66
},
77
"logger": {
8-
"defaultLevel": "Trace",
9-
"categoryLevels": {
10-
"Worker": "Trace"
8+
"fileLoggingMode": "always",
9+
"categoryFilter": {
10+
"Worker": "Trace",
11+
"defaultLevel": "Trace"
1112
}
1213
},
1314
"queues": {

0 commit comments

Comments
 (0)