Skip to content

Use stable image by default#169

Closed
anisaoshafi wants to merge 1 commit intomainfrom
stable-by-default
Closed

Use stable image by default#169
anisaoshafi wants to merge 1 commit intomainfrom
stable-by-default

Conversation

@anisaoshafi
Copy link
Copy Markdown
Contributor

@anisaoshafi anisaoshafi commented Mar 25, 2026

From now on, we set "stable" tag on config.toml by default.
Validation for "stable" tag license is similar to "latest" tag.

Current default tag latest was causing UX issues, because it was frequently pulling the newest dev version from latest, so using stable will improve that situation.

Limitation: We're not changing "latest" with "stable" for customers that have lstk already, even if they update. The users can change it manually.

Towards DRG-663

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

📝 Walkthrough

Walkthrough

This PR introduces support for a new "stable" Docker image tag as the default for the AWS emulator, replacing "latest". Changes include updating default configurations, container naming logic, version resolution handling, and integration tests to treat "stable" as a pinned/resolved tag rather than a floating reference.

Changes

Cohort / File(s) Summary
Configuration & Documentation
README.md, internal/config/config.go, internal/config/default_config.toml
Updated default Docker image tag for aws emulator from "latest" to "stable" in config examples and defaults. Also fixed whitespace normalization in UpdatePrompt struct tag in config.go.
Container Naming
internal/config/containers.go
Modified Name() method to treat Tag == "stable" the same as empty or "latest", omitting the tag suffix from the generated container name.
License Validation & Version Resolution
internal/container/start.go
Updated tryPrePullLicenseValidation to treat "stable" as a pinned tag (like any non-"latest" tag), validating license immediately instead of resolving via the catalog API.
Integration Tests
test/integration/version_resolution_test.go
Added assertions to verify that "stable" tag is resolved (not used unresolved) in license requests across multiple test cases.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • carole-lavillonniere
  • silv-io
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Use stable image by default' directly and concisely summarizes the main change across all modified files.
Description check ✅ Passed The pull request description accurately describes the changeset, explaining the shift from 'latest' to 'stable' tag as default and the rationale behind it.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stable-by-default

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
Copy Markdown

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/config/containers.go (1)

100-107: ⚠️ Potential issue | 🟡 Minor

Potential orphaned container issue for users who previously configured tag="stable".

If any users had manually set tag="stable" before this change, their existing containers would be named localstack-aws-stable. After this update, Name() returns localstack-aws for tag="stable", causing:

  • stop command to miss the running container (see internal/container/stop.go:20-30)
  • IsRunning checks to not find the container (see internal/container/running.go:11-17)
  • Removal to target wrong container name (see internal/container/start.go:239-241)

Consider documenting this edge case or adding a migration note for users to manually clean up any localstack-aws-stable containers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/config/containers.go` around lines 100 - 107, Existing containers
named with tag="stable" (e.g., localstack-<type>-stable) will be orphaned
because ContainerConfig.Name() now omits "stable"; update the container
lookup/stop/is-running/remove logic to fall back to the legacy name when a
container is not found: after attempting the new name from
ContainerConfig.Name(), also check "localstack-<type>-stable" (and treat it as
the same instance) in the routines that stop containers, check IsRunning, and
remove/start cleanup (the code areas that call ContainerConfig.Name() for
lookup); alternatively add a brief migration note in docs telling users to
manually remove any localstack-<type>-stable containers if you prefer not to
change runtime lookup behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@internal/config/containers.go`:
- Around line 100-107: Existing containers named with tag="stable" (e.g.,
localstack-<type>-stable) will be orphaned because ContainerConfig.Name() now
omits "stable"; update the container lookup/stop/is-running/remove logic to fall
back to the legacy name when a container is not found: after attempting the new
name from ContainerConfig.Name(), also check "localstack-<type>-stable" (and
treat it as the same instance) in the routines that stop containers, check
IsRunning, and remove/start cleanup (the code areas that call
ContainerConfig.Name() for lookup); alternatively add a brief migration note in
docs telling users to manually remove any localstack-<type>-stable containers if
you prefer not to change runtime lookup behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 458c888a-3bb7-4e9e-bc2e-653b73a9b255

📥 Commits

Reviewing files that changed from the base of the PR and between fbc5854 and b941c93.

📒 Files selected for processing (6)
  • README.md
  • internal/config/config.go
  • internal/config/containers.go
  • internal/config/default_config.toml
  • internal/container/start.go
  • test/integration/version_resolution_test.go

Copy link
Copy Markdown
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

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

LGTM!

@carole-lavillonniere
Copy link
Copy Markdown
Collaborator

Can we please convert to draft and not merge this until we made a call about the semantic of the latest tag?

@anisaoshafi anisaoshafi marked this pull request as draft March 25, 2026 16:48
@anisaoshafi
Copy link
Copy Markdown
Contributor Author

Closing for now, will reopen if necessary

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.

3 participants