Repository navigation
fix: remove Floci's sibling containers on stop; advertise a reachable RDS endpoint - #12
Merged
Merged
Conversation
… RDS endpoint Ports the two fixes the .NET, Go and Node modules needed after moving to the core and a unique resource namespace per container. - floci.core: stop() removes, after stopping Floci, every container labelled floci_namespace=<its namespace>. Floci manages these siblings and the testcontainers reaper does not track them, so they outlived every run; with unique namespaces a leaked one with a fixed host port (the ECR registry) blocks the next run. Best effort. - floci.core: CloudDescriptor.host_settings names service settings that must hold a host the tests can reach; at start each unset one is set to the Docker host when its service is enabled (not inside a container, where the bridge address is the reachable one). AWS uses it for FLOCI_SERVICES_RDS_ENDPOINT_HOST, as the Java module does: without it Floci advertises the database's bridge address, which macOS and Windows hosts cannot reach. RdsConfig.endpoint_host overrides it. - Integration tests pin floci/floci 2.2.0, declared once in .github/docker-images.txt and read by the tests and the CI pull step. - New tests: stop() leaves no labelled sibling (the ECR registry), the RDS endpoint is the Docker host and accepts connections, and the endpoint host is emitted only when set and skipped when RDS is off. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
|
- host_settings moves after default_env, so a descriptor built with default_env as its ninth positional argument keeps it there; a test covers the positional fields. - The reset integration test runs on the pinned image like every other integration test. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
RdsConfig without endpoint_host drops a host an earlier RdsConfig set, so the Docker-host default applies again instead of a stale host; the unit test covers the replacement. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
RdsConfig records the host it writes; a later RdsConfig without a host drops the variable only when it still holds that host, so the Docker-host default applies again while a host set with with_env stays. Matches the Node module; the unit test covers both cases. 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 – Two fixes the shared core needs now that each container gets its own resource namespace, already shipped in the .NET module:
stop()(and leaving awithblock) removes every sibling container Floci spawned for the container, found by thefloci_namespacelabel all four Floci emulators set. Floci manages these siblings and the testcontainers reaper does not track them, so they outlived every run; with unique namespaces, a leaked one with a fixed host port (the ECR registry on 5100) blocks the next run. Best effort: teardown never fails over leftovers.start()sets each unset one to the Docker host while its service is enabled. AWS uses it forFLOCI_SERVICES_RDS_ENDPOINT_HOST, as the Java module does; without it Floci advertises the database's bridge address, which macOS and Windows hosts cannot reach.RdsConfig.endpoint_hostoverrides it.The integration tests now pin
floci/floci:2.2.0, declared once in.github/docker-images.txtand read by the tests and the CI pull step.Why – Leaked siblings broke the next test run, and RDS was unreachable from macOS and Windows.
Tests – New integration tests: stopping leaves no labelled sibling (the ECR registry, started by
CreateRepository), and the RDS endpoint is the Docker host and accepts connections (it fails without the fix). Full suite green on Floci 2.2.0.Refs – none