Skip to content

[Enhancement]: Update to LocalStack 2.x #6792

@laszlovandenhoek

Description

@laszlovandenhoek

Module

LocalStack

Proposal

The current version of LocalStack is 1.4. The next release will be 2.0, due next week:

localstack/localstack#7882

This release contains changes that will break Testcontainers integration at some point in the future. In particular, the HOSTNAME_EXTERNAL environment variable that Testcontainers uses will be deprecated, to be replaced by LOCALSTACK_HOST.

In 2.0, the old HOSTNAME_EXTERNAL variable will continue working, so this will likely not start causing issues right away. But once this backwards-compatibility support is removed, the localstack/localstack:latest Docker tag (effectively their nightly build) will immediately be updated.

Therefore, people using Testcontainers with LocalStack using the localstack:latest will have their tests start failing at some point in the future. Even though using that tag is a bad idea, this likely applies to a non-trivial number of people, because the current default version is the ancient 0.11.2, and many fixes have been added to LocalStack since. That in itself is a good reason to update.

The solution might be as simple as updating this constant (and checking all places that reference it):

private static final String HOSTNAME_EXTERNAL_ENV_VAR = "HOSTNAME_EXTERNAL";

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions