-
Notifications
You must be signed in to change notification settings - Fork 751
Merge master into feature/q-dev-execution #6178
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
Merged
justinmk3
merged 558 commits into
feature/q-dev-execution
from
autoMerge/feature/q-dev-execution
Jan 23, 2025
Merged
Merge master into feature/q-dev-execution #6178
justinmk3
merged 558 commits into
feature/q-dev-execution
from
autoMerge/feature/q-dev-execution
Jan 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Problem The codefileExtensions does not contain an extension type for `.pli` which is the common extension for PL/1, or for `.bms` which is Basic Mapping Support and common for screen definition files in IBM mainframe. Because of this, the files and code in them are not accessible in the workspace context for Amazon Q using the `/dev` quick action. When using the Q quick action '\dev' for `.pli` or `.bms` files, Q responds with the following message: > This appears to be an empty program or workspace with no source files present. There is nothing to explain at this time since no code or files are available for analysis. ## Solution - Add `.pli` and `.bms` as a known code file extension types.
## Problem fix #6078 ## Solution Turn off CodeWhisper scanning after test suite completes.
…#6114) ## Problem We didn't have much use for the old "Amazon Q" channel in addition to "Amazon Q Logs". All the logs we used were in "Amazon Q Logs". ## Solution - Now, just have the useful "Amazon Q Logs" channel. - Move the Amazon Q Language Server logs in to Amazon Q Logs to unify all logs --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: nkomonen-amazon <[email protected]>
…ject. (#6110) ## Problem The `LiveTailSession` object's start/stop methods aren't directly under test. TailLogGroup tests are mocking their behavior. TailLogGroup command tests are more focused on managing the session registry, opening/writing to the document, and the close tab behaviors. ## Solution Write a test that's scoped to creating a `session` and calling start and stop on it. Assert that timers are handled/disposed of properly, and that the session response stream is returned. Addresses [this comment](#6095 (comment)). --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Keegan Irby <[email protected]>
## Problem GHSA-3xgq-45jj-v275 ## Solution Use version 7.0.5
## Problem #6043 To reproduce, add a 5 second delay to the `after` hook at the top level. One way to do this is to insert this at line 84. ``` after(async function () { clock.uninstall() await sleep(5000) }) ``` Despite asserting that the promise rejects within the test, the promise rejects after the test as well. Not entirely sure why this happening. - Tried manually wrapping in try-catch with an `await` instead of `assert.rejects` and it still fails. - Tried wrapping the promise in another promise before passing to `assert.rejects`. ## Solution What does appear to work, is manually handling the callback of the promise. That is, explicitly defining a `then` and `catch` method to assert the rejection, and awaiting the promise at the end of the test to ensure it resolves before the test finishes. Not sure why this works, but I am unable to reproduce the error with this change. ## Notes - `assert.rejects` implementation: https://github.com/nodejs/node/blob/3178a762d6a2b1a37b74f02266eea0f3d86603be/lib/assert.js#L653. Doesn't appear to be the problem because the same is observed when manually wrapping. - `await` docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
## Problem
The EC2 ARN sneaks its away into the logs via the `Ec2InstanceNode`
tooltip property from
`packages/core/src/awsService/ec2/explorer/ec2InstanceNode.ts`. When we
run any command on this instance, we get the following logs with the
middle section omitted for brevity.
```
2024-12-04 17:25:10.859 [debug] command: running "aws.ec2.openTerminal" with arguments: [
{
collapsibleState: 0,
label: 'testInstance ({INSTANCE_ID}) RUNNING',
...
contextValue: 'awsEc2RunningNode',
iconPath: { id: 'pass', color: undefined },
tooltip: 'testInstance\n' +
'{INSTANCE_ID}\n' +
'running\n' +
'arn:aws:ec2:us-east-1:{ACCOUNT_ID}:instance/{INSTANCE_ID}',
id: '{INSTANCE_ID}'
},
undefined
]
```
The actual AWS account ID in use is included in the logs.
What makes this difficult is that this node is passed directly from
VSCode here:
https://github.com/aws/aws-toolkit-vscode/blob/d74f96c61f79716edf8a9a706a86c587887d3b9b/packages/core/src/awsService/ec2/activation.ts#L32-L37
and is processed by our commands wrapper here:
https://github.com/aws/aws-toolkit-vscode/blob/d74f96c61f79716edf8a9a706a86c587887d3b9b/packages/core/src/shared/vscode/commands2.ts#L649-L660
The wrapper is logging the node directly from vscode, not giving us a
chance to use `partialClone` on it first.
## Solution
- omit all tooltips from the logs, since this is usually redundant
information anyway.
## Problem Follow up to #6018 (comment) ## Solution - Run `ssh` within the same env as it will be run on real connection. - Log any resulting errors, and inform user where the process failed. - Also part of this PR is moving some functions to `remoteSession.ts` that are general enough to be there. Error msg: <img width="1518" alt="Screenshot 2024-11-15 at 5 53 51 PM" src="https://github.com/user-attachments/assets/e8e56887-b792-43e3-9d94-73d0e5246766"> --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> 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: Inconsistent comment style. Solution: Add a lint rule.
## Problem Toolkit/Q slow performance is consistently reported by customers. Toolkit/Q features can spawn processes, included many long-lived processes such as LSP servers. The cost of these processes is hidden and hard to troubleshoot. Any misbehaving process will not be noticed except in a coarse "Toolkit/Q causes vscode to be slow" manner. ## Solution - Track all running processes in a map-like data structure. - use a `PollingSet` to periodically "monitor" their system usage (%cpu, memory bytes), logging warning messages when it exceeds a threshold. - Add developer command to instantiate spawned processes via `ChildProcess` wrapper to make this easier to test.
## Problem - Resource fetcher currently only works on node. This causes some implements to use got directly, some use fetch directly, some use httpResourceFetcher depending on their use case ## Solution - Make HttpResourceFetcher platform independent so it can run on node + web - Move the streaming based HttpResourceFetcher to a node specific folder --- - 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.
Revert endpoint change in previous commit: 062d24a
## Description Bumped MynahUI to version 4.21.4 from 4.21.5. This includes two bug fixes, as described by the changelog commits and by the [MynahUI release notes](https://github.com/aws/mynah-ui/releases).
refactor(core): Improve httpResourceFetcher API
…c93-9dee-5dd2019769fe.json update Changelog to mention the particular command Co-authored-by: Justin M. Keyes <[email protected]>
## Problem Code fix errors are not handled correctly, only shows a generic error notification and webview is not updated. ## Solution Surface the server error to the UI <img width="658" alt="image" src="https://github.com/user-attachments/assets/6e0e72d1-7de1-415d-a4d4-891d94e6d7ea" /> --- - 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.
fix(amazonq): User can view file diff by file click
…n limit exceeded (#6395) ## Problem When a user encounters an error while updating a README, they see a "Retry" button, which isn't correct because the previous prompt is not retried. Instead, the user should be able to input a new prompt. When a user runs out of iterations in a session, the chat allows them to continue making README update requests, which results in an "Iteration limit exceeded error". ## Solution If a user gets an error while updating a README, the chat input is enabled and the user can try another prompt. Once the user hits their iteration limit for the session, they are not able to suggest more changes and have to accept/reject the existing set of changes. This will reduce the "iteration limit exceeded" errors encountered by users. A E2E test is added to verify that prompt errors during README updates are handled correctly with the relevant error message, and validates that users can enter a new prompt. Screenshots: _Prompt enabled after error updating README_ <img width="520" alt="image" src="https://github.com/user-attachments/assets/407109d2-3f10-4e8c-9312-ecab57e625b4" /> _'Make changes' button hidden once iteration limit is reached_ <img width="506" alt="image" src="https://github.com/user-attachments/assets/acf960c0-1c43-475c-a478-c95336ab857b" /> --- - 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.
## Problem Auto review timeout is too long ## Solution Decrease the timeout for auto reviews from 10 to 1 minute. `/review` will still use 10 minute timeout. --- - 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.
## Problem We currently only retry normal get requests in the httpResourceFetcher ## Solution Retry etag get requests as well --- - 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.
## Problem Only 200-299 are treated as "response.ok" responses by fetch. However, 304's (content not modified) are valid response codes as well ## Solution If the status code is 304 then don't throw --- - 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.
This code removes nearly all cloud9 codepaths: - Icons, readme generation, scripts - ikp3db lambda/sam debugger support - Cloud9 only codepaths and hacks - Docs and comments mentioning Cloud9 Includes some follow up items as TODOs in code. Some items were left in case they are helpful in the future (e.g. for vscode web or similar). The items should be renamed from Cloud9 if used again in the future. Some examples are Cloud9 runtime environment checks (for lambda/sam), `isCloud9()` and properties/text for Cloud9 IDE, some SAM artifacts, don't start LSP server, etc. Search cloud9 in vscode after merging this change. --- - 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 A phrase is repeated in the error message for prompt refusal when updating a README in /doc ## Solution Fix error message for prompt refusal Note: changelog is not updated since error message updating already included [in changelog for this release](bcdfcdd#diff-6edd3b49931bb5d80cf0b6d048305bb4902587900e26fea567efe8a1bca38decR3) --- - 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.
## Problem The multiple icons in the top right of our Transformation Hub were not easily visible or sufficiently clear to users. ## Solution Remove the icons, replacing them with a description of what the icon/button does. --- - 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: David Hasani <[email protected]>
## Problem
The version of the AWSK SDK v2 was outdated 1.5 years, so some newer
functionality was not available.
## Solution
Update the version of `aws-sdk` package to the latest version.
The `Response` class in AWS SDK changed the signature of the `nextPage`
method, so some tests that were mocking this method had to be updated
accordingly (changing the response from `undefined` to `null`).
The definition changed from
```
nextPage(callback?: (err: E, data: D) => void): Request<D, E>|void;
```
(callback optional, can return `void`)
To
```
nextPage(): Request<D, E> | null;
nextPage(callback: (err: E, data: D) => void): void;
```
(can return `null` if no callback. only when a callback is passed
returns `void`)
## Problem Right now `PollingSet` exposes both the `add` and the `start` methods. The `start` adds the item and starts the timer, while the `add` only adds the item. This allows a consumer to create a non-empty `PollingSet` where the timer never started. ## Solution - override the add method so that a consumer is forced to start the timer when adding items.
Gets rid of these  You can still dismiss by clicking the X button next to non-emergency notifications. --- - 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.
## Problem While starting the release process we found an problem where the endpoints couldn't be fetched because the resourceFetcher was expecting a string but the httpResourceFetcher was returning a Resource ## Solution If its a string then return the contents from the resource fetcher directly, otherwise consider it as a response and get the text from the request --- - 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.
Contributor
|
The failing lint etc can be fixed in followup PRs. Meanwhile, merging this allows the automerge to succeed. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Automatic merge failed
Command line hint
To perform the merge from the command line, you could do something like the following (where "origin" is the name of the remote in your local git repo):