Skip to content

APP-8055 add optional field to verify last known update for updating robot parts and fragments #670

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 2 commits into from
Apr 15, 2025
Merged
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
4,601 changes: 2,316 additions & 2,285 deletions app/v1/app.pb.go

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions gen/js/app/v1/app_pb.d.ts
Original file line number Diff line number Diff line change
@@ -2429,6 +2429,11 @@ export class UpdateRobotPartRequest extends jspb.Message {
getRobotConfig(): google_protobuf_struct_pb.Struct | undefined;
setRobotConfig(value?: google_protobuf_struct_pb.Struct): void;

hasLastKnownUpdate(): boolean;
clearLastKnownUpdate(): void;
getLastKnownUpdate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setLastKnownUpdate(value?: google_protobuf_timestamp_pb.Timestamp): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UpdateRobotPartRequest.AsObject;
static toObject(includeInstance: boolean, msg: UpdateRobotPartRequest): UpdateRobotPartRequest.AsObject;
@@ -2444,6 +2449,7 @@ export namespace UpdateRobotPartRequest {
id: string,
name: string,
robotConfig?: google_protobuf_struct_pb.Struct.AsObject,
lastKnownUpdate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
}
}

@@ -3191,6 +3197,11 @@ export class UpdateFragmentRequest extends jspb.Message {
getVisibility(): FragmentVisibilityMap[keyof FragmentVisibilityMap];
setVisibility(value: FragmentVisibilityMap[keyof FragmentVisibilityMap]): void;

hasLastKnownUpdate(): boolean;
clearLastKnownUpdate(): void;
getLastKnownUpdate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setLastKnownUpdate(value?: google_protobuf_timestamp_pb.Timestamp): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UpdateFragmentRequest.AsObject;
static toObject(includeInstance: boolean, msg: UpdateFragmentRequest): UpdateFragmentRequest.AsObject;
@@ -3208,6 +3219,7 @@ export namespace UpdateFragmentRequest {
config?: google_protobuf_struct_pb.Struct.AsObject,
pb_public: boolean,
visibility: FragmentVisibilityMap[keyof FragmentVisibilityMap],
lastKnownUpdate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
}
}

106 changes: 104 additions & 2 deletions gen/js/app/v1/app_pb.js
Original file line number Diff line number Diff line change
@@ -22454,7 +22454,8 @@ proto.viam.app.v1.UpdateRobotPartRequest.toObject = function(includeInstance, ms
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
robotConfig: (f = msg.getRobotConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
robotConfig: (f = msg.getRobotConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
lastKnownUpdate: (f = msg.getLastKnownUpdate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
};

if (includeInstance) {
@@ -22504,6 +22505,11 @@ proto.viam.app.v1.UpdateRobotPartRequest.deserializeBinaryFromReader = function(
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setRobotConfig(value);
break;
case 4:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastKnownUpdate(value);
break;
default:
reader.skipField();
break;
@@ -22555,6 +22561,14 @@ proto.viam.app.v1.UpdateRobotPartRequest.serializeBinaryToWriter = function(mess
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = message.getLastKnownUpdate();
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};


@@ -22631,6 +22645,43 @@ proto.viam.app.v1.UpdateRobotPartRequest.prototype.hasRobotConfig = function() {
};


/**
* optional google.protobuf.Timestamp last_known_update = 4;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.viam.app.v1.UpdateRobotPartRequest.prototype.getLastKnownUpdate = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
};


/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.viam.app.v1.UpdateRobotPartRequest} returns this
*/
proto.viam.app.v1.UpdateRobotPartRequest.prototype.setLastKnownUpdate = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};


/**
* Clears the message field making it undefined.
* @return {!proto.viam.app.v1.UpdateRobotPartRequest} returns this
*/
proto.viam.app.v1.UpdateRobotPartRequest.prototype.clearLastKnownUpdate = function() {
return this.setLastKnownUpdate(undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.viam.app.v1.UpdateRobotPartRequest.prototype.hasLastKnownUpdate = function() {
return jspb.Message.getField(this, 4) != null;
};





@@ -27775,7 +27826,8 @@ proto.viam.app.v1.UpdateFragmentRequest.toObject = function(includeInstance, msg
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
config: (f = msg.getConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
pb_public: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
visibility: jspb.Message.getFieldWithDefault(msg, 5, 0)
visibility: jspb.Message.getFieldWithDefault(msg, 5, 0),
lastKnownUpdate: (f = msg.getLastKnownUpdate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
};

if (includeInstance) {
@@ -27833,6 +27885,11 @@ proto.viam.app.v1.UpdateFragmentRequest.deserializeBinaryFromReader = function(m
var value = /** @type {!proto.viam.app.v1.FragmentVisibility} */ (reader.readEnum());
msg.setVisibility(value);
break;
case 6:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastKnownUpdate(value);
break;
default:
reader.skipField();
break;
@@ -27898,6 +27955,14 @@ proto.viam.app.v1.UpdateFragmentRequest.serializeBinaryToWriter = function(messa
f
);
}
f = message.getLastKnownUpdate();
if (f != null) {
writer.writeMessage(
6,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};


@@ -28046,6 +28111,43 @@ proto.viam.app.v1.UpdateFragmentRequest.prototype.hasVisibility = function() {
};


/**
* optional google.protobuf.Timestamp last_known_update = 6;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.viam.app.v1.UpdateFragmentRequest.prototype.getLastKnownUpdate = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
};


/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.viam.app.v1.UpdateFragmentRequest} returns this
*/
proto.viam.app.v1.UpdateFragmentRequest.prototype.setLastKnownUpdate = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};


/**
* Clears the message field making it undefined.
* @return {!proto.viam.app.v1.UpdateFragmentRequest} returns this
*/
proto.viam.app.v1.UpdateFragmentRequest.prototype.clearLastKnownUpdate = function() {
return this.setLastKnownUpdate(undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.viam.app.v1.UpdateFragmentRequest.prototype.hasLastKnownUpdate = function() {
return jspb.Message.getField(this, 6) != null;
};





25 changes: 25 additions & 0 deletions gen/js/google/rpc/error_details_pb.d.ts
Original file line number Diff line number Diff line change
@@ -107,6 +107,25 @@ export namespace QuotaFailure {
getDescription(): string;
setDescription(value: string): void;

getApiService(): string;
setApiService(value: string): void;

getQuotaMetric(): string;
setQuotaMetric(value: string): void;

getQuotaId(): string;
setQuotaId(value: string): void;

getQuotaDimensionsMap(): jspb.Map<string, string>;
clearQuotaDimensionsMap(): void;
getQuotaValue(): number;
setQuotaValue(value: number): void;

hasFutureQuotaValue(): boolean;
clearFutureQuotaValue(): void;
getFutureQuotaValue(): number;
setFutureQuotaValue(value: number): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Violation.AsObject;
static toObject(includeInstance: boolean, msg: Violation): Violation.AsObject;
@@ -121,6 +140,12 @@ export namespace QuotaFailure {
export type AsObject = {
subject: string,
description: string,
apiService: string,
quotaMetric: string,
quotaId: string,
quotaDimensionsMap: Array<[string, string]>,
quotaValue: number,
futureQuotaValue: number,
}
}
}
203 changes: 202 additions & 1 deletion gen/js/google/rpc/error_details_pb.js
Original file line number Diff line number Diff line change
@@ -1010,7 +1010,13 @@ proto.google.rpc.QuotaFailure.Violation.prototype.toObject = function(opt_includ
proto.google.rpc.QuotaFailure.Violation.toObject = function(includeInstance, msg) {
var f, obj = {
subject: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, "")
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
apiService: jspb.Message.getFieldWithDefault(msg, 3, ""),
quotaMetric: jspb.Message.getFieldWithDefault(msg, 4, ""),
quotaId: jspb.Message.getFieldWithDefault(msg, 5, ""),
quotaDimensionsMap: (f = msg.getQuotaDimensionsMap()) ? f.toObject(includeInstance, undefined) : [],
quotaValue: jspb.Message.getFieldWithDefault(msg, 7, 0),
futureQuotaValue: jspb.Message.getFieldWithDefault(msg, 8, 0)
};

if (includeInstance) {
@@ -1055,6 +1061,32 @@ proto.google.rpc.QuotaFailure.Violation.deserializeBinaryFromReader = function(m
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setApiService(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setQuotaMetric(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setQuotaId(value);
break;
case 6:
var value = msg.getQuotaDimensionsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
case 7:
var value = /** @type {number} */ (reader.readInt64());
msg.setQuotaValue(value);
break;
case 8:
var value = /** @type {number} */ (reader.readInt64());
msg.setFutureQuotaValue(value);
break;
default:
reader.skipField();
break;
@@ -1098,6 +1130,45 @@ proto.google.rpc.QuotaFailure.Violation.serializeBinaryToWriter = function(messa
f
);
}
f = message.getApiService();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getQuotaMetric();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getQuotaId();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getQuotaDimensionsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
f = message.getQuotaValue();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
f = /** @type {number} */ (jspb.Message.getField(message, 8));
if (f != null) {
writer.writeInt64(
8,
f
);
}
};


@@ -1137,6 +1208,136 @@ proto.google.rpc.QuotaFailure.Violation.prototype.setDescription = function(valu
};


/**
* optional string api_service = 3;
* @return {string}
*/
proto.google.rpc.QuotaFailure.Violation.prototype.getApiService = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
* @param {string} value
* @return {!proto.google.rpc.QuotaFailure.Violation} returns this
*/
proto.google.rpc.QuotaFailure.Violation.prototype.setApiService = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};


/**
* optional string quota_metric = 4;
* @return {string}
*/
proto.google.rpc.QuotaFailure.Violation.prototype.getQuotaMetric = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
* @param {string} value
* @return {!proto.google.rpc.QuotaFailure.Violation} returns this
*/
proto.google.rpc.QuotaFailure.Violation.prototype.setQuotaMetric = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};


/**
* optional string quota_id = 5;
* @return {string}
*/
proto.google.rpc.QuotaFailure.Violation.prototype.getQuotaId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
* @param {string} value
* @return {!proto.google.rpc.QuotaFailure.Violation} returns this
*/
proto.google.rpc.QuotaFailure.Violation.prototype.setQuotaId = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};


/**
* map<string, string> quota_dimensions = 6;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,string>}
*/
proto.google.rpc.QuotaFailure.Violation.prototype.getQuotaDimensionsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,string>} */ (
jspb.Message.getMapField(this, 6, opt_noLazyCreate,
null));
};


/**
* Clears values from the map. The map will be non-null.
* @return {!proto.google.rpc.QuotaFailure.Violation} returns this
*/
proto.google.rpc.QuotaFailure.Violation.prototype.clearQuotaDimensionsMap = function() {
this.getQuotaDimensionsMap().clear();
return this;};


/**
* optional int64 quota_value = 7;
* @return {number}
*/
proto.google.rpc.QuotaFailure.Violation.prototype.getQuotaValue = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};


/**
* @param {number} value
* @return {!proto.google.rpc.QuotaFailure.Violation} returns this
*/
proto.google.rpc.QuotaFailure.Violation.prototype.setQuotaValue = function(value) {
return jspb.Message.setProto3IntField(this, 7, value);
};


/**
* optional int64 future_quota_value = 8;
* @return {number}
*/
proto.google.rpc.QuotaFailure.Violation.prototype.getFutureQuotaValue = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};


/**
* @param {number} value
* @return {!proto.google.rpc.QuotaFailure.Violation} returns this
*/
proto.google.rpc.QuotaFailure.Violation.prototype.setFutureQuotaValue = function(value) {
return jspb.Message.setField(this, 8, value);
};


/**
* Clears the field making it undefined.
* @return {!proto.google.rpc.QuotaFailure.Violation} returns this
*/
proto.google.rpc.QuotaFailure.Violation.prototype.clearFutureQuotaValue = function() {
return jspb.Message.setField(this, 8, undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.rpc.QuotaFailure.Violation.prototype.hasFutureQuotaValue = function() {
return jspb.Message.getField(this, 8) != null;
};


/**
* repeated Violation violations = 1;
* @return {!Array<!proto.google.rpc.QuotaFailure.Violation>}
2 changes: 2 additions & 0 deletions proto/viam/app/v1/app.proto
Original file line number Diff line number Diff line change
@@ -835,6 +835,7 @@ message UpdateRobotPartRequest {
string id = 1;
string name = 2;
google.protobuf.Struct robot_config = 3;
optional google.protobuf.Timestamp last_known_update = 4;
}

message UpdateRobotPartResponse {
@@ -1004,6 +1005,7 @@ message UpdateFragmentRequest {
google.protobuf.Struct config = 3;
optional bool public = 4;
optional FragmentVisibility visibility = 5;
optional google.protobuf.Timestamp last_known_update = 6;
}

message UpdateFragmentResponse {