Skip to content

Fail fast on pipeline errors and add CI for both samples - #4

Merged
HarshCasper merged 4 commits into
masterfrom
ci/fail-fast-pipeline-runs
Oct 13, 2026
Merged

HarshCasper merged 4 commits into
masterfrom
ci/fail-fast-pipeline-runs

Conversation

@HarshCasper

@HarshCasper HarshCasper commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

The repo had no CI, and run.sh waited forever if a pipeline failed.

  • Both run.sh scripts:
    • fail when the execution is Failed, Stopped or Superseded, or after MAX_WAIT_SECONDS (default 1800)
    • use #!/usr/bin/env bash
    • check the result: sample 1 runs the built fzf --version, sample 2 checks the published package is my-lodash-fork
  • README:
    • with lstk, pass the GitHub token as LOCALSTACK_CODEPIPELINE_GH_TOKEN. lstk only forwards LOCALSTACK_ variables and the container strips the prefix.
    • pull the CodeBuild images before the first run (see below)
  • New workflow runs both samples in a matrix with read-only permissions. It pulls the CodeBuild images first, retrying because anonymous ECR Public pulls from shared runner IPs can hit toomanyrequests. On failure it prints the pipeline state, CodeBuild phases and LocalStack logs.

LocalStack bug found along the way: about 10 seconds after a build starts, CodeBuild checks the build container. If the image (16.7 GB) is still downloading, the check fails with ContainerStateError: Container not yet started, nothing retries it, and the build stays IN_PROGRESS forever. Pulling the images first avoids it.

Verified by CI.

https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM

Fail fast on pipeline errors and add CI for both samples

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
Dump the pipeline state, action executions, CodeBuild phases and LocalStack logs without the polling noise. Drop the free disk step, the runner has over 100 GB free.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
LocalStack checks the build container about 10 seconds after a build starts. If the image is still downloading, the check fails with 'Container not yet started', the build stays IN_PROGRESS and the pipeline never finishes.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
ECR Public answered 'toomanyrequests: Data limit exceeded' for an anonymous pull from a shared runner IP.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
@HarshCasper
HarshCasper merged commit 1baa101 into master Oct 13, 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