[plugin] Enforce build/deploy architecture consistency (#683)#688
Merged
Conversation
edc647c to
d52a3db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #683
Description of changes
lambda-buildandlambda-deploycould independently choose the target architecture, so a user could build anarm64binary and deploy a function declaringx64(or the reverse). The deploy "succeeded" but the function was broken at invoke time, with no error at build or deploy.The OCI PR (#687) introduced the
build-manifest.jsonhand-off but only wired the architecture into the image deploy path. This PR closes the underlying latent bug for the ZIP path and makes a mismatch impossible to deploy silently.lambda-build--architecture <x64|arm64>(default: host).docker --platform linux/<arch>, Applecontainer --arch <arch>), so the produced binary matches what the manifest records. The CLI-specific spelling lives in eachContainerCLIimplementation.build-manifest.json(ZIP previously hardcoded.host).lambda-deploy--architectureis omitted, deploy adopts the architecture recorded in the manifest instead of independently re-defaulting to the host.--architectureis passed and disagrees with the built artifact, deploy fails fast with a descriptive error rather than creating a broken function.archiveoutput, or--input-directory) falls back to the previous behavior;--architectureremains the way to declare the arch there.Docs & tests
New/existing dependencies impact assessment, if applicable
No new dependencies.
Conventional Commits
fix: enforce architecture consistency between lambda-build and lambda-deploy
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.