Skip to content

fix: remove Floci's sibling containers on stop; advertise a reachable RDS endpoint - #12

Merged
hectorvent merged 4 commits into
mainfrom
fix/aws-follow-ups
Oct 10, 2026
Merged

hectorvent merged 4 commits into
mainfrom
fix/aws-follow-ups

Conversation

@hectorvent

Copy link
Copy Markdown
Member

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 a with block) removes every sibling container Floci spawned for the container, found by the floci_namespace label 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.
  • The core gains host settings: service settings that must name a host the tests can reach. start() sets each unset one to the Docker host while its service is enabled. 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.

The integration tests now pin floci/floci:2.2.0, declared once in .github/docker-images.txt and 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

… 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>
@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge.

Summary

The PR removes Floci-created sibling containers during teardown, sets reachable RDS endpoint hosts, and pins integration tests to Floci 2.2.0.

  • Stopping Floci also removes its namespace-labelled sibling containers.
  • AWS RDS endpoints use a host that clients can reach.
  • Integration tests use one pinned Floci image version.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["start()"] --> B["Keep explicit host settings"]
  B --> C["Fill missing enabled-service hosts when using the Docker host"]
  C --> D["Start Floci"]
  D --> E["Floci creates labelled sibling containers"]
  E --> F["stop() stops Floci"]
  F --> G["Remove siblings with the matching namespace label"]
Loading

Reviews (3) · Last reviewed commit: "fix: keep a deliberately set RDS endpoin..." · Reviewed by Greptile

Comment thread floci/core/descriptor.py Resolved
Comment thread .github/workflows/ci.yml Resolved
- 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>
@hectorvent
hectorvent merged commit cef0249 into main Oct 10, 2026
9 checks passed
@hectorvent
hectorvent deleted the fix/aws-follow-ups branch October 10, 2026 21:42
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