Skip to content

Commit e3987b7

Browse files
authored
chore(proto): update protos and point Workflow to beta APIs (#531)
* proto updation and beta endpoint for wf http Signed-off-by: Deepanshu Agarwal <[email protected]> * lint Signed-off-by: Deepanshu Agarwal <[email protected]> --------- Signed-off-by: Deepanshu Agarwal <[email protected]>
1 parent 55f1673 commit e3987b7

File tree

23 files changed

+1613
-107
lines changed

23 files changed

+1613
-107
lines changed

scripts/fetch-proto.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ OS=$(echo `uname`|tr '[:upper:]' '[:lower:]')
33
ARCH=$(uname -m)
44
ORG_NAME="dapr"
55
REPO_NAME="dapr"
6-
BRANCH_NAME="v1.11.0"
6+
BRANCH_NAME="v1.12.0"
77

88
# Path to store output
99
PATH_ROOT=$(pwd)

src/implementation/Client/HTTPClient/workflow.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default class HTTPClientWorkflow implements IClientWorkflow {
4242

4343
try {
4444
const result = await this.client.executeWithApiVersion(
45-
"v1.0-alpha1",
45+
"v1.0-beta1",
4646
`/workflows/${workflowComponent}/${instanceID}`,
4747
{ method: "GET" },
4848
);
@@ -97,7 +97,7 @@ export default class HTTPClientWorkflow implements IClientWorkflow {
9797

9898
try {
9999
await this.client.executeWithApiVersion(
100-
"v1.0-alpha1",
100+
"v1.0-beta1",
101101
`/workflows/${workflowComponent}/${workflowName}/start?${queryParams}`,
102102
{
103103
method: "POST",
@@ -139,7 +139,7 @@ export default class HTTPClientWorkflow implements IClientWorkflow {
139139

140140
try {
141141
await this.client.executeWithApiVersion(
142-
"v1.0-alpha1",
142+
"v1.0-beta1",
143143
`/workflows/${workflowComponent}/${instanceId}/raiseEvent/${eventName}`,
144144
{
145145
method: "POST",
@@ -181,11 +181,9 @@ export default class HTTPClientWorkflow implements IClientWorkflow {
181181
workflowComponent = workflowComponent ?? HTTPClientWorkflow.DEFAULT_WORKFLOW_COMPONENT;
182182

183183
try {
184-
await this.client.executeWithApiVersion(
185-
"v1.0-alpha1",
186-
`/workflows/${workflowComponent}/${instanceId}/${method}`,
187-
{ method: "POST" },
188-
);
184+
await this.client.executeWithApiVersion("v1.0-beta1", `/workflows/${workflowComponent}/${instanceId}/${method}`, {
185+
method: "POST",
186+
});
189187
} catch (e: any) {
190188
this.logger.error(`Error invoking ${method} on workflow instance: ${e.message}`);
191189
throw e;

src/proto/dapr/proto/common/v1/common_pb.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313

1414
var jspb = require('google-protobuf');
1515
var goog = jspb;
16-
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
16+
var global =
17+
(typeof globalThis !== 'undefined' && globalThis) ||
18+
(typeof window !== 'undefined' && window) ||
19+
(typeof global !== 'undefined' && global) ||
20+
(typeof self !== 'undefined' && self) ||
21+
(function () { return this; }).call(null) ||
22+
Function('return this')();
1723

1824
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
1925
goog.object.extend(proto, google_protobuf_any_pb);
@@ -1278,7 +1284,8 @@ proto.dapr.proto.common.v1.StateItem.prototype.getMetadataMap = function(opt_noL
12781284
*/
12791285
proto.dapr.proto.common.v1.StateItem.prototype.clearMetadataMap = function() {
12801286
this.getMetadataMap().clear();
1281-
return this;};
1287+
return this;
1288+
};
12821289

12831290

12841291
/**
@@ -1816,7 +1823,8 @@ proto.dapr.proto.common.v1.ConfigurationItem.prototype.getMetadataMap = function
18161823
*/
18171824
proto.dapr.proto.common.v1.ConfigurationItem.prototype.clearMetadataMap = function() {
18181825
this.getMetadataMap().clear();
1819-
return this;};
1826+
return this;
1827+
};
18201828

18211829

18221830
goog.object.extend(exports, proto.dapr.proto.common.v1);

src/proto/dapr/proto/internals/v1/apiversion_pb.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313

1414
var jspb = require('google-protobuf');
1515
var goog = jspb;
16-
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
16+
var global =
17+
(typeof globalThis !== 'undefined' && globalThis) ||
18+
(typeof window !== 'undefined' && window) ||
19+
(typeof global !== 'undefined' && global) ||
20+
(typeof self !== 'undefined' && self) ||
21+
(function () { return this; }).call(null) ||
22+
Function('return this')();
1723

1824
goog.exportSymbol('proto.dapr.proto.internals.v1.APIVersion', null, global);
1925
/**

src/proto/dapr/proto/internals/v1/service_invocation_pb.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313

1414
var jspb = require('google-protobuf');
1515
var goog = jspb;
16-
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
16+
var global =
17+
(typeof globalThis !== 'undefined' && globalThis) ||
18+
(typeof window !== 'undefined' && window) ||
19+
(typeof global !== 'undefined' && global) ||
20+
(typeof self !== 'undefined' && self) ||
21+
(function () { return this; }).call(null) ||
22+
Function('return this')();
1723

1824
var dapr_proto_common_v1_common_pb = require('../../../../dapr/proto/common/v1/common_pb.js');
1925
goog.object.extend(proto, dapr_proto_common_v1_common_pb);
@@ -501,7 +507,8 @@ proto.dapr.proto.internals.v1.InternalInvokeRequest.prototype.getMetadataMap = f
501507
*/
502508
proto.dapr.proto.internals.v1.InternalInvokeRequest.prototype.clearMetadataMap = function() {
503509
this.getMetadataMap().clear();
504-
return this;};
510+
return this;
511+
};
505512

506513

507514
/**
@@ -784,7 +791,8 @@ proto.dapr.proto.internals.v1.InternalInvokeResponse.prototype.getHeadersMap = f
784791
*/
785792
proto.dapr.proto.internals.v1.InternalInvokeResponse.prototype.clearHeadersMap = function() {
786793
this.getHeadersMap().clear();
787-
return this;};
794+
return this;
795+
};
788796

789797

790798
/**
@@ -806,7 +814,8 @@ proto.dapr.proto.internals.v1.InternalInvokeResponse.prototype.getTrailersMap =
806814
*/
807815
proto.dapr.proto.internals.v1.InternalInvokeResponse.prototype.clearTrailersMap = function() {
808816
this.getTrailersMap().clear();
809-
return this;};
817+
return this;
818+
};
810819

811820

812821
/**

src/proto/dapr/proto/internals/v1/status_pb.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313

1414
var jspb = require('google-protobuf');
1515
var goog = jspb;
16-
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
16+
var global =
17+
(typeof globalThis !== 'undefined' && globalThis) ||
18+
(typeof window !== 'undefined' && window) ||
19+
(typeof global !== 'undefined' && global) ||
20+
(typeof self !== 'undefined' && self) ||
21+
(function () { return this; }).call(null) ||
22+
Function('return this')();
1723

1824
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
1925
goog.object.extend(proto, google_protobuf_any_pb);

src/proto/dapr/proto/operator/v1/operator_pb.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313

1414
var jspb = require('google-protobuf');
1515
var goog = jspb;
16-
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
16+
var global =
17+
(typeof globalThis !== 'undefined' && globalThis) ||
18+
(typeof window !== 'undefined' && window) ||
19+
(typeof global !== 'undefined' && global) ||
20+
(typeof self !== 'undefined' && self) ||
21+
(function () { return this; }).call(null) ||
22+
Function('return this')();
1723

1824
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
1925
goog.object.extend(proto, google_protobuf_empty_pb);

src/proto/dapr/proto/placement/v1/placement.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ option go_package = "github.com/dapr/dapr/pkg/proto/placement/v1;placement";
1919

2020
// Placement service is used to report Dapr runtime host status.
2121
service Placement {
22+
// Reports Dapr actor status and retrieves actor placement table.
2223
rpc ReportDaprStatus(stream Host) returns (stream PlacementOrder) {}
2324
}
2425

@@ -45,4 +46,7 @@ message Host {
4546
int64 load = 3;
4647
repeated string entities = 4;
4748
string id = 5;
49+
string pod = 6;
50+
// Version of the Actor APIs supported by the Dapr runtime
51+
uint32 api_level = 7;
4852
}

src/proto/dapr/proto/placement/v1/placement_grpc_pb.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ function deserialize_dapr_proto_placement_v1_PlacementOrder(buffer_arg) {
4242

4343
// Placement service is used to report Dapr runtime host status.
4444
var PlacementService = exports.PlacementService = {
45-
reportDaprStatus: {
45+
// Reports Dapr actor status and retrieves actor placement table.
46+
reportDaprStatus: {
4647
path: '/dapr.proto.placement.v1.Placement/ReportDaprStatus',
4748
requestStream: true,
4849
responseStream: true,

src/proto/dapr/proto/placement/v1/placement_pb.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ export class Host extends jspb.Message {
105105
addEntities(value: string, index?: number): string;
106106
getId(): string;
107107
setId(value: string): Host;
108+
getPod(): string;
109+
setPod(value: string): Host;
110+
getApiLevel(): number;
111+
setApiLevel(value: number): Host;
108112

109113
serializeBinary(): Uint8Array;
110114
toObject(includeInstance?: boolean): Host.AsObject;
@@ -123,5 +127,7 @@ export namespace Host {
123127
load: number,
124128
entitiesList: Array<string>,
125129
id: string,
130+
pod: string,
131+
apiLevel: number,
126132
}
127133
}

0 commit comments

Comments
 (0)