Skip to content

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

Merged
eddumelendez merged 3 commits intotestcontainers:mainfrom
alexrashed:fix-localstack-legacy-mode-detection
Jun 25, 2024
Merged

fix LocalStack legacy mode detection for "latest" tag variations#8774
eddumelendez merged 3 commits intotestcontainers:mainfrom
alexrashed:fix-localstack-legacy-mode-detection

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 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
@eddumelendez
Copy link
Member

Thanks for your contribution, @alexrashed !

@alexrashed alexrashed deleted the fix-localstack-legacy-mode-detection branch June 26, 2024 06:53
lizhou1111 pushed a commit to lizhou1111/testcontainers-java that referenced this pull request Jul 13, 2024
…tcontainers#8774)

Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
fokion pushed a commit to fokion/testcontainers-java that referenced this pull request Jan 18, 2025
…tcontainers#8774)

Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
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.

2 participants