Skip to content

Export the state in the shutdown hook with Python instead of curl - #4

Merged
HarshCasper merged 1 commit into
mainfrom
fix/shutdown-hook-without-curl
Oct 19, 2026
Merged

HarshCasper merged 1 commit into
mainfrom
fix/shutdown-hook-without-curl

Conversation

@HarshCasper

Copy link
Copy Markdown
Member

The docker compose job fails on main since LocalStack 2026.10.0 (run) at "Stop LocalStack and check the shutdown hook exported the state":

ls: cannot access 'volume/my-pod.zip': No such file or directory

on-shutdown-hooks/save-pod.sh runs inside the LocalStack container and called curl, which the LocalStack image no longer ships, so the hook exported nothing. It now downloads /_localstack/pods/state with the image's Python (no proxy, same as the image's own healthcheck). The curl calls in test.sh and the workflow run on the runner and are unchanged.

Tested locally with localstack/localstack-pro:latest (2026.10.0), following the docker compose job: docker compose up -d, ./test.sh passes, docker compose down writes volume/my-pod.zip (with the Secrets Manager state), and lstk load into a fresh LocalStack returns the secret.

The hook runs inside the LocalStack container, and the LocalStack image no
longer ships curl since 2026.10.0, so no pod was exported on shutdown and
CI failed at `ls -l volume/my-pod.zip`. Use the image's Python instead.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
@HarshCasper
HarshCasper merged commit 5468dac into main Oct 19, 2026
2 checks passed
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