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

fix LocalStack legacy mode detection for "latest" tag variations #8774

Conversation

alexrashed
Copy link
Contributor

Motivation

While looking into #7390 and digging into the legacy mode check for LocalStack I stumbled upon an issue when using specific latest images, like:

  • localstack/localstack:s3-latest (a minimal image which basically only contains S3)
  • localstack/localstack-pro:latest-bigdata (a LocalStack Pro image which contains disk-space heavy packages which would otherwise be downloaded on demand)

If this is the case, the default fallback currently is to jump back to useLegacyMode=true which is not compatible with up-to-date images.
In the long run, I would propose to change the default fallback (as mentioned in #7390 (comment)), but this PR aims at fixing the issue for these specific tags for now.

Changes

  • Extends the "latest check" such that multiple variations of the "latest" tags are possible (see above).
  • Adds a unit test which tests various version strings with the shouldRunInLegacyMode action (and makes the function package private to allow directly testing it).

@alexrashed alexrashed requested a review from a team as a code owner June 12, 2024 13:53
@eddumelendez eddumelendez added this to the next milestone Jun 25, 2024
@eddumelendez eddumelendez merged commit 1305fee into testcontainers:main Jun 25, 2024
98 checks passed
@eddumelendez
Copy link
Member

Thanks for your contribution, @alexrashed !

@alexrashed alexrashed deleted the fix-localstack-legacy-mode-detection branch June 26, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants