Skip to content

CI: run LocalStack via lstk instead of the localstack PyPI package - #25

Open
silv-io wants to merge 2 commits into
mainfrom
cosy-856-decouple-localstack-pypi-package-from-localstack-sdk-release
Open

CI: run LocalStack via lstk instead of the localstack PyPI package#25
silv-io wants to merge 2 commits into
mainfrom
cosy-856-decouple-localstack-pypi-package-from-localstack-sdk-release

Conversation

@silv-io

@silv-io silv-io commented Aug 26, 2026

Copy link
Copy Markdown
Member

Motivation

The release workflow installs localstack==${RELEASE_VERSION} from PyPI just to start LocalStack for the SDK tests. This couples the SDK release to the localstack package release (published separately via localstack-cli-standalone, with no retry on PyPI propagation lag) and stands in the way of the planned deprecation of that package. The pinned Docker image is the actual dependency; the pip package is only the launcher.

Changes

  • release.yml: install lstk via npm instead of pip install localstack==$VERSION; pin the emulator image through an lstk config file in $RUNNER_TEMP (outside the workspace, so the "Check Uncommitted Changes" gate stays clean). lstk start --timeout 2m replaces start -d + wait — it blocks until the emulator is healthy and dumps startup logs itself on failure. logs/stop pass the same --config, since the derived container name embeds the pinned tag.
  • test.yml: same swap, no config file needed — lstk defaults to localstack/localstack-pro:latest.
  • DEBUG/DISABLE_EVENTS become LOCALSTACK_DEBUG/LOCALSTACK_DISABLE_EVENTS (lstk forwards LOCALSTACK_* host env vars into the container).

The Docker image pull remains the only release-time dependency on LocalStack itself.

Testing

Verified locally with lstk built from latest main: the exact pinned-style config plus lstk --config … start --timeout 2m / logs / stop all pass, with DEBUG output visible in the logs (env forwarding works). The test.yml path runs on this PR; the release.yml path is first exercised on the next release.

Review

Workflow-only change. Worth a skim of the release.yml diff since that path only runs during an actual release. Notes for reviewers: port is required in an lstk [[containers]] block (omitting it fails validation), and a tag the license server can't parse degrades to in-container license validation instead of failing the start.

Closes COSY-856

🤖 Generated with Claude Code

silv-io and others added 2 commits August 26, 2026 16:27
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…job env)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@silv-io
silv-io requested a review from a team August 26, 2026 14:47
# The config pins the emulator image to the release version. It lives outside
# the workspace so the "Check Uncommitted Changes" step stays clean.
run: |
cat > "${RUNNER_TEMP}/lstk-config.toml" <<EOF

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

out of curiosity is it possible at all to change the chosen image without using the config ?

@aidehn aidehn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Tests are passing so looks good! Thanks for picking this up - it means once we move away from the localstack CLI in our release there's less for us to do!

- name: Install lstk
run: |
pip install --pre --upgrade localstack
npm install -g @localstack/lstk

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hopefully at some point lstk releases a github action? 👀

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.

2 participants