-
Notifications
You must be signed in to change notification settings - Fork 83
fix(amazonq): fix processing empty unsupported workspace file #2017
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2017 +/- ##
==========================================
- Coverage 60.91% 60.91% -0.01%
==========================================
Files 239 239
Lines 52576 52597 +21
Branches 3176 3179 +3
==========================================
+ Hits 32027 32038 +11
- Misses 20487 20497 +10
Partials 62 62
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
onlyFiles: true, | ||
}) | ||
|
||
const hasJavaFile = files.some(file => file.endsWith('.java')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this function when you get files, please use fast glob streaming methods. See #2003
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack let me refactor this to streaming methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leigaol added the same glob.stream with early exist on MAX_FILES
b876c76
to
e3b4cd2
Compare
e3b4cd2
to
bbfeb9f
Compare
* fix(amazonq): improve cross theme support (#2036) * fix(amazonq): fix processing empty unsupported workspace file (#2017) * test: fix integration tests on windows (#2041) * fix(amazonq): fix for mcp server permissions to prefer workspace agent config files (#2038) * chore: add integ test badge (#2042) * feat(amazonq): implement displayFindings tool (#2029) * feat(amazonq): implement displayFindings tool * feat(amazonq): add unit tests for display findings tool * fix(amazonq): simplify displayFindings unit tests, collapse switch statement * fix(amazonq): emit metrics for displayFindings, fix error handling, improve unit tests --------- Co-authored-by: abhraina-aws <abhraina@amazon.com> Co-authored-by: liumofei-amazon <98127670+liumofei-amazon@users.noreply.github.com> Co-authored-by: Tai Lai <ctlai95@gmail.com> Co-authored-by: invictus <149003065+ashishrp-aws@users.noreply.github.com> Co-authored-by: BlakeLazarine <blake.l.lazarine@gmail.com>
Problem
From the priors change workspace context is not handling
.scala
.kt
project correctly by uploading an empty project file.This PR to address this issue, only adding the
pom.xml
gradle.build.kts
gradle.build
build.xml
if there's java source file existing.Solution
Move the logic assign the language override inside
artifactManager
, only process these projectFile if there's.java
source file exist so we do not upload it for kotlin/scala/smithy projects which will result an empty zip with project file onlyAlso introduce the fix using glob.stream and have upper limit of file count from this commit
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.