Skip to content
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

chore(proto): update protos and point Workflow to beta APIs #531

Merged
merged 2 commits into from
Oct 13, 2023
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
2 changes: 1 addition & 1 deletion scripts/fetch-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ OS=$(echo `uname`|tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
ORG_NAME="dapr"
REPO_NAME="dapr"
BRANCH_NAME="v1.11.0"
BRANCH_NAME="v1.12.0"

# Path to store output
PATH_ROOT=$(pwd)
Expand Down
14 changes: 6 additions & 8 deletions src/implementation/Client/HTTPClient/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class HTTPClientWorkflow implements IClientWorkflow {

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

try {
await this.client.executeWithApiVersion(
"v1.0-alpha1",
"v1.0-beta1",
`/workflows/${workflowComponent}/${workflowName}/start?${queryParams}`,
{
method: "POST",
Expand Down Expand Up @@ -139,7 +139,7 @@ export default class HTTPClientWorkflow implements IClientWorkflow {

try {
await this.client.executeWithApiVersion(
"v1.0-alpha1",
"v1.0-beta1",
`/workflows/${workflowComponent}/${instanceId}/raiseEvent/${eventName}`,
{
method: "POST",
Expand Down Expand Up @@ -181,11 +181,9 @@ export default class HTTPClientWorkflow implements IClientWorkflow {
workflowComponent = workflowComponent ?? HTTPClientWorkflow.DEFAULT_WORKFLOW_COMPONENT;

try {
await this.client.executeWithApiVersion(
"v1.0-alpha1",
`/workflows/${workflowComponent}/${instanceId}/${method}`,
{ method: "POST" },
);
await this.client.executeWithApiVersion("v1.0-beta1", `/workflows/${workflowComponent}/${instanceId}/${method}`, {
method: "POST",
});
} catch (e: any) {
this.logger.error(`Error invoking ${method} on workflow instance: ${e.message}`);
throw e;
Expand Down
14 changes: 11 additions & 3 deletions src/proto/dapr/proto/common/v1/common_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
Expand Down Expand Up @@ -1278,7 +1284,8 @@ proto.dapr.proto.common.v1.StateItem.prototype.getMetadataMap = function(opt_noL
*/
proto.dapr.proto.common.v1.StateItem.prototype.clearMetadataMap = function() {
this.getMetadataMap().clear();
return this;};
return this;
};


/**
Expand Down Expand Up @@ -1816,7 +1823,8 @@ proto.dapr.proto.common.v1.ConfigurationItem.prototype.getMetadataMap = function
*/
proto.dapr.proto.common.v1.ConfigurationItem.prototype.clearMetadataMap = function() {
this.getMetadataMap().clear();
return this;};
return this;
};


goog.object.extend(exports, proto.dapr.proto.common.v1);
8 changes: 7 additions & 1 deletion src/proto/dapr/proto/internals/v1/apiversion_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

goog.exportSymbol('proto.dapr.proto.internals.v1.APIVersion', null, global);
/**
Expand Down
17 changes: 13 additions & 4 deletions src/proto/dapr/proto/internals/v1/service_invocation_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

var dapr_proto_common_v1_common_pb = require('../../../../dapr/proto/common/v1/common_pb.js');
goog.object.extend(proto, dapr_proto_common_v1_common_pb);
Expand Down Expand Up @@ -501,7 +507,8 @@ proto.dapr.proto.internals.v1.InternalInvokeRequest.prototype.getMetadataMap = f
*/
proto.dapr.proto.internals.v1.InternalInvokeRequest.prototype.clearMetadataMap = function() {
this.getMetadataMap().clear();
return this;};
return this;
};


/**
Expand Down Expand Up @@ -784,7 +791,8 @@ proto.dapr.proto.internals.v1.InternalInvokeResponse.prototype.getHeadersMap = f
*/
proto.dapr.proto.internals.v1.InternalInvokeResponse.prototype.clearHeadersMap = function() {
this.getHeadersMap().clear();
return this;};
return this;
};


/**
Expand All @@ -806,7 +814,8 @@ proto.dapr.proto.internals.v1.InternalInvokeResponse.prototype.getTrailersMap =
*/
proto.dapr.proto.internals.v1.InternalInvokeResponse.prototype.clearTrailersMap = function() {
this.getTrailersMap().clear();
return this;};
return this;
};


/**
Expand Down
8 changes: 7 additions & 1 deletion src/proto/dapr/proto/internals/v1/status_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
Expand Down
8 changes: 7 additions & 1 deletion src/proto/dapr/proto/operator/v1/operator_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
goog.object.extend(proto, google_protobuf_empty_pb);
Expand Down
4 changes: 4 additions & 0 deletions src/proto/dapr/proto/placement/v1/placement.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ option go_package = "github.com/dapr/dapr/pkg/proto/placement/v1;placement";

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

Expand All @@ -45,4 +46,7 @@ message Host {
int64 load = 3;
repeated string entities = 4;
string id = 5;
string pod = 6;
// Version of the Actor APIs supported by the Dapr runtime
uint32 api_level = 7;
}
3 changes: 2 additions & 1 deletion src/proto/dapr/proto/placement/v1/placement_grpc_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ function deserialize_dapr_proto_placement_v1_PlacementOrder(buffer_arg) {

// Placement service is used to report Dapr runtime host status.
var PlacementService = exports.PlacementService = {
reportDaprStatus: {
// Reports Dapr actor status and retrieves actor placement table.
reportDaprStatus: {
path: '/dapr.proto.placement.v1.Placement/ReportDaprStatus',
requestStream: true,
responseStream: true,
Expand Down
6 changes: 6 additions & 0 deletions src/proto/dapr/proto/placement/v1/placement_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ export class Host extends jspb.Message {
addEntities(value: string, index?: number): string;
getId(): string;
setId(value: string): Host;
getPod(): string;
setPod(value: string): Host;
getApiLevel(): number;
setApiLevel(value: number): Host;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Host.AsObject;
Expand All @@ -123,5 +127,7 @@ export namespace Host {
load: number,
entitiesList: Array<string>,
id: string,
pod: string,
apiLevel: number,
}
}
79 changes: 74 additions & 5 deletions src/proto/dapr/proto/placement/v1/placement_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

goog.exportSymbol('proto.dapr.proto.placement.v1.Host', null, global);
goog.exportSymbol('proto.dapr.proto.placement.v1.PlacementOrder', null, global);
Expand Down Expand Up @@ -426,7 +432,8 @@ proto.dapr.proto.placement.v1.PlacementTables.prototype.getEntriesMap = function
*/
proto.dapr.proto.placement.v1.PlacementTables.prototype.clearEntriesMap = function() {
this.getEntriesMap().clear();
return this;};
return this;
};


/**
Expand Down Expand Up @@ -621,7 +628,8 @@ proto.dapr.proto.placement.v1.PlacementTable.prototype.getHostsMap = function(op
*/
proto.dapr.proto.placement.v1.PlacementTable.prototype.clearHostsMap = function() {
this.getHostsMap().clear();
return this;};
return this;
};


/**
Expand Down Expand Up @@ -680,7 +688,8 @@ proto.dapr.proto.placement.v1.PlacementTable.prototype.getLoadMapMap = function(
*/
proto.dapr.proto.placement.v1.PlacementTable.prototype.clearLoadMapMap = function() {
this.getLoadMapMap().clear();
return this;};
return this;
};


/**
Expand Down Expand Up @@ -744,7 +753,9 @@ proto.dapr.proto.placement.v1.Host.toObject = function(includeInstance, msg) {
port: jspb.Message.getFieldWithDefault(msg, 2, 0),
load: jspb.Message.getFieldWithDefault(msg, 3, 0),
entitiesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
id: jspb.Message.getFieldWithDefault(msg, 5, "")
id: jspb.Message.getFieldWithDefault(msg, 5, ""),
pod: jspb.Message.getFieldWithDefault(msg, 6, ""),
apiLevel: jspb.Message.getFieldWithDefault(msg, 7, 0)
};

if (includeInstance) {
Expand Down Expand Up @@ -801,6 +812,14 @@ proto.dapr.proto.placement.v1.Host.deserializeBinaryFromReader = function(msg, r
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setPod(value);
break;
case 7:
var value = /** @type {number} */ (reader.readUint32());
msg.setApiLevel(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -865,6 +884,20 @@ proto.dapr.proto.placement.v1.Host.serializeBinaryToWriter = function(message, w
f
);
}
f = message.getPod();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getApiLevel();
if (f !== 0) {
writer.writeUint32(
7,
f
);
}
};


Expand Down Expand Up @@ -977,4 +1010,40 @@ proto.dapr.proto.placement.v1.Host.prototype.setId = function(value) {
};


/**
* optional string pod = 6;
* @return {string}
*/
proto.dapr.proto.placement.v1.Host.prototype.getPod = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
* @param {string} value
* @return {!proto.dapr.proto.placement.v1.Host} returns this
*/
proto.dapr.proto.placement.v1.Host.prototype.setPod = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};


/**
* optional uint32 api_level = 7;
* @return {number}
*/
proto.dapr.proto.placement.v1.Host.prototype.getApiLevel = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};


/**
* @param {number} value
* @return {!proto.dapr.proto.placement.v1.Host} returns this
*/
proto.dapr.proto.placement.v1.Host.prototype.setApiLevel = function(value) {
return jspb.Message.setProto3IntField(this, 7, value);
};


goog.object.extend(exports, proto.dapr.proto.placement.v1);
Loading