Skip to content

registrar: snapshot-first removal in UnregisterEndpoint builds REMOVED events without a Protocol, so Snapshot.Apply keys them under PROTOCOL_UNSPECIFIED and (suspected) removes nothing until the next sync #1206

Closed

Description

@bpalermo

Suspected while implementing #1193 (PR #1204), NOT yet tested. The UnregisterEndpoint RPC's snapshot-first path builds ENDPOINT_REMOVED events without setting Protocol; Snapshot.Apply keys removals by (service, protocol, ip), so the key lands under PROTOCOL_UNSPECIFIED and matches no entry — the endpoint stays until the next sync's diff removes it. The agent's removeLocked likely has the same no-op for the same event. To do: a test that unregisters an HTTP endpoint through the RPC and asserts it is gone from the snapshot and from a watching agent's cache BEFORE the next sync; if it fails, stamp the protocol(s) on the REMOVED events (one per protocol the endpoint was registered under).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions