Skip to content

Install lstk instead of the legacy localstack CLI (1.0.0) - #9

Merged
bartsdev merged 3 commits into
mainfrom
migrate-to-lstk
Nov 23, 2026
Merged

bartsdev merged 3 commits into
mainfrom
migrate-to-lstk

Conversation

@HarshCasper

@HarshCasper HarshCasper commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Part of DEVX-1046.

The Feature still installs the legacy Python localstack CLI and the deprecated awslocal, tflocal, cdklocal and samlocal wrappers. A user flagged the deprecated tflocal in the community Slack. This PR moves the Feature to lstk and bumps it to 1.0.0.

Changes

  • install.sh downloads the lstk release archive from GitHub, checks it against the release checksums.txt, unpacks it to /usr/local/lib/lstk and links /usr/local/bin/lstk. The whole archive is kept so the bundled extensions (lstk doctor, lstk deploy) resolve next to the binary. No Python or Node.js needed.
  • latest resolves through the releases/latest redirect instead of the GitHub API, so builds don't hit the anonymous API rate limit.
  • Installs bash, zsh and fish completions and the man pages.
  • Gives the remote user write access to the install folder through an lstk group, so lstk update works without sudo. A group survives the UID remap the Dev Container CLI applies on Linux hosts. A chown does not.
  • Works on Debian, Ubuntu and Alpine images, amd64 and arm64. Missing curl, tar, gzip or CA certificates are installed with apt-get, apk, dnf, microdnf or yum.
  • version now selects an lstk release (latest, 1.5.0, v1.4.4).
  • Removes awslocal, cdklocal, samlocal, tflocal and installUsingPython. Users switch to lstk aws, lstk terraform, lstk cdk and lstk sam. NOTES.md has the mapping and the Feature to add for each tool.
  • Keeps pulumilocal. pulumi-local is not deprecated and lstk has no Pulumi command. Only this option pulls in pipx.
  • Users pinned to localstack-cli:0 keep the legacy CLI.

CI

  • Removed continue-on-error: true from every test job. It kept CI green while the tests failed.
  • Replaced the old scenarios, which checked the legacy CLI version against 3.x releases, with: latest on bookworm, pinned version on noble, v-prefixed version on jammy, debian:trixie-slim without curl, Alpine, docker-outside-of-docker plus AWS CLI (lstk status and lstk setup aws), and pulumilocal with the Pulumi Feature.
  • Added base:alpine to the autogenerated matrix and removed the empty global scenarios job.
  • Bumped actions/checkout to v4.

Testing

Run locally with Dev Container CLI 0.91.0 on arm64 (OrbStack):

  • devcontainer features test -f localstack-cli --skip-autogenerated --skip-duplicated .: 7/7 scenarios pass.
  • devcontainer features test --skip-scenarios -f localstack-cli -i <image> .: passes on debian:latest, ubuntu:latest (26.04) and base:ubuntu. CI adds base:alpine and runs everything on amd64.

I also simulated the Linux UID remap (usermod -u) on base:bookworm and base:alpine, then ran lstk update from 1.4.5 as the remote user. It updates to 1.5.0 and the bundled extensions still resolve.

CI on amd64 is green: validate, 4 autogenerated images, 7 scenarios.

End-to-end runs of LocalStack through the Feature are in the template PR, which installs this Feature from a local checkout.

Release

After merge, run the "Release dev container features" workflow on main to publish 1.0.0 to GHCR. The template PR references localstack-cli:1, so its CI stays red until this is published.

Bump the localstack-cli Feature to 1.0.0. It now installs lstk from the
GitHub release archive, verified against checksums.txt, with completions,
man pages and the bundled extensions. No Python or Node.js needed.

Remove the awslocal, cdklocal, samlocal, tflocal and installUsingPython
options. lstk aws, terraform, cdk and sam replace the deprecated wrappers.
Keep pulumilocal, since lstk has no Pulumi command.

Rewrite the scenario tests for lstk and stop CI from ignoring test
failures (continue-on-error).
Bart and others added 2 commits November 23, 2026 13:15
…cker in CI

On Linux hosts the devcontainer CLI remaps the remote user's UID after
Features install, so chown-ing the install dir to the user left it
owned by a stale UID. Grant access through an `lstk` group instead,
which survives the remap, and test group membership and writability.

docker-in-docker fails to start dockerd on the GitHub runners; the
with_docker_and_aws_cli scenario only needs a reachable daemon, so it
now uses docker-outside-of-docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HarshCasper
HarshCasper requested review from a team and bartsdev November 23, 2026 13:15
@bartsdev
bartsdev merged commit c9ec991 into main Nov 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants