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

Merge master into feature/dynamodb #5574

Open
wants to merge 1,602 commits into
base: feature/dynamodb
Choose a base branch
from

Conversation

aws-toolkit-automation
Copy link
Collaborator

Automatic merge failed

  • Resolve conflicts and push to this PR branch.
  • Do not squash-merge this PR. Use the "Create a merge commit" option to do a regular merge.

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):

git stash
git fetch --all
git checkout origin/feature/dynamodb
git merge origin/master
git commit
git push origin HEAD:refs/heads/autoMerge/feature/dynamodb

@aws-toolkit-automation aws-toolkit-automation requested a review from a team as a code owner October 2, 2024 16:47
vicheey and others added 26 commits November 21, 2024 08:16
…6065)

## Problem
Unlike in SAM deploy wizard, SAM sync wizard skip a question about
bucket source for sync artifact and go directly to question for bucket
name.

## Solution
Add prompter asking for bucket source option: 
1) Create a SAM CLI managed S3 bucket
2) Specify an S3 bucket
## Problem
`.gradle` files are not currently supported by /dev

## Solution
Add `.gradle` to list of supported file extensions

I manually tested some prompts in /dev with requests to modify the
build.gradle and it worked
## Problem
- bump amazonQ helper version to the latest

## Solution


---

<!--- 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
There are many `unreliable test` issues on github, but they sometimes
take different formats. This can make them harder to find, and more
difficult to work on. Ideally, all should show up here:
https://github.com/aws/aws-toolkit-vscode/issues?q=is%3Aissue+is%3Aopen+unreliable+test
in some consistent format.

## Solution
See template
Example using template:
#6078

---

<!--- 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.
…mmands (#6081)

## Problem
We have been using components from sync.ts, where all prompters created
for other command still use samSyncUrl.

## Solution
Use correct url link for respective command in all prompter button. 
---


License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
…ing session (#6073)

## Problem
Addresses feedback after working with Toolkit UXD. There are
inconsistencies with formatting/capitalization of certain nouns in the
LiveTail menu. Some of the verbiage is unclear/too lengthy.

In the case there is an already running session and the user tries to
start a new session with the same parameters, it is unclear that we are
opening an already existing session and not starting a new one.

## Solution
* Consistent spacing and capitalization of "Log Group" and "Log Stream"
* Introduce new Info window when opening and existing session stream
* Re-words LogStream filter type sub menu.
## Problem
closes: #6076 

## Solution

Add support for python3.13 on SAM build/debug and toolkit features
If the underlying SAM CLI is showing error: python3.13 is not supported,
Please update your SAM CLI to 1.129.0
## Problem
#6079

## Solution
Ignore the flaky test cases for now until we root caused why it failed
occasionally in some CI machines
## Problem
Lambda and SAM CLI v1.130.0 start to support nodejs22.x

## Solution
Add support for nodejs22.x on SAM build/debug and toolkit features
If the underlying SAM CLI is showing error: `nodejs22.x is not
supported`, Please update your SAM CLI to 1.130.0 or above
## Problem

RTS changed feature dev governance interface on dealing with quota

## Solution

Added handling for this case on feature dev 

---

<!--- 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.
…erridden (#6035)

## Problem

When a customization is overridden via AB, the name of the customization
is not shown to users

## Solution

Uses the variation field from the customizationArnOverride feature as
the name for the customization. This allows the UX to show a
customization name when the customizationArn is overriden
## Problem
The AWS SDK returns terminated instances for a short period and we
display a `pending` icon in this case.
<img width="705" alt="image"
src="https://github.com/user-attachments/assets/2f2568ce-3abc-4002-938e-6864594bf6ac">

## Solution
Display a specific icon that indicates the instance is terminated. 
<img width="606" alt="image"
src="https://github.com/user-attachments/assets/9bcaf466-6043-400e-bea2-394c3f7ec2fc">

## Alternative Solution 
We could have avoided showing terminated instances at all. However, by
showing them terminated it provides consistency with the console(since
it also shows terminated instances for a short period), and greater
visibility.

---

<!--- 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.
…for featureDev quota (#6093)

## Problem
- Follow up of #6091 
- improve and refactor the code from that previous PR

## Solution
Hweinstock and others added 30 commits December 18, 2024 08:51
## Problem
fix #6213

## Solution
- The important part of this test is that the message comes after being inactive. If the message comes slightly early/late, that is okay. If it doesn't come at all, then we have problems and should fail. 
- Pass test if message comes within a minute of expected.
Problem:
Since 6dcbfc7, the `lint-commits` job runs whenever the PR
*description* is edited, which then re-runs all the other GHA jobs. This
is because it listens to the `edited` event, which triggers whenever the
PR is edited in any way (very noisy).

Solution:
There is no way to avoid rerunning all the CI jobs if they are dependent
on `lint-commits`. Instead, revert 6dcbfc7 and document that
re-opening the PR will force CI to re-run, if needed, after fixing a PR
title.
## Problem
Code block extends beyond margins followed by the rest of the document.

## Solution
Remove css styles
## Problem
- mynah ui 4.21.3 contains a fix needed for tests:
https://github.com/aws/mynah-ui/releases/tag/v4.21.3

## Solution
- update to it. No public facing changes are needed
## Problem
This is a part of the task to implement client side alarms in order to
track success rate for the client.

## Solution
- Emit metric data telemetry on success/failure.
## Problem
We have no tests for the welcome page and explore agents page

## Solution
Add them
## Problem
Fonts are out of sync for the toolkits

## Solution
Update and commit the font changes

---

- 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.

Signed-off-by: nkomonen-amazon <nkomonen@amazon.com>
## Problem
The `jscpd` check checks changed *files*. So duplicate code may be
reported on lines outside of the actual changes (in the same file),
which may be considered false positives.

## Solution
- Only report "clones" (duplicate code) on actually changed lines.
- Refactor the action to simplify the bash scripting.
- Add tests for `filterDuplicates.ts`.
## Problem
Many bugs, and confusing behavior stem from developers using an async
function within a forEach. This is almost always not desired.
Additionally, `forEach` can lead to bloated implementations when other
methods like `some`, `find`, `reduce`, or `flatMap` are more applicable.

According to
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md
It is also faster with `for ... of`.

## Solution
- Add lint rule: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md
- Migrate existing cases with `eslint CLI --fix` (75% of cases).
- For remaining cases, mark as exception.
## Problem

Be able to tell when a language upgrade vs sql conversion happens.

## Solution

Add metric.

---

- 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 <davhasan@amazon.com>
## Problem

Not using correct documentation link.

## Solution

Update it.

---

- 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 <davhasan@amazon.com>
## Problem

We previously increased the maxRetries for GetTransformationJob from 3
to 8 since it's polled every 5 seconds; we should do the same for
GetTransformationPlan since it too is polled every 5 seconds.

## Solution

Increase maxRetries from 3 to 8.

---

- 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 <davhasan@amazon.com>
## Problem
A "View summary" button was missing in the chat, which made it difficult
for users to re-open their transformation summary once they closed it.

## Solution
Add the button.
## Problem
- CI test reporting only captures the last package's results
- Running `npm run testE2E` only preserves toolkit's report.xml, losing
other package results


## Solution
- Generate individual report.xml files per subproject
- Consolidate all existing package reports into root
.test-reports/report.xml
- This is done in the buildspecs themselves rather than directly in the
package.json (the original approach to solve this problem) because
mac/linux and windows have two different ways of getting the last error
code, resulting in a complicated package.json for something thats only
needed in our codebuilds


---

- 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.
Removes code that should no longer be necessary anymore.

- Remove autoinstall Amazon Q if you were a CodeWhisperer user on 2.x versions of toolkit
    - The prompt to install Amazon Q will still appear, if you don't have it. It has been slightly reworded.
    - If Amazon Q is installed, then you uninstall, it you will not see the prompt again in toolkit (previously you could).
- Remove settings migrations from codewhisperer settings
- Remove amazon Q telemetry enabled setting being initialized by the value from toolkit.

We are still getting hits in telemetry for people getting auto install (172 in last 2 months). However, they are mostly on old versions.
Let's simplyify our codebase by removing support for these dated codepaths.
Removes the prompt shown in Toolkit that Amazon Q no longer shares connections with it. Some time has passed, active users should have been informed by now. We are still getting telemetry hits indicating that this is being used though.

NOTE: Does not revert or remove any separation logic itself. We continue to have separate sessions and also remove any connections in either extension that are extra or don't match the required scopes for that extension. That logic helps us catch auth edge cases.
## Problem

Flaky test `generateZipTestGen` sometimes fails with
```
  1) zipUtil
       generateZipTestGen
         Should generate zip for test generation successfully:
     Error: done() called multiple times in test <zipUtil generateZipTestGen Should generate zip for test generation successfully> of file /Users/runner/work/aws-toolkit-vscode/aws-toolkit-vscode/packages/amazonq/dist/test/unit/codewhisperer/util/zipUtil.test.js; in addition, done() received error: EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, scandir '/test/zip/utgRequiredArtifactsDir'
    at Function.e (/private/tmp/.vscode-test/vscode-darwin-arm64-1.83.0/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:26740)
    at Object.readDirectory (/private/tmp/.vscode-test/vscode-darwin-arm64-1.83.0/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:127:24744)
    at async processDirectory (/Users/runner/work/aws-toolkit-vscode/aws-toolkit-vscode/packages/core/src/codewhisperer/util/zipUtil.ts:190:29)
    at async ZipUtil.processMetadataDir (/Users/runner/work/aws-toolkit-vscode/aws-toolkit-vscode/packages/core/src/codewhisperer/util/zipUtil.ts:212:9)
    at async ZipUtil.zipProject (/Users/runner/work/aws-toolkit-vscode/aws-toolkit-vscode/packages/core/src/codewhisperer/util/zipUtil.ts:230:13)
    at async ZipUtil.generateZipTestGen (/Users/runner/work/aws-toolkit-vscode/aws-toolkit-vscode/packages/core/src/codewhisperer/util/zipUtil.ts:602:41)
    at async Context.<anonymous> (/Users/runner/work/aws-toolkit-vscode/aws-toolkit-vscode/packages/amazonq/test/unit/codewhisperer/util/zipUtil.test.ts:159:28) {
  code: 'FileNotFound'
```

Issue: #6160


## Solution

Based on the error, the test is trying to readdir on a mock dirpath even
though the entire `zipProject` method should be stubbed. This can be
confirmed by commenting out the following line:


https://github.com/aws/aws-toolkit-vscode/blob/aa332da854c9d17ba258b459c622500911b1b0d9/packages/amazonq/test/unit/codewhisperer/util/zipUtil.test.ts#L135

which will give the same error

```
Error: ENOENT: no such file or directory, scandir '/test/zip/utgRequiredArtifactsDir'
```

So instead of stubbing which seems to be unreliable, we can let the test
actually create the zip file.

---

- 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: amazon q standalone special handling](7ae5405) 

Removes code that should no longer be necessary anymore.

- Remove autoinstall Amazon Q if you were a CodeWhisperer user on 2.x versions of toolkit
    - The prompt to install Amazon Q will still appear, if you don't have it. It has been slightly reworded.
    - If Amazon Q is installed, then you uninstall, it you will not see the prompt again in toolkit (previously you could).
- Remove settings migrations from codewhisperer settings
- Remove amazon Q telemetry enabled setting being initialized by the value from toolkit.

We are still getting hits in telemetry for people getting auto install (172 in last 2 months). However, they are mostly on old versions.
Let's simplify our codebase by removing support for these dated codepaths.

[revert(toolkit): Q <--> Toolkit auth separation notification](4c747af) 

Removes the prompt shown in Toolkit that Amazon Q no longer shares connections with it. Some time has passed, active users should have been informed by now. We are still getting telemetry hits indicating that this is being used though.

NOTE: Does not revert or remove any separation logic itself. We continue to have separate sessions and also remove any connections in either extension that are extra or don't match the required scopes for that extension. That logic helps us catch auth edge cases.

---

- 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
mvn and gradle files are not included in repo archives for Q.

## Solution
Add them to the `isCodeFile()` condition.
Bump MynahUI to version 4.21.4 from 4.21.2. This includes two bug
fixes and one feature, as described by the changelog commits and by the
[MynahUI release notes](https://github.com/aws/mynah-ui/releases).
## Problem
When zipping context for /dev, customer build processes (file watchers,
etc.) may delete build artifacts we’ve already enumerated but have not
added to the archive. As a best practice, customers should `.gitignore`
these types of files, but in the event they don't, this has the
potential to block /dev from running.

## Solution
Skip affected files, which are not found when adding to zip context for
Feature Dev.
Co-authored-by: Maxim Hayes <149123719+hayemaxi@users.noreply.github.com>
fix(amazonq): fix for /test for files outside of workspace.
## Problem:

The Identity team noticed a large spike in token refreshes for specific
users. One user would trigger refresh over 50 times within a few
seconds.

Ticket: `P180886632`

## Solution:

The telemetry showed that `getChatAuthState()` was being called many
times in a short period. This eventually triggered the token refresh
logic many times, if the token was expired.

The solution is to add a debounce to `getToken()` which calls the
refresh logic.
- `debounce()` only accepts functions without any args, the refresh
logic requires args
- `getToken()` will also load from disk is the token is not expired, so
debouncing here saves disk I/O as well.

The current debounce interval is 100 milliseconds, which based on
telemetry should be enough to capture the barrage of calls. With some
manual testing it does not feel like UX is impacted in any noticeable
way.

---

- 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.

---------

Signed-off-by: nkomonen-amazon <nkomonen@amazon.com>
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.