Skip to content

fix: add missing fields to protobuf agent conversions#4568

Merged
amir20 merged 3 commits intomasterfrom
fix/protobuf-dispatcher-missing-fields
Mar 26, 2026
Merged

fix: add missing fields to protobuf agent conversions#4568
amir20 merged 3 commits intomasterfrom
fix/protobuf-dispatcher-missing-fields

Conversation

@amir20
Copy link
Copy Markdown
Owner

@amir20 amir20 commented Mar 26, 2026

Summary

  • APIKey, Prefix, and ExpiresAt missing from NotificationDispatcher protobuf message — dispatchers with API key auth, prefixes, or expiration silently broken on agent nodes
  • ActorAttributes missing from ContainerEvent protobuf message — container renames and event-based notification attributes (including exit codes) lost on agent nodes
  • NetworkRxTotal and NetworkTxTotal missing from ContainerStat in ToProto()/FromProto() — network metrics lost when syncing container data via agents

Same class of bug as #4563 — fields present in Go structs but omitted during protobuf conversion.

Test plan

  • All existing Go and frontend tests pass
  • Deploy in swarm mode, verify network stats appear for containers on agent nodes
  • Create a dispatcher with API key/prefix/expiration, verify config reaches agent nodes
  • Verify container rename events propagate from agent nodes
  • Verify event-based alerts with exit code detection work on agent nodes

🤖 Generated with Claude Code

APIKey, Prefix, and ExpiresAt were missing from the NotificationDispatcher
protobuf message, causing these fields to be silently dropped when
broadcasting notification config to agent nodes. Same class of bug as #4563.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

Looks good. Fix is correct — APIKey, Prefix, and ExpiresAt in DispatcherConfig now properly round-trip through protobuf.

  • client.go/server.go: symmetric conversion, nil-check on ExpiresAt is correct
  • types.proto: field numbers 7-9, no conflicts
  • Generated types.pb.go matches proto definition

No issues found.

amir20 and others added 2 commits March 26, 2026 15:19
ActorAttributes was missing from the ContainerEvent proto message,
causing container renames and event-based notification attributes
(including exit codes) to be silently dropped on agent nodes.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
NetworkRxTotal and NetworkTxTotal were omitted in both ToProto() and
FromProto() for container stats, causing network metrics to be lost
when syncing container data via agents.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@amir20 amir20 changed the title fix: add missing dispatcher fields to protobuf agent conversion fix: add missing fields to protobuf agent conversions Mar 26, 2026
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

Confirmed correct fix. The networkRxTotal/networkTxTotal fields were already defined in the proto (fields 5-6 of ContainerStat) but never populated during conversion — silent data loss on agent nodes.

All three fixes are symmetric between client.go and server.go, and the nil-guard on ExpiresAt handles the optional timestamp correctly. No issues.

@amir20 amir20 merged commit 4cf3952 into master Mar 26, 2026
13 checks passed
@amir20 amir20 deleted the fix/protobuf-dispatcher-missing-fields branch March 26, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant