mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
* fix(memorydb,neptune,docdb): degrade gracefully with no Docker daemon
Applies the daemonless degradation pattern (EcrRegistryManager/RdsContainerManager's
tryStart + isDockerReachable seam) to MemoryDB, Neptune and DocumentDB: control-plane
CreateCluster now reaches AWS's documented 'available' steady state with no backing
container when the Docker daemon is unreachable, instead of leaking a raw
SocketException as a 500. Metadata operations (describe, tag, delete) keep working;
only the data-plane connection to the cache/graph/document database stays unavailable
until a daemon appears.
Changed:
- MemoryDbContainerManager, NeptuneContainerManager, DocDbContainerManager: add
tryStart()/isDockerReachable(), mirroring RdsContainerManager. start() is untouched
for other callers.
- MemoryDbService.startBackend, NeptuneService.createDbCluster,
DocDbService.createDbCluster: use tryStart() and proceed with metadata-only state
(no proxy/container fields, no auth proxy started) when it returns null.
Already done before this change (grepped for tryEnsureStarted|tryStart across
services/ first): ElastiCache (ElastiCacheContainerManager/ElastiCacheMemcachedContainerManager
+ both services) already has this seam — the issue's mention of "elasticache" needing
the fix is stale. EC2 (Ec2ContainerManager) already has an equivalent seam under a
different name (isDockerAvailable()/markContainerlessRunning()); launch, stop, start,
terminate and reboot all already null-check the container id or probe the daemon
before touching Docker, so no EC2 changes were needed.
Left out: dedicated unit tests for EC2's existing daemonless paths (isDockerAvailable,
markContainerlessRunning) — they were already implemented and behaviorally covered by
existing integration tests, and adding manager-level unit tests for the async
executor-based EC2 launch flow is a separable effort from this rollout.
Tests: added tryStart/isDockerReachable unit tests to
{MemoryDb,Neptune,DocDb}ContainerManagerTest (new file for DocDb) covering
daemon-unreachable, genuine-failure and success paths, plus a
createWithoutDockerDaemonStillReachesAvailable service-level test per service
proving control-plane CRUD succeeds and no proxy/container is touched. Existing
tests that stubbed containerManager.start(...) were updated to stub tryStart(...)
to match the new call site.
Refs lex00/floci#44
* test(memorydb,neptune,docdb): log the tolerated teardown IOException
The three new tryStart-reachable tests caught the acceptor socket's
IOException during teardown with only a comment, no log statement,
identically in all three files. Add a debug-level log line per CLAUDE.md's
catch-block rule.