Skip to content

fix(localstack): accept community-archive as a valid tag#3601

Open
johnduhart wants to merge 1 commit intotestcontainers:mainfrom
johnduhart:fix/localstack-community-archive-tag
Open

fix(localstack): accept community-archive as a valid tag#3601
johnduhart wants to merge 1 commit intotestcontainers:mainfrom
johnduhart:fix/localstack-community-archive-tag

Conversation

@johnduhart
Copy link

@johnduhart johnduhart commented Mar 23, 2026

Summary

  • Add community-archive to the recentVersionTags list so it is recognized as a modern (non-legacy) LocalStack tag
  • Move the recentVersionTags check before the hyphen-suffix stripping in isMinimumVersion, so tags containing hyphens (like community-archive) are matched correctly
  • Add test cases for community-archive and community-archive-amd64 in both version check tests

See also: #3592

Test plan

  • TestIsLegacyVersion passes with community-archive and community-archive-amd64
  • TestIsMinimumVersion2 passes with community-archive and community-archive-amd64
  • All existing version tag tests continue to pass

🤖 Generated with Claude Code

@johnduhart johnduhart requested a review from a team as a code owner March 23, 2026 18:59
@netlify
Copy link

netlify bot commented Mar 23, 2026

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit c3c5448
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-go/deploys/69c19039a7e14800081c7e44
😎 Deploy Preview https://deploy-preview-3601--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 208e29ff-8b9a-4787-904a-eeaff641fbc8

📥 Commits

Reviewing files that changed from the base of the PR and between cd95678 and c3c5448.

📒 Files selected for processing (2)
  • modules/localstack/localstack.go
  • modules/localstack/localstack_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • modules/localstack/localstack_test.go
  • modules/localstack/localstack.go

Summary by CodeRabbit

  • New Features

    • Added recognition for the LocalStack "community-archive" version tag, including variants with architecture suffixes (e.g., "-amd64").
  • Tests

    • Expanded test coverage to validate recognition and version checks for the new tag and its suffixed variants.

Walkthrough

Adds community-archive as a recognized recent LocalStack version tag and adjusts isMinimumVersion to short-circuit on exact tag matches (both raw and after stripping trailing -... suffix). Tests updated to cover both community-archive and community-archive-amd64.

Changes

Cohort / File(s) Summary
Version tag support & logic update
modules/localstack/localstack.go, modules/localstack/localstack_test.go
Inserted "community-archive" into recentVersionTags. isMinimumVersion now immediately returns true when the extracted tag exactly matches an entry in recentVersionTags; after removing a trailing -... suffix it performs a second membership check and returns true if matched. Added tests for community-archive and community-archive-amd64 covering legacy/minimum checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A tag that hops with nimble stride,
"community-archive" joins the ride.
Checks now stop when matches show,
Tests hop in to make it so.
A little code-bunny's joyful pride! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: accepting 'community-archive' as a valid LocalStack tag.
Description check ✅ Passed The description is well-related to the changeset, providing clear context about the problem, solution approach, and test coverage for the community-archive tag changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@modules/localstack/localstack.go`:
- Around line 37-43: The initial contains check using recentVersionTags only
tests the raw version string and can miss matches after you normalize by
stripping suffixes; in the function manipulating the local variable version,
after the suffix-strip block (the strings.LastIndexByte branch) re-run the
membership test against recentVersionTags (the same check as if
slices.Contains(recentVersionTags, version) { return true }) so normalized tags
like "community-archive-amd64" -> "community-archive" or "latest-amd64" ->
"latest" are recognized and return true.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 86c79808-cbac-4e68-a2d7-e2e90cc31b4f

📥 Commits

Reviewing files that changed from the base of the PR and between ea9748b and cd95678.

📒 Files selected for processing (2)
  • modules/localstack/localstack.go
  • modules/localstack/localstack_test.go

Check the tag against recentVersionTags before stripping hyphen
suffixes, so that tags containing hyphens like community-archive
are correctly recognized as up-to-date versions.

Fixes testcontainers#3592

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@johnduhart johnduhart force-pushed the fix/localstack-community-archive-tag branch from cd95678 to c3c5448 Compare March 23, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant