Skip to content

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

Merged
merged 8 commits into from
Aug 30, 2021

Conversation

wchengru
Copy link
Contributor

@wchengru wchengru commented Aug 30, 2021

Issue #, if available:
This PR is to fix an issue in SAM CLI running sam local invoke with error level=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.

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]}
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@wchengru wchengru merged commit 703935c into aws:develop Aug 30, 2021
wchengru added a commit to wchengru/aws-sam-cli that referenced this pull request Aug 30, 2021
jfuss added a commit to aws/aws-sam-cli that referenced this pull request Sep 9, 2021
* 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]>
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