Skip to content

Commit 32934ea

Browse files
authored
Merge pull request #50 from DefangLabs/lio/update-gen-protoc
Revert "Revert get param to ServiceID"
2 parents 8054d30 + d9ce0db commit 32934ea

File tree

9 files changed

+45
-177
lines changed

9 files changed

+45
-177
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ const defangServiceProvider: pulumi.dynamic.ResourceProvider<
718718
id: string,
719719
olds?: DefangServiceOutputs
720720
): Promise<pulumi.dynamic.ReadResult<DefangServiceOutputs>> {
721-
const serviceId = new pb.ServiceID();
721+
const serviceId = new pb.GetRequest();
722722
// serviceId.setProject(project);
723723
serviceId.setName(id);
724724
assert(olds?.fabricDNS, "fabricDNS is required");

io/defang/v1/fabric.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ service FabricController {
2424
option deprecated = true;
2525
}; // used by pulumi-defang provider; should use Deploy
2626
rpc Deploy(DeployRequest) returns (DeployResponse);
27-
rpc Get(ServiceID) returns (ServiceInfo) {
27+
rpc Get(GetRequest) returns (ServiceInfo) {
2828
option idempotency_level = NO_SIDE_EFFECTS;
2929
}; // should be GetService
3030
rpc Delete(DeleteRequest) returns (DeleteResponse) {
@@ -405,7 +405,7 @@ message GetRequest { // was ServiceID
405405
}
406406

407407
message ServiceID {
408-
option deprecated = true; // still used by the old pulumi-defang provider
408+
option deprecated = true; // still used by pulumi-defang providers stored in state files
409409
string name = 1;
410410
string project = 2;
411411
}

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"dependencies": {
99
"@balena/dockerignore": "^1.0.2",
10-
"@grpc/grpc-js": "^1.12.2",
10+
"@grpc/grpc-js": "^1.12.6",
1111
"google-protobuf": "^3.5.0",
1212
"node-fetch": "^3.3.1",
1313
"tar": "^6.1.15"
@@ -20,7 +20,7 @@
2020
"@types/google-protobuf": "^3.15.6",
2121
"@types/node": "^16",
2222
"@types/tar": "^6.1.5",
23-
"grpc-tools": "^1.12.4",
23+
"grpc-tools": "^1.13.0",
2424
"ts-protoc-gen": "^0.15.0",
2525
"typescript": "~5.1.6"
2626
},
@@ -39,7 +39,7 @@
3939
"scripts": {
4040
"build": "tsc && cp -r protos lib/",
4141
"prebuild": "npm run build-grpc",
42-
"build-grpc": "mkdir -p protos && grpc_tools_node_protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=service=grpc-node,mode=grpc-js:./protos --js_out=import_style=commonjs,binary:./protos --grpc_out=grpc_js:./protos io/defang/v1/*.proto",
42+
"build-grpc": "mkdir -p protos && grpc_tools_node_protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=service=grpc-node,mode=grpc-js:./protos --js_out=import_style=commonjs,binary:./protos --grpc_out=grpc_js,omit_serialize_instanceof:./protos io/defang/v1/*.proto",
4343
"prepublish": "npm run build",
4444
"preversion": "git pull && npm run build",
4545
"postversion": "git push --follow-tags",

protos/io/defang/v1/fabric_grpc_pb.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface IFabricControllerService extends grpc.ServiceDefinition<grpc.UntypedSe
1515
tail: grpc.MethodDefinition<io_defang_v1_fabric_pb.TailRequest, io_defang_v1_fabric_pb.TailResponse>;
1616
update: grpc.MethodDefinition<io_defang_v1_fabric_pb.Service, io_defang_v1_fabric_pb.ServiceInfo>;
1717
deploy: grpc.MethodDefinition<io_defang_v1_fabric_pb.DeployRequest, io_defang_v1_fabric_pb.DeployResponse>;
18-
get: grpc.MethodDefinition<io_defang_v1_fabric_pb.ServiceID, io_defang_v1_fabric_pb.ServiceInfo>;
18+
get: grpc.MethodDefinition<io_defang_v1_fabric_pb.GetRequest, io_defang_v1_fabric_pb.ServiceInfo>;
1919
delete: grpc.MethodDefinition<io_defang_v1_fabric_pb.DeleteRequest, io_defang_v1_fabric_pb.DeleteResponse>;
2020
destroy: grpc.MethodDefinition<io_defang_v1_fabric_pb.DestroyRequest, io_defang_v1_fabric_pb.DestroyResponse>;
2121
publish: grpc.MethodDefinition<io_defang_v1_fabric_pb.PublishRequest, google_protobuf_empty_pb.Empty>;
@@ -56,7 +56,7 @@ export interface IFabricControllerServer extends grpc.UntypedServiceImplementati
5656
tail: grpc.handleServerStreamingCall<io_defang_v1_fabric_pb.TailRequest, io_defang_v1_fabric_pb.TailResponse>;
5757
update: grpc.handleUnaryCall<io_defang_v1_fabric_pb.Service, io_defang_v1_fabric_pb.ServiceInfo>;
5858
deploy: grpc.handleUnaryCall<io_defang_v1_fabric_pb.DeployRequest, io_defang_v1_fabric_pb.DeployResponse>;
59-
get: grpc.handleUnaryCall<io_defang_v1_fabric_pb.ServiceID, io_defang_v1_fabric_pb.ServiceInfo>;
59+
get: grpc.handleUnaryCall<io_defang_v1_fabric_pb.GetRequest, io_defang_v1_fabric_pb.ServiceInfo>;
6060
delete: grpc.handleUnaryCall<io_defang_v1_fabric_pb.DeleteRequest, io_defang_v1_fabric_pb.DeleteResponse>;
6161
destroy: grpc.handleUnaryCall<io_defang_v1_fabric_pb.DestroyRequest, io_defang_v1_fabric_pb.DestroyResponse>;
6262
publish: grpc.handleUnaryCall<io_defang_v1_fabric_pb.PublishRequest, google_protobuf_empty_pb.Empty>;
@@ -109,9 +109,9 @@ export class FabricControllerClient extends grpc.Client {
109109
deploy(argument: io_defang_v1_fabric_pb.DeployRequest, callback: grpc.requestCallback<io_defang_v1_fabric_pb.DeployResponse>): grpc.ClientUnaryCall;
110110
deploy(argument: io_defang_v1_fabric_pb.DeployRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<io_defang_v1_fabric_pb.DeployResponse>): grpc.ClientUnaryCall;
111111
deploy(argument: io_defang_v1_fabric_pb.DeployRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<io_defang_v1_fabric_pb.DeployResponse>): grpc.ClientUnaryCall;
112-
get(argument: io_defang_v1_fabric_pb.ServiceID, callback: grpc.requestCallback<io_defang_v1_fabric_pb.ServiceInfo>): grpc.ClientUnaryCall;
113-
get(argument: io_defang_v1_fabric_pb.ServiceID, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<io_defang_v1_fabric_pb.ServiceInfo>): grpc.ClientUnaryCall;
114-
get(argument: io_defang_v1_fabric_pb.ServiceID, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<io_defang_v1_fabric_pb.ServiceInfo>): grpc.ClientUnaryCall;
112+
get(argument: io_defang_v1_fabric_pb.GetRequest, callback: grpc.requestCallback<io_defang_v1_fabric_pb.ServiceInfo>): grpc.ClientUnaryCall;
113+
get(argument: io_defang_v1_fabric_pb.GetRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<io_defang_v1_fabric_pb.ServiceInfo>): grpc.ClientUnaryCall;
114+
get(argument: io_defang_v1_fabric_pb.GetRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<io_defang_v1_fabric_pb.ServiceInfo>): grpc.ClientUnaryCall;
115115
delete(argument: io_defang_v1_fabric_pb.DeleteRequest, callback: grpc.requestCallback<io_defang_v1_fabric_pb.DeleteResponse>): grpc.ClientUnaryCall;
116116
delete(argument: io_defang_v1_fabric_pb.DeleteRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<io_defang_v1_fabric_pb.DeleteResponse>): grpc.ClientUnaryCall;
117117
delete(argument: io_defang_v1_fabric_pb.DeleteRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<io_defang_v1_fabric_pb.DeleteResponse>): grpc.ClientUnaryCall;

0 commit comments

Comments
 (0)