Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
laszlovandenhoek opened this issue Mar 21, 2023 · 3 comments · Fixed by #6808
Closed

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

laszlovandenhoek opened this issue Mar 21, 2023 · 3 comments · Fixed by #6808

Comments

@laszlovandenhoek
Copy link

laszlovandenhoek commented Mar 21, 2023

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";

@cstmgl
Copy link

cstmgl commented Mar 22, 2023

maybe this is the wrong place to point this out but would it be possible to make the configuration of the duration of the localstack startup configurable? I get a lot of problems when running it with the default timeout of 1 minute (maybe an issue in my infrastructure but I still would like to be able to configure it)

$ docker ps
CONTAINER ID        IMAGE                                                       COMMAND                  CREATED             STATUS                             PORTS                                                NAMES
0fc422fc2ead        localstack/localstack:1.1                                   "docker-entrypoint.sh"   33 seconds ago      Up 33 seconds (health: starting)   4510-4559/tcp, 5678/tcp, 0.0.0.0:51660->4566/tcp     blissful_hellman
Caused by: org.testcontainers.containers.ContainerLaunchException: Timed out waiting for log output matching '.*Ready\.

it does not matter if I use version 1.1, 1.2, 1.3 or 1.4 all of them give me consistent timeouts during start-up around 50% of the time

@laszlovandenhoek
Copy link
Author

maybe this is the wrong place to point this out

@cstmgl I think so. This sounds like an unrelated feature request, so you should open a new issue.

@eddumelendez
Copy link
Member

@laszlovandenhoek Thanks for sharing! I just started working on this and contacted the LocalStack team because found an issue. So, this will be take into account for next release.

eddumelendez added a commit that referenced this issue Mar 30, 2023
`HOSTNAME_EXTERNAL` env var is deprecated and will be replaced by
`LOCALSTACK_HOST` in the upcoming v2.

Fixes #6792
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants