Open willyyhuang opened 1 week ago
this has customer/product impact, right? so "chore" is not the right category. it's either a "fix" or a "feat".
this has customer/product impact, right? so "chore" is not the right category. it's either a "fix" or a "feat".
fixed, thanks!
Problem
Feature dev compiles a compressed file with relevant local files to prepare response. This process would allow some irrelevant files to be added into the zip without many filters.
The current filtering pattern: ignore the gitignores and files that are big in size (> 1024000 kb).
Solution
Implement an allowlist behaviour checking file extensions, we will be proactive to see which other files should be added in this list.
Filter out any files that aren't in the allowlist.
Tested by building extension locally, verified the s3 artifact size, also added unit test to reflect this behaviour.
Follow up: emit telemetry event, once it's defined.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Tested using the same repository, but 2 different extension version
Before,![Screenshot 2024-06-27 at 12 37 09 PM](https://github.com/aws/aws-toolkit-vscode/assets/48188884/eb7c5cb2-2560-464a-ab7a-606a7405fda8)
master
branch behaviourAfter,![Screenshot 2024-06-27 at 12 37 04 PM](https://github.com/aws/aws-toolkit-vscode/assets/48188884/5ec27b9f-3ff1-43de-9c5d-9cd0822b1410)
wlsun/filter-non-code-files-feature-dev
branch behaviour