Skip to content

Drop a cached Docker client when the node endpoint changes - #308

Merged
athNdev merged 6 commits into
mainfrom
feat/node-daemon-identity
Nov 4, 2026
Merged

athNdev merged 6 commits into
mainfrom
feat/node-daemon-identity

Conversation

@athNdev

@athNdev athNdev commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • A cached Docker client is dropped when that node's host or TLS material no longer matches the node row, and the next lookup builds a client for the current endpoint.
  • Clients registered without a recorded endpoint, including test doubles, stay in place. The shared default client is not closed when a node id that pointed at it is dropped.
  • This does not yet record a daemon id or put a node generation on operation rows.

Test plan

  • go test ./internal/docker/ -count=1 -p 1 -run "TestClientPool_|TestGetClientStrictDropsAClientWhenTheEndpointChanges"
  • go run ./cmd/knowledge-lint -root .
  • CI on the pull request

athNdev and others added 5 commits October 28, 2026 21:18
…nges, so later calls are not sent to the previous daemon.

Co-authored-by: Cursor <[email protected]>
…later host change is not treated as the same daemon.

Co-authored-by: Cursor <[email protected]>
…r ping that presents a different daemon.

Co-authored-by: Cursor <[email protected]>
… the historical fallback flag is set.

Co-authored-by: Cursor <[email protected]>
* Replace a node's event watcher when its endpoint generation changes, and keep an unresolved node visible as stale.

Co-authored-by: Cursor <[email protected]>

* Prove a dropped or reordered Docker event does not leave status, the proxy route, or log subscriptions stuck.

Co-authored-by: Cursor <[email protected]>

* Refresh event watchers from each node's endpoint generation so a replaced daemon is not watched on the old client.

Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Cursor <[email protected]>
@athNdev
athNdev merged commit c9c452f into main Nov 4, 2026
11 checks passed
@athNdev
athNdev deleted the feat/node-daemon-identity branch November 4, 2026 00:30
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