Skip to content

Comments

Split monolithic pipeline into PR, Merge, and Release workflows#642

Merged
bnusunny merged 1 commit intomainfrom
split-pipeline-workflows
Feb 18, 2026
Merged

Split monolithic pipeline into PR, Merge, and Release workflows#642
bnusunny merged 1 commit intomainfrom
split-pipeline-workflows

Conversation

@bnusunny
Copy link
Contributor

Summary

Splits the single pipeline.yaml into three focused workflows:

  • pr.yaml (2 jobs): test → build validation only, no deploys
  • merge.yaml (6 jobs): test → build → beta deploy → e2e tests
  • release.yaml (12 jobs): test → build → gamma → prod → public ECR publish

Improvements

  • Replace sccache with Swatinem/rust-cache@v2 for reliable caching
  • Use prebuilt cargo-nextest binary instead of compiling from source
  • Trim unnecessary musl targets and cargo-lambda from test jobs
  • Consolidate four load-matrix jobs into one in release workflow
  • Bump Python from 3.8 (EOL) to 3.13
  • Normalize download-artifact to @v4
  • Remove unused env vars
  • Fix paths-ignore globs (docs/** instead of docs)
  • Skip beta/e2e stages in release (already validated on merge)


- name: Install cargo-nextest
run: cargo install cargo-nextest --locked
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to change from using cargo install? Downloading a link directly always looks more suspicious.

Copy link
Contributor Author

@bnusunny bnusunny Feb 18, 2026

Choose a reason for hiding this comment

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

cargo install download the source code and compile it from the source. It takes several minutes to do that. The new way download the pre-compiled binary from the original website. It takes seconds.


- name: Create and push the x86_64 docker image to beta ecr repo
run: |
tar -c -C build-x86_64/LambdaAdapterLayerX86/extensions . | docker import --platform linux/amd64 - 477159140107.dkr.ecr.ap-northeast-1.amazonaws.com/awsguru/aws-lambda-adapter:latest-x86_64
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that it was already like this before, but I'm just curious. Do you know why for the beta images we do

tar -c -C <dir> | docker import ...

but then for the prod images we do

printf 'FROM scratch\nADD <dir>' | docker build ...

Conceptually, both commands look like they do the same, but I don't know if there's a reason for them to be different (we don't need to change it, I'm just curious about the difference if there's any)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

docker import takes a tar stream and creates a flat image with no layers, no metadata, no CMD/ENTRYPOINT — just a filesystem snapshot. It's fast but the resulting image has no Dockerfile history or build cache.

docker build with FROM scratch creates a proper OCI image with a Dockerfile layer, build metadata, and supports --platform and --provenance flags. It's what we'd use when we need the image to be publishable or inspectable.

Copy link
Contributor

Choose a reason for hiding this comment

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

so the good way would be to probably use docker build from beta too? It's weird that we're doing something different for both cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Updated.

@bnusunny bnusunny requested a review from valerena February 18, 2026 22:02

- name: Create and push the x86_64 docker image to beta ecr repo
run: |
tar -c -C build-x86_64/LambdaAdapterLayerX86/extensions . | docker import --platform linux/amd64 - 477159140107.dkr.ecr.ap-northeast-1.amazonaws.com/awsguru/aws-lambda-adapter:latest-x86_64
Copy link
Contributor

Choose a reason for hiding this comment

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

so the good way would be to probably use docker build from beta too? It's weird that we're doing something different for both cases.

- PR: test + build validation only (no deploys)
- Merge: test, build, beta deploy, e2e tests
- Release: test, build, gamma, prod, public ECR publish

Additional improvements:
- Replace sccache with Swatinem/rust-cache
- Use prebuilt cargo-nextest binary
- Trim unnecessary musl targets from test jobs
- Consolidate load-matrix jobs in release workflow
- Bump Python from 3.8 to 3.13
- Normalize download-artifact to @v4
- Remove unused env vars
- Fix paths-ignore globs
- Replace docker import with docker build
@bnusunny bnusunny force-pushed the split-pipeline-workflows branch from 0f6bf1c to b1c8117 Compare February 18, 2026 23:51
@bnusunny bnusunny merged commit b2f757e into main Feb 18, 2026
6 checks passed
@bnusunny bnusunny deleted the split-pipeline-workflows branch February 18, 2026 23:56
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