chore(clients): regenerate for alarm truncation fields; READMEs note the degraded flag
Task 8 added ActiveAlarmSnapshot.from_truncated_snapshot = 16 and QueryActiveAlarmsReplyPayload.snapshot_truncated = 2. Regenerate every downstream binding from the canonical Contracts protos: - client descriptor set (protoc 34.1 pin) - Go (protoc-gen-go v1.36.11 / protoc-gen-go-grpc 1.6.2) - Python (grpcio-tools 1.80.0 pin) - Java (gradle generateProto) - Rust vendored protos under clients/rust/protos, which build.rs falls back to for out-of-repo tarball builds and which must track Contracts .NET needed no regeneration - the client compiles against the Contracts Generated/ output already committed with the proto change. No client has a typed wrapper model around ActiveAlarmSnapshot; all five pass the generated type straight through, so codegen alone carries the field. Each client README's alarm section gains a paragraph on the flag: the snapshot set may omit actives and absence-implies-cleared inference was suspended, so callers must not reconcile deletions from a truncated set. Distinguished from the per-record 'degraded' subtag-fallback flag, which it is easily confused with.
This commit is contained in:
@@ -6103,10 +6103,17 @@ func (x *AcknowledgeAlarmReplyPayload) GetNativeStatus() int32 {
|
||||
// an ActiveAlarmSnapshot proto for the gateway-side ConditionRefresh
|
||||
// stream.
|
||||
type QueryActiveAlarmsReplyPayload struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Snapshots []*ActiveAlarmSnapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Snapshots []*ActiveAlarmSnapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
|
||||
// True when the provider fetch backing this reply came back holding the
|
||||
// per-fetch cap (MxGateway:Alarms:MaxAlarmsPerFetch). The reply may then omit
|
||||
// active alarms, and the worker suspends its absence-implies-Clear inference
|
||||
// for that poll — so a reference missing from `snapshots` is not evidence the
|
||||
// alarm cleared. Carried on the payload as well as per-record because a
|
||||
// truncated fetch that filters down to zero records still has to say so.
|
||||
SnapshotTruncated bool `protobuf:"varint,2,opt,name=snapshot_truncated,json=snapshotTruncated,proto3" json:"snapshot_truncated,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *QueryActiveAlarmsReplyPayload) Reset() {
|
||||
@@ -6146,6 +6153,13 @@ func (x *QueryActiveAlarmsReplyPayload) GetSnapshots() []*ActiveAlarmSnapshot {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *QueryActiveAlarmsReplyPayload) GetSnapshotTruncated() bool {
|
||||
if x != nil {
|
||||
return x.SnapshotTruncated
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type MxEvent struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Family MxEventFamily `protobuf:"varint,1,opt,name=family,proto3,enum=mxaccess_gateway.v1.MxEventFamily" json:"family,omitempty"`
|
||||
@@ -6958,8 +6972,18 @@ type ActiveAlarmSnapshot struct {
|
||||
// OnAlarmTransitionEvent.source_provider; always ALARMMGR or SUBTAG on the
|
||||
// wire (never UNSPECIFIED).
|
||||
SourceProvider AlarmProviderMode `protobuf:"varint,15,opt,name=source_provider,json=sourceProvider,proto3,enum=mxaccess_gateway.v1.AlarmProviderMode" json:"source_provider,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
// True when the provider fetch that produced this snapshot hit the per-fetch
|
||||
// cap: the snapshot set may omit active alarms, and the worker suspended its
|
||||
// absence-implies-Clear inference for that poll. Says nothing about THIS
|
||||
// record's fidelity — the record is as accurate as any other; it flags that
|
||||
// the set it belongs to is possibly incomplete. QueryActiveAlarms returns a
|
||||
// bare `stream ActiveAlarmSnapshot` with no envelope message, so a per-record
|
||||
// boolean is the only additive way to carry set-level degraded status on that
|
||||
// RPC. Distinct from `degraded`, which is about the subtag fallback provider.
|
||||
// Additive (proto3): clients that ignore it deserialize the stream unchanged.
|
||||
FromTruncatedSnapshot bool `protobuf:"varint,16,opt,name=from_truncated_snapshot,json=fromTruncatedSnapshot,proto3" json:"from_truncated_snapshot,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ActiveAlarmSnapshot) Reset() {
|
||||
@@ -7097,6 +7121,13 @@ func (x *ActiveAlarmSnapshot) GetSourceProvider() AlarmProviderMode {
|
||||
return AlarmProviderMode_ALARM_PROVIDER_MODE_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *ActiveAlarmSnapshot) GetFromTruncatedSnapshot() bool {
|
||||
if x != nil {
|
||||
return x.FromTruncatedSnapshot
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type AcknowledgeAlarmRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ClientCorrelationId string `protobuf:"bytes,2,opt,name=client_correlation_id,json=clientCorrelationId,proto3" json:"client_correlation_id,omitempty"`
|
||||
@@ -8979,9 +9010,10 @@ const file_mxaccess_gateway_proto_rawDesc = "" +
|
||||
"\x10DrainEventsReply\x124\n" +
|
||||
"\x06events\x18\x01 \x03(\v2\x1c.mxaccess_gateway.v1.MxEventR\x06events\"C\n" +
|
||||
"\x1cAcknowledgeAlarmReplyPayload\x12#\n" +
|
||||
"\rnative_status\x18\x01 \x01(\x05R\fnativeStatus\"g\n" +
|
||||
"\rnative_status\x18\x01 \x01(\x05R\fnativeStatus\"\x96\x01\n" +
|
||||
"\x1dQueryActiveAlarmsReplyPayload\x12F\n" +
|
||||
"\tsnapshots\x18\x01 \x03(\v2(.mxaccess_gateway.v1.ActiveAlarmSnapshotR\tsnapshots\"\xb7\n" +
|
||||
"\tsnapshots\x18\x01 \x03(\v2(.mxaccess_gateway.v1.ActiveAlarmSnapshotR\tsnapshots\x12-\n" +
|
||||
"\x12snapshot_truncated\x18\x02 \x01(\bR\x11snapshotTruncated\"\xb7\n" +
|
||||
"\n" +
|
||||
"\aMxEvent\x12:\n" +
|
||||
"\x06family\x18\x01 \x01(\x0e2\".mxaccess_gateway.v1.MxEventFamilyR\x06family\x12\x1d\n" +
|
||||
@@ -9046,7 +9078,7 @@ const file_mxaccess_gateway_proto_rawDesc = "" +
|
||||
"\x04mode\x18\x01 \x01(\x0e2&.mxaccess_gateway.v1.AlarmProviderModeR\x04mode\x12\x16\n" +
|
||||
"\x06reason\x18\x02 \x01(\tR\x06reason\x12\x18\n" +
|
||||
"\ahresult\x18\x03 \x01(\x05R\ahresult\x12*\n" +
|
||||
"\x02at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\"\xbd\x06\n" +
|
||||
"\x02at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\"\xf5\x06\n" +
|
||||
"\x13ActiveAlarmSnapshot\x120\n" +
|
||||
"\x14alarm_full_reference\x18\x01 \x01(\tR\x12alarmFullReference\x126\n" +
|
||||
"\x17source_object_reference\x18\x02 \x01(\tR\x15sourceObjectReference\x12&\n" +
|
||||
@@ -9064,7 +9096,8 @@ const file_mxaccess_gateway_proto_rawDesc = "" +
|
||||
"\vlimit_value\x18\r \x01(\v2\x1c.mxaccess_gateway.v1.MxValueR\n" +
|
||||
"limitValue\x12\x1a\n" +
|
||||
"\bdegraded\x18\x0e \x01(\bR\bdegraded\x12O\n" +
|
||||
"\x0fsource_provider\x18\x0f \x01(\x0e2&.mxaccess_gateway.v1.AlarmProviderModeR\x0esourceProvider\"\xd0\x01\n" +
|
||||
"\x0fsource_provider\x18\x0f \x01(\x0e2&.mxaccess_gateway.v1.AlarmProviderModeR\x0esourceProvider\x126\n" +
|
||||
"\x17from_truncated_snapshot\x18\x10 \x01(\bR\x15fromTruncatedSnapshot\"\xd0\x01\n" +
|
||||
"\x17AcknowledgeAlarmRequest\x122\n" +
|
||||
"\x15client_correlation_id\x18\x02 \x01(\tR\x13clientCorrelationId\x120\n" +
|
||||
"\x14alarm_full_reference\x18\x03 \x01(\tR\x12alarmFullReference\x12\x18\n" +
|
||||
|
||||
Reference in New Issue
Block a user