Skip to content

fix(lambda): treat empty LAMBDA_ZIP_PATH as unset in build script#6462

Merged
fulmicoton-dd merged 1 commit into
mainfrom
fix/lambda-zip-path-empty-string
May 21, 2026
Merged

fix(lambda): treat empty LAMBDA_ZIP_PATH as unset in build script#6462
fulmicoton-dd merged 1 commit into
mainfrom
fix/lambda-zip-path-empty-string

Conversation

@fulmicoton-dd
Copy link
Copy Markdown
Collaborator

Summary

The Dockerfile sets ENV LAMBDA_ZIP_PATH=$LAMBDA_ZIP_PATH after the ARG declaration. When no build arg is passed (e.g. local builds not triggered by a release tag), this results in the env var being set to an empty string rather than being absent.

env::var("LAMBDA_ZIP_PATH") returns Ok("") in that case, so build.rs tried to read a zip file at path "" and panicked with:

failed to read LAMBDA_ZIP_PATH "": No such file or directory (os error 2)

Fix by filtering out the empty-string case, treating it the same as unset and falling back to the normal download path from GitHub releases.

Test plan

  • Local Docker build without --build-arg LAMBDA_ZIP_PATH completes successfully (downloads zip from GitHub)
  • CI build with LAMBDA_ZIP_PATH set to a valid path still uses the local zip

🤖 Generated with Claude Code

The Dockerfile sets `ENV LAMBDA_ZIP_PATH=$LAMBDA_ZIP_PATH` after the
`ARG` declaration. When no build arg is passed (e.g. local builds not
triggered by a release tag), this results in the env var being set to
an empty string rather than being absent.

`env::var("LAMBDA_ZIP_PATH")` returns `Ok("")` in that case, so the
build script tried to read a zip file at path `""` and panicked.

Fix by filtering out the empty-string case, falling back to the normal
download path from GitHub releases.
@fulmicoton-dd fulmicoton-dd requested a review from a team as a code owner May 21, 2026 14:43
@fulmicoton-dd fulmicoton-dd requested a review from PSeitz May 21, 2026 14:49
@fulmicoton-dd fulmicoton-dd merged commit a1521e1 into main May 21, 2026
9 checks passed
@fulmicoton-dd fulmicoton-dd deleted the fix/lambda-zip-path-empty-string branch May 21, 2026 15:55
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