aws / aws/aws-cdk

assets: hashing does not have any (debug) output

Open
#23,831 0 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/assets feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

Calculating the hash can be very time consuming if the source for the hash is very large. Typically this can happen when `node_modules` is included in the source.

Currently there is no debug information available when hashing is happening. This is very confusing when hashing takes a long time.

### Use Case

As a user,
When CDK creates the asset hash for a very large source directory,
I want to see that hashing happens and how long it takes,
So that I can optimize my CDK app.

### Proposed Solution

With one level of verbosity:
- Add some debug output for every call to `calculateHash` at the start showing the asset name and hash type.
- After hashing the hash should be printed and the time it took

With two levels of verbosity:
- Print additional information on the hash configuration

### Other Information

_No response_

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.61.1

### Environment details (OS name and version, etc.)

macos

Contributor guide

Open the contributing guide

Research direction

Start by locating the calculateHash entry point in the CDK source and inspect how debug verbosity is handled around asset processing. Done means one verbosity level reports the asset name, hash type, resulting hash, and elapsed hashing time, while two levels also report the hash configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.