-
Notifications
You must be signed in to change notification settings - Fork 139
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
Feature: Add npm test command during npm build #681
base: develop
Are you sure you want to change the base?
Conversation
Hello, I can see some of the windows java builds have failed. Although I do not know why as the changes are limited to Node. Can it be possible these failures existed before the changes in this PR? |
Hi @saraiyakush, thanks for the contributions. We will investigate why the tests are failing, they don't look related to your changes. |
Newer versions of SAM CLI will utilize the latest version of Lambda Builders that is uploaded on PyPi at the time of creating that new SAM CLI version. Since this is something we do automatically, clients will consume this change when the following happens:
Will this change any implementation details, or will raise up any discussions you had in mind? |
From what I understood from your response, I don't think we'd have a problem. But let me validate my understanding. I am a client using SAM CLI let's say version v2.6.1, which points to Lambda builders v4.5. With this PR merged, we get a new lambda builders v4.6. So until a client does not upgrade their local sam cli version (or in their pipelines), we don't have a problem. Most of the pipelines I have seen don't upgrade cli versions. However, thinking out loud, if any client has some script that installs sam cli each time (e.g. Dockerfile) in their pipelines (highly unlikely), then I assume they will install the latest SAM CLI which will point to the latest lambda builder. So adding a feature flag in this PR may not be a bad idea. So clients can choose if they want to switch on this feature. What do you think? |
@saraiyakush I'd agree with this suggestion |
Cool. I will work on it and add a commit to this PR. |
Hi @saraiyakush just checking if you had a chance to work on the changes discussed above. Please let us know when we can continue the review. Thanks again for your contributions! |
Hi @mndeveci , unfortunately, I haven't got a chance to add the feature flag further. I also anticipate adding the feature flag via CLI will introduce a change in the sam cli as well, in addition to lambda builders. I have never explored sam cli source code so that will also need to be considered. Nevertheless, I plan to work on this in the next few weeks. |
Summarising the need for a feature flag and where I am stuck to implement it. If we don't add a feature flag, clients who have a script named To allow clients to choose if they want to execute the script
|
Issue #, if available: aws/aws-sam-cli#7348
Description of changes:
npm run test
command, if atest
script is available inpackage.json
.sam build
command for Node projects.test
script isn't available.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.