Skip to content
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

(aws-lambda-nodejs): CUSTOM hash pass-through #16157

Closed
devlsh opened this issue Aug 21, 2021 · 1 comment · Fixed by #16412
Closed

(aws-lambda-nodejs): CUSTOM hash pass-through #16157

devlsh opened this issue Aug 21, 2021 · 1 comment · Fixed by #16412
Labels
@aws-cdk/aws-lambda-nodejs effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@devlsh
Copy link

devlsh commented Aug 21, 2021

Currently the @aws-cdk/aws-lambda-nodejs Functions default to OUTPUT hash type - however it'd be great to make this a configuration option to allow custom calculation of the hash to trigger a build on-demand.

Use Case

Improved deploy times when used with a Node-based async checksum algorithm for directories, or for manually triggering deploys in CI/CD based on external data.

Proposed Solution

As part of the NodejsFunction export props, re-add a bundling option for customizing the hash method & value using the existing @aws-cdk/aws-lambda#Function props. It would purely be a pass-through to the bundling.ts, optionally falling back to the current defaults - there wouldn't be any breaking changes.

This is a 🚀 Feature Request

@devlsh devlsh added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 21, 2021
jogold added a commit to jogold/aws-cdk that referenced this issue Sep 8, 2021
Add a `assetHash` prop to customize the asset hash.

Closes aws#16157
jogold added a commit to jogold/aws-cdk that referenced this issue Sep 8, 2021
Add a `assetHash` prop to customize the asset hash.

Closes aws#16157
@nija-at nija-at added effort/medium Medium work item – several days of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Oct 5, 2021
@nija-at nija-at removed their assignment Oct 14, 2021
@mergify mergify bot closed this as completed in #16412 Nov 8, 2021
mergify bot pushed a commit that referenced this issue Nov 8, 2021
By default the asset hash for a `NodejsFunction` is based on the
bundling output, the result of the `esbuild` bundling.

Add a `assetHash` prop to customize the asset hash and allow users to
implement their own logic. This can be useful if users want to invalidate
the asset based on specific (input) file contents or logic.


Closes #16157


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Nov 8, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
By default the asset hash for a `NodejsFunction` is based on the
bundling output, the result of the `esbuild` bundling.

Add a `assetHash` prop to customize the asset hash and allow users to
implement their own logic. This can be useful if users want to invalidate
the asset based on specific (input) file contents or logic.


Closes aws#16157


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants