-
Notifications
You must be signed in to change notification settings - Fork 751
fix(amazonq): unsupported languages test generation query #6363
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
|
packages/amazonq/.changes/next-release/Bug Fix-cb743d9a-67da-41a2-bda3-9bc8bfa19b75.json
Outdated
Show resolved
Hide resolved
packages/amazonq/.changes/next-release/Bug Fix-cb743d9a-67da-41a2-bda3-9bc8bfa19b75.json
Outdated
Show resolved
Hide resolved
There's no need to recreate the PR. Just close-and-reopen the existing PR, that will trigger a new lint-commits job. This is explained in the lint-commits CI log. |
…1a2-bda3-9bc8bfa19b75.json Co-authored-by: Justin M. Keyes <[email protected]>
| @@ -0,0 +1,4 @@ | |||
| { | |||
| "type": "Bug Fix", | |||
| "description": "Amazon Q: test generation for unsupported was sometimes unreliable" | |||
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.
nit: This will be listed under Amazon Q extension so no need to mention Amazon Q: here
Maybe instead you can prefix with /test:
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.
Done
|
|
||
| const triggerPayload = { | ||
| query: `Generate unit tests for the following part of my code: ${message}`, | ||
| query: `Generate unit tests for the following part of my code: ${message?.trim() || fileName}`, |
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.
Can you please describe how this fixes the issue in the PR description? (I'm assuming this is the fix)
Before/after screenshots would be helpful as well, if possible
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.
Added
hayemaxi
left a comment
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 future PRs please consider giving functions an options arguments instead of a bunch of arguments. It gets more and more confusing as arguments are added.
e.g.
// bad
myFunc(a, b, c, d ,e, f, g, ...) {}
// good
myFunc(options: Options) {}
type Options = {
a: int
b: string
....
}
## Problem - The test generation for unsupported language files and external files is unreliable and flaky. - Telemetry updated to include new metadata for existing metadata. ## Solution - Fix to add file name as fallback in case of empty prompt or no code selection. - Telemetry updated and values passed to it in controller and messenger. Essentially same PR : aws#6323 was closed last week due to build issues. --- Before: https://github.com/user-attachments/assets/90ed6629-4753-41e6-9d11-b6d4dd0d6e7c After fix: https://github.com/user-attachments/assets/d0993345-cd2c-47ac-a8b5-1e9badf8fbac - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
## Problem - The test generation for unsupported language files and external files is unreliable and flaky. - Telemetry updated to include new metadata for existing metadata. ## Solution - Fix to add file name as fallback in case of empty prompt or no code selection. - Telemetry updated and values passed to it in controller and messenger. Essentially same PR : aws#6323 was closed last week due to build issues. --- Before: https://github.com/user-attachments/assets/90ed6629-4753-41e6-9d11-b6d4dd0d6e7c After fix: https://github.com/user-attachments/assets/d0993345-cd2c-47ac-a8b5-1e9badf8fbac - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
## Problem - The test generation for unsupported language files and external files is unreliable and flaky. - Telemetry updated to include new metadata for existing metadata. ## Solution - Fix to add file name as fallback in case of empty prompt or no code selection. - Telemetry updated and values passed to it in controller and messenger. Essentially same PR : aws#6323 was closed last week due to build issues. --- Before: https://github.com/user-attachments/assets/90ed6629-4753-41e6-9d11-b6d4dd0d6e7c After fix: https://github.com/user-attachments/assets/d0993345-cd2c-47ac-a8b5-1e9badf8fbac - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Justin M. Keyes <[email protected]>
Problem
Solution
Before:
https://github.com/user-attachments/assets/90ed6629-4753-41e6-9d11-b6d4dd0d6e7c
After fix:
Screen.Recording.2025-01-15.at.12.22.15.PM.mov
feature/xbranches will not be squash-merged at release time.