chore(clients): roll out feed-level snapshot_status to all five clients
Task 1 added AlarmSnapshotStatus and AlarmFeedMessage.snapshot_status = 5. Carry it downstream from the canonical Contracts protos: - Rust vendored protos under clients/rust/protos, refreshed byte-identical (build.rs falls back to them for out-of-repo tarball builds) - 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) .NET needs no regeneration: the client compiles against the Contracts Generated/ output committed with the proto change. The hand-written CLI feed renderers switch on the payload oneof, so codegen alone does not carry the arm. Add snapshot-status to the .NET, Go, Rust, and Java renderers; the .NET and Go renderers were also missing provider-status, which has been on the wire since the provider-mode work, so add it there too. Java's renderer is an exhaustive switch expression and did not compile until the new case landed. The Python CLI renders generic protobuf-JSON and needs no change. Each client README gains a paragraph on the feed-level frame next to its existing from_truncated_snapshot paragraph: it arrives at stream open after provider_status and before the cached active_alarm frames, then on every verdict change including the clearing frame a monitor restart emits, so a live consumer can track set completeness without polling QueryActiveAlarms. GatewayDashboardDesign: list the two new payload cases the AlarmsHub forwards, and — separately — record the GroupToRole / GroupToTag / UntaggedSessionVisibility rows the settings page already renders but the bullet list omitted.
This commit is contained in:
@@ -1097,7 +1097,8 @@ func runStreamAlarms(ctx context.Context, args []string, stdout, stderr io.Write
|
||||
|
||||
// formatAlarmFeedMessage renders one AlarmFeedMessage in the CLI's plain-text
|
||||
// output style, distinguishing the active-alarm snapshot, snapshot-complete
|
||||
// sentinel, and transition cases of the message's payload oneof.
|
||||
// sentinel, transition, provider-status, and snapshot-status cases of the
|
||||
// message's payload oneof.
|
||||
func formatAlarmFeedMessage(message *mxgateway.AlarmFeedMessage) string {
|
||||
switch {
|
||||
case message.GetActiveAlarm() != nil:
|
||||
@@ -1108,6 +1109,11 @@ func formatAlarmFeedMessage(message *mxgateway.AlarmFeedMessage) string {
|
||||
case message.GetTransition() != nil:
|
||||
transition := message.GetTransition()
|
||||
return fmt.Sprintf("transition %s kind=%s severity=%d", transition.GetAlarmFullReference(), transition.GetTransitionKind(), transition.GetSeverity())
|
||||
case message.GetProviderStatus() != nil:
|
||||
status := message.GetProviderStatus()
|
||||
return fmt.Sprintf("provider-status mode=%s degraded=%t reason=%q", status.GetMode(), status.GetDegraded(), status.GetReason())
|
||||
case message.GetSnapshotStatus() != nil:
|
||||
return fmt.Sprintf("snapshot-status truncated=%t", message.GetSnapshotStatus().GetTruncated())
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user