Fail fast on unsupported multi-container configs#356
Draft
anisaoshafi wants to merge 1 commit into
Draft
Conversation
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>
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.
Configs with more than one enabled
[[containers]]block are unsupported (e.g. AWS + Snowflake), but previously passed validation and letstartproceed — 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 startfail fast.