Skip to content

Fail fast on unsupported multi-container configs#356

Draft
anisaoshafi wants to merge 1 commit into
mainfrom
devx-952-fail-fast-on-unsupported-multi-container-configs-0510
Draft

Fail fast on unsupported multi-container configs#356
anisaoshafi wants to merge 1 commit into
mainfrom
devx-952-fail-fast-on-unsupported-multi-container-configs-0510

Conversation

@anisaoshafi

Copy link
Copy Markdown
Collaborator

Configs with more than one enabled [[containers]] block are unsupported (e.g. AWS + Snowflake), but previously passed validation and let start proceed — only to fail later during startup on container-name conflicts or shared port collisions, sometimes after image pulls had already begun (partial startup + confusing error).

This adds a guard at the top of container.Start, before any health/auth checks or image pulls, so startup stops early with a clear message and next-step action. It replaces the previous soft warning that only covered duplicate emulator types.

The check lives on the start path rather than config.Get() on purpose: recovery/reporting commands (stop, status, logout) must still be able to enumerate multiple running emulators.

Tests: unit tests for the guard (fires before the runtime is touched) and an integration test that a two-block config makes lstk start fail fast.

Configs with more than one enabled [[containers]] block are unsupported
(e.g. AWS + Snowflake), but previously passed validation and let start
proceed, only to fail later during startup on container-name conflicts or
shared port collisions — sometimes after image pulls had begun, leaving a
partial startup and a confusing error.

Guard against this at the top of container.Start, before any health/auth
checks or image pulls, so startup stops early with a clear message. The
check lives on the start path rather than config.Get() on purpose:
recovery/reporting commands (stop, status, logout) must still enumerate
multiple running emulators. This replaces the previous soft warning that
only covered duplicate emulator types.

Generated with [Linear](https://linear.app/localstack/issue/DEVX-952/fail-fast-on-unsupported-multi-container-configs#agent-session-1dac3d90)

Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
@anisaoshafi anisaoshafi added semver: patch docs: skip Pull request does not require documentation changes labels Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes semver: patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant