Repository navigation
refactor: Update WorkerAssigner & SSH tunnels for Incus-only - #63
Merged
Merged
Conversation
- Delete _resolveDockerHost() method entirely - Remove dockerHost from assignBot() and failover() return values - Remove dockerHost consumption from bot-manager.js - Remove backward-compat typeof check in _resolveIncusHost() - Update all JSDoc to reference Incus instead of Docker - Remove Docker host resolution tests, update Incus tests - All 52 WorkerAssigner tests pass, lint clean Co-Authored-By: Claude <noreply@anthropic.com>
… support - Remove SOCKET_TYPES.DOCKER and DEFAULT_DOCKER_SOCKET_PATH constants - Default socketType to INCUS (no longer configurable) - Remove getDockerHost() method - Simplify _getRemoteSocketPath() to always use Incus socket - Simplify _establishTunnel() to always set incusHost - Remove dockerHost from tunnel entries, health checks, and list results - Update server-router.js to use incusHost instead of dockerHost - Update all test mocks and assertions for Incus-only Co-Authored-By: Claude <noreply@anthropic.com>
- Remove switch/BACKEND_TYPES routing, always use Incus backend - Remove BACKEND_TYPES import from container-pool.js - Remove sandbox.type from JSDoc params (no longer used for routing) - Prefix unused botConfig param with underscore - Update comments to reflect Incus-only architecture Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WorkerAssignerto remove Docker host resolution — only Incus host is resolvedSSHTunnelManagerto default to Incus socket type, remove Docker socket supportContainerPool._getBackend()to always route to Incus backend, remove switch/BACKEND_TYPES routingTest plan
🤖 Generated with Claude Code
Greptile Overview
Greptile Summary
This PR completes the migration from Docker to Incus by removing all Docker-related code paths from the worker assignment and SSH tunnel management systems.
Key changes:
_resolveDockerHost()method anddockerHostfield fromWorkerAssignerassignment resultsSSHTunnelManagerto only support Incus socket type, removedSOCKET_TYPES.DOCKERandgetDockerHost()methodContainerPool._getBackend()to always use Incus backend, removing switch statementBotManagerto only handleincusHostfrom worker assignmentsincusHostinstead ofdockerHostin server routerTest coverage:
WorkerAssigner.test.js)Confidence Score: 5/5
Important Files Changed
dockerHosttoincusHostin tunnel health responses_resolveDockerHost()method anddockerHostfrom assignment results_getBackend()to always use Incus backend, removed switch statement routinggetDockerHost()methodSequence Diagram
sequenceDiagram participant BM as BotManager participant WA as WorkerAssigner participant STM as SSHTunnelManager participant CP as ContainerPool participant IB as IncusBackend BM->>WA: assignBot(botId, workerPreference) WA->>WA: Select worker (rules, load balancing) alt Remote Worker WA->>STM: getIncusHost(workerId) STM-->>WA: incusHost (tcp://127.0.0.1:port) else Local Worker WA-->>WA: incusHost = null end WA-->>BM: { workerId, incusHost, workerType } BM->>CP: initializeContainer(botId, config, { incusHost }) alt Remote Incus CP->>IB: new IncusBackend({ socketPath: incusHost }) IB-->>CP: Remote backend instance else Local Incus CP->>CP: Use default backend end CP->>IB: createContainer(botId, containerConfig) IB-->>CP: Container instance CP-->>BM: Container readyLast reviewed commit: 53df041