Skip to content

chore(deps): pin cargo-lambda 1.9.2 and zig in pyproject.toml - #9198

Merged
roger-zhangg merged 1 commit into
developfrom
bump-cargo-lambda-1.9.2
Aug 24, 2026
Merged

roger-zhangg merged 1 commit into
developfrom
bump-cargo-lambda-1.9.2

Conversation

@roger-zhangg

@roger-zhangg roger-zhangg commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

Which issue(s) does this change fix?

N/A

Why is this change necessary?

Rust 1.98.0 (2026-08-18) adds the -Wl,--fix-cortex-a53-843419 linker argument for AArch64 Linux targets. Zig 0.16 rejects it, so every arm64 Rust build fails:

error: unsupported linker arg: --fix-cortex-a53-843419

install-rust.sh tracks the moving stable channel, so CI upgraded the runner image's 1.97.1 to 1.98.0 in place and broke build-arm64, tier1-finch and tier1-windows-build-2 on both nightly runs since (2026-08-21). x86 is unaffected β€” the flag is an ARM erratum workaround. The surfaced assertion is misleading ('template.yaml' not found in []) because the build produces nothing.

How does it address the issue?

cargo-zigbuild 0.23.0 filters the argument before invoking zig, and cargo-lambda v1.9.2 picks it up (cargo-lambda#937). v1.9.1 is not sufficient β€” it still embeds cargo-zigbuild 0.20.1, which predates the fix.

The pins move into a rust-tests extra in pyproject.toml rather than a version string per workflow. Dependabot's pip ecosystem already edits that file and already bumps packages inside extras (ruff lives in pre-dev), so these stay current instead of drifting β€” 0.17.1 was 20 releases behind by the time Rust broke it. This also pins ziglang, previously unpinned and able to cause the same class of failure on any zig release.

What side effects does this change have?

install-rust.sh reads the pins from the extra instead of taking a version argument, so it installs exactly what it did before β€” no project install, no dependency-resolution change β€” and CARGO_LAMBDA_VERSION disappears from both workflows. A separate extra (not dev) keeps the large cargo-lambda wheel out of non-Rust jobs.

The Windows branch installs zig from chocolatey rather than the wheel, so the choco version is derived from the same declaration, and the wheel fallback is gated on the reported zig version rather than mere presence β€” otherwise a zig already resolvable on PATH could win over the pin. Without this the pin would have governed Linux only, leaving Windows with a floating zig β€” the very failure mode being fixed.

Reproducible requirements are unaffected: uv pip compile pyproject.toml passes no --extra, which is why pytest is absent from them today.

The appveyor-*.yml files pin this version separately but are deprecated, so they are left alone; each already defines and consumes its own variable.

It leaves the Rust channel itself unpinned. A rust-toolchain.toml plus a rust_toolchain Dependabot entry is the matching follow-up.

Testing

Verified locally against rustc 1.98.0 and zig 0.16.0 β€” same host and fixtures, only cargo-lambda differing:

cargo-lambda x86 arm64
0.17.1 (previous pin) OK FAIL (unsupported linker arg)
1.9.1 OK FAIL (embeds cargo-zigbuild 0.20.1)
1.9.2 OK OK

Dispatched this branch on CI (run 32763066938): build-arm64 and tier1-windows-build-2 both passed. The Windows log shows the extra resolving as intended β€” + cargo-lambda==1.9.2, + ziglang==0.16.0 β€” and choco installing the pinned zig v0.16.0.

Ran the rewritten install step end to end under bash against a clean interpreter: it resolves cargo-lambda==1.9.2 ziglang==0.16.0 from the extra, installs both, and the resulting toolchain builds the arm64 fixture. All four invocations aws_lambda_builders emits succeed β€” plain, --arm64, and the provided.al2 glibc-pinned aarch64/x86_64 targets β€” as do the cargo_workspace and multi-binaries fixtures (2 binaries each).

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@roger-zhangg
roger-zhangg requested a review from a team as a code owner August 24, 2026 18:13
@roger-zhangg
roger-zhangg force-pushed the bump-cargo-lambda-1.9.2 branch from 6364a25 to d53fa5b Compare August 24, 2026 18:16
@roger-zhangg roger-zhangg changed the title chore(deps): bump cargo-lambda from 0.17.1 to 1.9.2 chore(deps): bump cargo-lambda from 0.17.1 to 1.9.2 in test Aug 24, 2026
@roger-zhangg
roger-zhangg force-pushed the bump-cargo-lambda-1.9.2 branch 3 times, most recently from 8388044 to 094a57a Compare August 24, 2026 18:31
@roger-zhangg roger-zhangg changed the title chore(deps): bump cargo-lambda from 0.17.1 to 1.9.2 in test chore(deps): pin cargo-lambda 1.9.2 and ziglang in pyproject.toml Aug 24, 2026
@roger-zhangg

Copy link
Copy Markdown
Member Author

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review Results

Reviewed: 880ac91..094a57a
Files: 4
Comments: 2

Comment thread tests/install-rust.sh Resolved
Comment thread pyproject.toml Resolved
@roger-zhangg
roger-zhangg force-pushed the bump-cargo-lambda-1.9.2 branch from 094a57a to 16fdae4 Compare August 24, 2026 18:58
@roger-zhangg roger-zhangg changed the title chore(deps): pin cargo-lambda 1.9.2 and ziglang in pyproject.toml chore(deps): pin cargo-lambda 1.9.2 and zig in pyproject.toml Aug 24, 2026

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review Results

Reviewed: 880ac91..16fdae4
Files: 4
Comments: 3

Comment thread tests/install-rust.sh Resolved
Comment thread tests/install-rust.sh Resolved
Comment thread pyproject.toml Resolved
Rust 1.98.0 (released 2026-08-18) adds the -Wl,--fix-cortex-a53-843419 linker argument for
AArch64 Linux targets. Zig 0.16 rejects it, so every arm64 Rust build fails:

  error: unsupported linker arg: --fix-cortex-a53-843419

install-rust.sh tracks the moving `stable` channel, so CI upgraded the runner image's 1.97.1
to 1.98.0 in place and broke build-arm64, tier1-finch and tier1-windows-build-2 on both
nightly runs (2026-08-21 and since). x86 is unaffected -- the flag is an ARM erratum
workaround.

cargo-zigbuild 0.23.0 filters the argument before invoking zig, and cargo-lambda v1.9.2
picks it up (cargo-lambda/cargo-lambda#937). 1.9.1 was not enough: it still embeds
cargo-zigbuild 0.20.1, which predates the fix, so it fails identically.

Rather than bump the version string in each workflow, the pins move to a rust-tests extra in
pyproject.toml. Dependabot's pip ecosystem already edits that file and already bumps packages
inside extras (ruff lives in pre-dev), so these stay current instead of drifting -- 0.17.1 was
20 releases behind by the time Rust broke it. That also pins zig, previously unpinned and able
to cause the same class of failure on any release. A separate extra keeps the large
cargo-lambda wheel out of `dev`, so only Rust jobs download it.

install-rust.sh reads the pins out of the extra instead of taking a version argument, so it
installs exactly what it installed before, and CARGO_LAMBDA_VERSION disappears from both
workflows. The Windows branch installs zig from chocolatey rather than the wheel, so the choco
version is derived from the same declaration, and the fallback is gated on the reported zig
version rather than mere presence -- otherwise a zig already resolvable on PATH could win over
the pin, which is the floating-version failure this PR exists to remove.

The reproducible requirements are unaffected: `uv pip compile pyproject.toml` passes no
--extra, which is why pytest is absent from them today.

The appveyor-*.yml files pin this version separately but are deprecated, so they are left
alone; each already defines and consumes its own variable.

Verified locally against rustc 1.98.0 and zig 0.16.0, same host and fixtures, only
cargo-lambda differing:

  0.17.1  x86 OK    arm64 FAIL (unsupported linker arg)
  1.9.1   x86 OK    arm64 FAIL (embeds cargo-zigbuild 0.20.1)
  1.9.2   x86 OK    arm64 OK

Confirmed on CI by dispatching this branch (run 32763066938): build-arm64 and
tier1-windows-build-2 both passed. The Windows log shows the extra resolving as intended --
"+ cargo-lambda==1.9.2", "+ ziglang==0.16.0" -- and choco installing the pinned "zig v0.16.0".
@roger-zhangg
roger-zhangg force-pushed the bump-cargo-lambda-1.9.2 branch from 16fdae4 to df97741 Compare August 24, 2026 19:11

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review Results

Reviewed: 880ac91..df97741
Files: 4
Comments: 1

Comment thread tests/install-rust.sh Resolved
@roger-zhangg
roger-zhangg enabled auto-merge August 24, 2026 21:42
@roger-zhangg
roger-zhangg added this pull request to the merge queue Aug 24, 2026
Merged via the queue into develop with commit 699af95 Aug 24, 2026
54 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants