Repository navigation
feat: shared core with a cloud descriptor; AWS module moves to floci.aws - #11
Merged
Merged
Conversation
First step of the multi-cloud layout: a cloud-independent core plus one package per cloud, with AWS as the first. - floci.core: CloudDescriptor (image, port, env prefix, health/reset paths, log-level env, socket services) and FlociBaseContainer, which owns readiness (HttpWaitStrategy on the health path), Docker socket detection from the final env with a with_docker_socket() override, a dedicated network, a unique FLOCI_DOCKER_RESOURCE_NAMESPACE per container, log level, reset() and get_endpoint(). - floci.aws: FlociContainer on the core with the AWS descriptor; the service configs move to floci.aws.config. - floci, floci.container and floci.config stay as aliases, so existing imports keep working. - The Docker socket is no longer mounted unconditionally: only while an enabled, non-mocked service spawns sibling containers (the Java module's rules). The default container still gets it. - testcontainers >= 4.13.0, the first release with HttpWaitStrategy and the lowest version uv.lock already resolves. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
|
Review fixes for the shared core: - The core's fluent methods (start, with_service_config, with_docker_socket, with_dedicated_network, with_resource_namespace, with_log_level) return the caller's own type through a bound TypeVar, so FlociContainer().with_dedicated_network().with_region(...) type checks again. This works on every supported Python (3.9+). - Neptune joins the services that need the Docker socket, as in the Java module; it has no typed config yet. - Tests: the fluent chain keeps FlociContainer, and an integration test creates a queue, resets, and checks the queue is gone and the emulator still serves requests. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
…er service Neptune now needs the Docker socket and has no typed config, so the helper that turns off every container-backed service sets FLOCI_SERVICES_NEPTUNE_ENABLED=false. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
testcontainers keys exposed ports by str in some versions and by int in others; the versions CI resolves on Python 3.9 and 3.13 use int, so compare the ports as strings. Signed-off-by: Hector Ventura <hectorvent@gmail.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.
What – First step of the multi-cloud layout:
floci.coreholds the cloud descriptor andFlociBaseContainer(readiness viaHttpWaitStrategyon the health path, Docker socket decided from the final env with awith_docker_socket()override, dedicated network, a uniqueFLOCI_DOCKER_RESOURCE_NAMESPACEper container, log level,reset(),get_endpoint()). The AWS module moves tofloci.aws, its configs tofloci.aws.config.Why – One repo per language, one package per cloud, one shared core, so Azure, GCP and OCI reuse the lifecycle. Also fixes BL-001 (a real wait strategy and socket detection).
Area –
floci.core,floci.aws, aliases infloci,floci.container,floci.config;testcontainers>=4.13.0(the first release withHttpWaitStrategy;uv.lockalready resolves it).Compatibility – Non-breaking:
floci,floci.containerandfloci.configstay as aliases. Behaviour change: the Docker socket is mounted only while an enabled, non-mocked service spawns sibling containers (Java's rules); the default container still gets it.Tests – ruff, mypy; unit tests incl. new core tests; integration suite against real Floci.
Refs – BL-001