-
Notifications
You must be signed in to change notification settings - Fork 106
valid the bootstraps before passing to NewBootstrapSingleCmd #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9a23188
to
e45a909
Compare
cmd/aws-lambda-rie/main.go
Outdated
fmt.Sprintf("%s/bootstrap", currentWorkingDir), | ||
optBootstrap, | ||
runtimeBootstrap, | ||
} | ||
|
||
// set default value to /var/task/bootstrap, but switch to the other options if it doesn't exist | ||
bootstrapLookupCmd = []string{bootstrapCmdCandidates[0]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably minor, but it looks somewhat weird to set this default value, but then changing the variable to potentially this same value again if it passes the "if" below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I have refactored this part to make it clearer.
* New release of RIE: 1.1 * Update RIE 1.1 with PR aws/aws-lambda-runtime-interface-emulator#45 * add integrate test case to run simple verification on sam local invoke * update appveyor config to pull test image only without canary * fix a syntax error * remove unused print log * keep the tests in canary to avoid docker pull throttling Co-authored-by: Renato Valenzuela <[email protected]> Co-authored-by: Jacob Fuss <[email protected]> Co-authored-by: Mathieu Grandis <[email protected]>
Issue #, if available:
This PR is to fix an issue in SAM CLI running
sam local invoke
with errorlevel=error msg="Init failed" InvokeID= error="fork/exec /var/task/bootstrap: no such file or directory"
We validate the existence of the three bootstrap file options at first.
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.