Migrate CLI usage to lstk and fix CDK deployment - #38
Draft
peter-smith-phd wants to merge 2 commits into
Draft
Conversation
- Replace localstack/awslocal/cdklocal invocations with lstk across the Makefile, README, deploy scripts, and GitHub Actions workflows. - Fix bin/deploy_cdk.sh to activate the project .venv and invoke $CDK_CMD directly (needed since CDK_CMD="lstk cdk" can't go through `npm run`). - Drop the BucketDeployment construct from FrontendStack: its singleton Lambda shells out to a real, unpatched AWS CLI binary, and LocalStack's Lambda executor unconditionally blanks AWS_CA_BUNDLE for every function, which that binary rejects. Sync the frontend build and invalidate CloudFront directly via `lstk aws` from deploy_cdk.sh instead. - Add an early pytest plugin (pytest.ini + tests/_version_guard.py) that fails fast with a clear message on Python < 3.11, since localstack-sdk-python's pytest plugin crashes on import otherwise. - Document the dummy AWS credentials tests/test_infra.py and test_outage.py need, and note where lstk has no equivalent yet (ephemeral instances, extensions install). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
⚡️ Running CI build with LocalStack ... |
- cdk.yml: `lstk cdk --version` ran before `lstk start`, but it needs the emulator running even just to report its version — move it after. - cdk.yml, e2e.yml, integration-test.yml: `lstk aws` prints "Note: No AWS profile found, run 'lstk setup aws'" to stdout when no profile exists, which corrupts every $(lstk aws ...) command substitution in bin/deploy.sh/bin/deploy_cdk.sh (confirmed via a fresh-HOME repro and fix, matching the exact CI failure). Add an `lstk setup aws --non-interactive --force` step before deploying. - preview.yml, ephemeral.yml: disable their automatic triggers. `lstk aws` always targets its own locally-managed emulator and unconditionally ignores AWS_ENDPOINT_URL, so bin/deploy.sh (which now uses `lstk aws` throughout) can't reach the remote ephemeral instance these workflows provision. Left as manual-only (workflow_dispatch) until that's resolved, rather than reworking bin/deploy.sh's AWS client selection. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
localstack/awslocal/cdklocalinvocations withlstkacross the Makefile, README, deploy scripts, and GitHub Actions workflows.Testing
README.md