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

fix(amazonq): incorrect project scan size limit #4924

Merged
merged 6 commits into from
May 7, 2024

Conversation

ctlai95
Copy link
Contributor

@ctlai95 ctlai95 commented May 3, 2024

Problem

collectFiles method uses a different max payload size value than security scans.

Solution

  • Pass the desired max value to collectFiles
  • Use 500MB as the max size

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ctlai95 ctlai95 marked this pull request as ready for review May 3, 2024 02:17
@ctlai95 ctlai95 requested a review from a team as a code owner May 3, 2024 02:17
@@ -69,7 +69,8 @@ async function filterOutGitignoredFiles(rootPath: string, files: Uri[]): Promise
export async function collectFiles(
sourcePaths: string[],
workspaceFolders: CurrentWsFolders,
respectGitIgnore: boolean = true
respectGitIgnore: boolean = true,
maxSize = maxRepoSizeBytes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have an opportunity to improve some quality in the codebase which was probably left over from re-invent. It looks like codewhisperer is importing from the featureDev part of the codebase. If this is the case, can we pull collectFiles out to a different place?

Generic utils (like collectFiles) used by multiple q products shouldn't be in individual products part of the codebase.

Also, was this issue caused by a lack of tests? Because we should be adding more tests to know that this issue is fixed

@ctlai95 ctlai95 requested a review from a team as a code owner May 6, 2024 21:13
Copy link
Contributor

@justinmk3 justinmk3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for lifting collectFiles into a shared module!

@justinmk3 justinmk3 merged commit aa8593c into aws:master May 7, 2024
14 checks passed
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.

None yet

5 participants