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/stepfunctions-workflow #5695

Open
wants to merge 92 commits into
base: feature/stepfunctions-workflow
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/stepfunctions-workflow
git merge origin/master
git commit
git push origin HEAD:refs/heads/autoMerge/feature/stepfunctions-workflow

Removes the need to copy/sync package JSON contents from core ->
subproject extensions on build and package.

Summary of changes:
- Delete syncPackageJson.ts and handlePackageJson.ts
- Consolidate testing scripts and make small improvements (e.g.
validation, handle multiple directories to import tests from)
- package.json is now fully complete in `amazonq/`, `toolkit/`. Changes
to extensions should be made only the respective file (except for
icons).
- `toolkit/` runs unit, e2e, and integ tests from `core/`. It will also
run any of its own tests (but those don't exist yet).
- Web tests now moved to and run from `amazonq/`. This was decided
because `amazonq/` is more likely to support web than `toolkit/` at this
time. Also, it didn't seem possible to run the web tests from `core/`
like the other tests because it relies on webpack and a separate test
runner.
- No longer create web-based webpacks for `core/`

Follow up work:
- Get [packageJSON
properties](https://github.com/aws/aws-toolkit-vscode/blob/46b409c3353ce0dafefb796f5994c1fa88a23b47/packages/core/src/shared/vscode/env.ts#L61-L74)
from `context.extension.packageJSON` instead.
- Cleanup any remaining unneeded tasks in `.vscode/tasks.json`
- Move icons out of `core/package.json`.
- Continue to investigate: can we run web tests from core like other
tests? Toolkit may have a use in web mode one day.

---

<!--- 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.
justinmk3 and others added 2 commits September 30, 2024 14:44
… item (#5699)

## Problem

Command and context menu item for unit test generation was disabled for
internal users before last release. We are ready to enable now.

## Solution

This PR enables the context menu item and commands for unit test
generation.
@aws-toolkit-automation aws-toolkit-automation requested a review from a team as a code owner October 1, 2024 12:20
Hweinstock and others added 9 commits October 1, 2024 09:03
## Problem
The test case here:
https://github.com/aws/aws-toolkit-vscode/blob/359b1d8252a32e064482678110c5931630bd49e0/packages/core/src/test/awsService/ec2/model.test.ts#L132C9-L146C11

This test is unaware of the side-effect that it will attempt to
explicitly delete the keys when generating. Originally, the delete was
conditional on the keys existing in the directory, so this test case was
not a problem since they never existed. However, on windows that check
was faulty, leading to the case where the windows file system reported
that the keys existed, which lead it to attempting to delete the root
directory.

## Solution
- Modify `tryRun` to accept an `onStdOut` optional parameter that lets
us accept the overwrite prompt from `ssh-keygen`.
- Do not explicitly delete the files in the generation function, make
this part of the generation step.

The benefits of this approach are that we moved the side-effects to a
place where they are expected, in the key generation process itself. It
also inherently avoids the potentially faulty check if the key files
exist, as we only use `onStdOut` if when the keys exist.

### Notes
- `packages/core/src/awsService/ec2/sshKeyPair.ts:49` includes `any`
which should be `ChildProcess`. For some reason the import fails in CI,
so I left it as `any`. Refer to `attempt to import child process` commit
for 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.

---------

Co-authored-by: Justin M. Keyes <[email protected]>
## Problem
The issue is here:
https://github.com/aws/aws-toolkit-vscode/blob/9eea1f3700930df79620ef26ff6a43450e593580/packages/core/src/awsService/ec2/explorer/ec2ParentNode.ts#L55-L64
This fires off multiple asynchronous calls on each child, with the
function returning before any are resolved. Thus, the child node could
be deleted from the set after this function returned (potentially when
another piece of code is using it). This leads to `undefined` errors
within that function.
## Solution
Refactor the code to make use of a `for...of` with `await` pattern. 

---

<!--- 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
Changing the permissions of a file is currently not supported by the
file system wrapper.

## Solution
Implement a stub chmod that does nothing on web, and uses `fs` to modify
permissions in non-web environments.

---

<!--- 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
We will rename Application Composer to Infrastructure Composer as our
service name. We need to do the same thing in VSCode toolkit

## Solution
We will rename all user visible things first
make auth container responsive

# Before - The content scales down to 0.6x when the width in less than
260px

https://github.com/user-attachments/assets/d38db517-4734-435f-8100-b6a65d502c75

# After
## Login Screen

https://github.com/user-attachments/assets/17b579e1-003f-42aa-967e-7565e66624f0

## Re-Auth Screen

https://github.com/user-attachments/assets/2cd8754d-6707-4cd4-a250-7b28a0cd7de5



License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
## Description
Updated the legal disclaimer text in the footer of the chat client. This
is done as a clarification of compliant use according to the AWS AI
policy.
We dont need this code anymore

---

<!--- 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]>
## Problem
- withPerformance was an experiment to see if we could correlate
cpu/memory with number of files


## Solution
- Cpu usage/memory usage in the extension host is way too volitile so we
might as well clean up this code


---

<!--- 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
IamPolicyChecks currently has no unit tests. This makes the feature
fragile to changes and at risk to breaking changes.

## Solution
Implement unit tests for IamPolicyChecks feature.
@aws-toolkit-automation aws-toolkit-automation requested a review from a team as a code owner October 2, 2024 16:50
## Problem
We want to avoid fs-extra, and eventually move it to the banned import
list. As a first step, we remove fs-extra with as much of our own
`fs.ts` work, and `fs` when not possible.

## Solution
- Replace `ensureDir` with `mkDir` as suggested here:
https://github.com/jprichardson/node-fs-extra/blob/HEAD/docs/ensureDir.md
- Also `ensureDir` with permissions arg can be `mkDir` with `chmod`
following.
- Replace `move` with `rename` since we aren't using virtual file
system, or crossing disk partitions:
https://stackoverflow.com/questions/8579055/how-do-i-move-files-in-node-js
@aws-toolkit-automation aws-toolkit-automation requested a review from a team as a code owner October 2, 2024 18:04
Hweinstock and others added 13 commits October 2, 2024 15:03
## Problem
There is a test from recent PR that is incorrect given current
structure. Ex.
https://github.com/aws/aws-toolkit-vscode/actions/runs/11149044046/job/30987024464

Using `globals.context.asAbsolutePath` will prepend `toolkit` to the
path, whereas we want to look in `core` for this file.

## Solution
- Manually construct the path to be checked.
## Problem
- `/dev` conversation would got terminated by retry-able errors, since
we disabled the default retry.

## Solution
- Re-enable the default to prevent `/dev` from terminated by
transient/retry-able errors.
…fication (#5696)

## Problem
Product thinks that code percentage event should not consider user
modification

## Solution
use raw accepted token count (without considering modification) for the
percentage field in toolkit telemetry
there is no change to STE

---

<!--- 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.
…5673)

Do not trigger uninstall when extension auto-updates

License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
We have some strings that need to resolve a url depending on c9 vs
toolkit.

The isCloud9() function is causing issues in the constants file. Due to
some sort of module import order, isCloud9() did not resolve
appropriately when expected. I think we used the constants file before
all the dependencies of the isCloud9() function were available

The constants file should be a minimal module with as little external
dependencies as possible.

## Solution:

Move the resolution of c9 vs toolkit docs to an external function.
Update uses everywhere.

---

<!--- 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]>
## Problem
We want to know when the extension crashes. Having telemetry will be
useful.
The problem is that when the extension crashes it is not running anymore
so it cannot report that it crashed.

## Solution
Create a Crash Monitoring mechanism that has all the instances of an
extension (Q/Toolkit) work together to monitor eachother for crashes,
reporting of a crash if it is detected.

To review start with the main file
`packages/core/src/shared/crashMonitoring/crashMonitoring.ts`,
specifically the `CrashMonitoring.start()` method.

There is more information in the docstring of the class.

---

<!--- 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]>
Co-authored-by: Justin M. Keyes <[email protected]>
This reverts commit 0c4289b.

## Problem
Re-adding commit after backend fix 

## Solution
## Problem
- Theres quite a few missues of telemetry.foo.record inside of the
codebase and it can be confusing for external contributors

## Solution
- Clean up the telemetry interface by only allowing record/increment on
spans
andrewyuq and others added 30 commits October 10, 2024 15:51
…ification events (#5766)

1. bring back UserModification SendTelemetryEvent and track
acceptedCharacterCount and unmodifiedAcceptedCharacterCount.
2. combine some latency tracking to the session object

JB PR reference: aws/aws-toolkit-jetbrains#4955 
## Problem


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

Crash monitoring is reporting incorrect crash metrics.
This seems to be due to various filesystem errors such as eperm (even
though we were doing an operation on a file we created), enospc (the
user ran out of space on their machine, and other errors.

Because of this we ran in to situations where our state did not reflect
reality, and due to this certain extension
instances were seen as crashed.

## Solution

- Determine if a filesystem is reliable on a machine (try a bunch of
different filesystem flows and ensure nothing throws), if it is THEN we
start the crash monitoring process. Otherwise we do not run it since we
cannot rely it will be accurate.
- We added a `function_call` metric to allow us to determine the ratio
of successes to failures
- Add retries to critical filesystem operations such as the heartbeats
and deleting a crashed extension instance from the state.
- Other various fixes


---

<!--- 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]>
## Problem
no metrics for notifications.

## Solution
add `toolkit_showNotification` to `showMessage` and use it in
`maybeShowMinVscodeWarning`.


Problem:
When debugging the extension, vscode tends to ignore the log-level that
was set from the `AWS Toolkit Logs` UI.

Solution:
If the dev-mode `aws.dev.logfile` path is configured, log to it at
"debug" log-level regardless of the (initial)
`vscode.LogOutputChannel.logLevel`.
## Problem
In
https://github.com/aws/aws-toolkit-vscode/blob/16aa3684f479566bfcf6a9e33f88e70039831e9a/packages/core/src/test/globalSetup.test.ts#L48,
we use our fs.fs module which accesses globals.isWeb, but globals are not initialized yet.

```
Exception has occurred: Error: ToolkitGlobals accessed before initialize()
  at Object.get (/Volumes/workplace/aws-toolkit-vscode/packages/core/src/shared/extensionGlobals.ts:109:23)
    at FileSystem.get isWeb [as isWeb] (/Volumes/workplace/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:689:24)
    at FileSystem.mkdir (/Volumes/workplace/aws-toolkit-vscode/packages/core/src/shared/fs/fs.ts:94:63)
    at Runner.<anonymous> (/Volumes/workplace/aws-toolkit-vscode/packages/core/src/test/globalSetup.test.ts:48:18)
```

To reproduce, go into master, run any test file individually with
"Extension Tests (current file) (amazonq)".

## Solution
Use node's fs when setting up tests since we must wait for global
context to be initialized to use our fs.
…dates (#5752)

Bumps the npm_and_yarn group with 2 updates in the / directory:
[cookie](https://github.com/jshttp/cookie) and
[express](https://github.com/expressjs/express).

Updates `cookie` from 0.6.0 to 0.7.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jshttp/cookie/releases">cookie's
releases</a>.</em></p>
<blockquote>
<h2>0.7.1</h2>
<p><strong>Fixed</strong></p>
<ul>
<li>Allow leading dot for domain (<a
href="https://redirect.github.com/jshttp/cookie/issues/174">#174</a>)
<ul>
<li>Although not permitted in the spec, some users expect this to work
and user agents ignore the leading dot according to spec</li>
</ul>
</li>
<li>Add fast path for <code>serialize</code> without options, use
<code>obj.hasOwnProperty</code> when parsing (<a
href="https://redirect.github.com/jshttp/cookie/issues/172">#172</a>)</li>
</ul>
<p><a
href="https://github.com/jshttp/cookie/compare/v0.7.0...v0.7.1">https://github.com/jshttp/cookie/compare/v0.7.0...v0.7.1</a></p>
<h2>0.7.0</h2>
<ul>
<li>perf: parse cookies ~10% faster (<a
href="https://redirect.github.com/jshttp/cookie/issues/144">#144</a> by
<a href="https://github.com/kurtextrem"><code>@​kurtextrem</code></a>
and <a
href="https://redirect.github.com/jshttp/cookie/issues/170">#170</a>)</li>
<li>fix: narrow the validation of cookies to match RFC6265 (<a
href="https://redirect.github.com/jshttp/cookie/issues/167">#167</a> by
<a href="https://github.com/bewinsnw"><code>@​bewinsnw</code></a>)</li>
<li>fix: add <code>main</code> to <code>package.json</code> for rspack
(<a href="https://redirect.github.com/jshttp/cookie/issues/166">#166</a>
by <a
href="https://github.com/proudparrot2"><code>@​proudparrot2</code></a>)</li>
</ul>
<p><a
href="https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.0">https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/jshttp/cookie/commit/cf4658f492c5bd96aeaf5693c3500f8495031014"><code>cf4658f</code></a>
0.7.1</li>
<li><a
href="https://github.com/jshttp/cookie/commit/6a8b8f5a49af7897b98ebfb29a1c4955afa3d33e"><code>6a8b8f5</code></a>
Allow leading dot for domain (<a
href="https://redirect.github.com/jshttp/cookie/issues/174">#174</a>)</li>
<li><a
href="https://github.com/jshttp/cookie/commit/58015c0b93de0b63db245cfdc5a108e511a81ad0"><code>58015c0</code></a>
Remove more code and perf wins (<a
href="https://redirect.github.com/jshttp/cookie/issues/172">#172</a>)</li>
<li><a
href="https://github.com/jshttp/cookie/commit/ab057d6c06b94a7b1e3358e69a685ae49c97b627"><code>ab057d6</code></a>
0.7.0</li>
<li><a
href="https://github.com/jshttp/cookie/commit/5f02ca87688481dbcf155e49ca8b61732f30e542"><code>5f02ca8</code></a>
Migrate history to GitHub releases</li>
<li><a
href="https://github.com/jshttp/cookie/commit/a5d591ce8447dd63821779724f96ad3c774c8579"><code>a5d591c</code></a>
Migrate history to GitHub releases</li>
<li><a
href="https://github.com/jshttp/cookie/commit/51968f94b5e820adeceef505539fa193ffe2d105"><code>51968f9</code></a>
Skip isNaN</li>
<li><a
href="https://github.com/jshttp/cookie/commit/9e7ca51ade4b325307eedd6b4dec190983e9e2cc"><code>9e7ca51</code></a>
perf(parse): cache length, return early (<a
href="https://redirect.github.com/jshttp/cookie/issues/144">#144</a>)</li>
<li><a
href="https://github.com/jshttp/cookie/commit/d6f39b0aab5521a8b118b466a515fd6eb0b9f65e"><code>d6f39b0</code></a>
Fix tests for old node</li>
<li><a
href="https://github.com/jshttp/cookie/commit/6bb701f14e59c5e768933bfae9b578db4ed26c6e"><code>6bb701f</code></a>
Remove failing scorecard</li>
<li>Additional commits viewable in <a
href="https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~blakeembrey">blakeembrey</a>, a new
releaser for cookie since your current version.</p>
</details>
<br />

Updates `express` from 4.21.0 to 4.21.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/expressjs/express/releases">express's
releases</a>.</em></p>
<blockquote>
<h2>4.21.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Backport a fix for CVE-2024-47764 to the 4.x branch by <a
href="https://github.com/joshbuker"><code>@​joshbuker</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/6029">expressjs/express#6029</a></li>
<li>Release: 4.21.1 by <a
href="https://github.com/UlisesGascon"><code>@​UlisesGascon</code></a>
in <a
href="https://redirect.github.com/expressjs/express/pull/6031">expressjs/express#6031</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/expressjs/express/compare/4.21.0...4.21.1">https://github.com/expressjs/express/compare/4.21.0...4.21.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/expressjs/express/blob/4.21.1/History.md">express's
changelog</a>.</em></p>
<blockquote>
<h1>4.21.1 / 2024-10-08</h1>
<ul>
<li>Backported a fix for <a
href="https://nvd.nist.gov/vuln/detail/CVE-2024-47764">CVE-2024-47764</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/expressjs/express/commit/8e229f92752ad51462c868b99f6e6c2e559801b0"><code>8e229f9</code></a>
4.21.1</li>
<li><a
href="https://github.com/expressjs/express/commit/a024c8a7b658a178cbdb9bde33030b7500172815"><code>a024c8a</code></a>
fix(deps): [email protected]</li>
<li>See full diff in <a
href="https://github.com/expressjs/express/compare/4.21.0...4.21.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/aws/aws-toolkit-vscode/network/alerts).

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Problem
It's hard to know what certain performance metrics are tracking

## Solution
Add documentation
## Problem
Performance test involve running the same code 10 times, and often its
demanding code. This should live with integ rather than unit tests to
avoid slow down.

## Solution
- Move
https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/test/amazonqFeatureDev/prepareRepoData.test.ts
into integ folder.
- Move
https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/test/codewhisperer/commands/startSecurityScan.test.ts
into integ folder.
## Problem
Follow up to: #5698
Fix: #5750

### First Problem Identified
The current tests in
https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/awsService/ec2/explorer/ec2ParentNode.ts
do not clear the `PollingSet` in between tests, therefore the timer
continues to run. This not only results in inconsistent state between
the items in the `PollingSet` and the items stored on the parent node
itself, but also allows the `PollingSet` action to trigger unexpectedly
in the middle of another test. When this happens, and the states don't
match, the `instanceId` from the `PollingSet` could potentially not be
found on the parent node, resulting in an undefined node. Then, calling
`updateStatus` on this node could explain the error.

For this error to happen, the `PollingSet` timer must trigger at a very
specific point (in the middle of another test), making it difficult to
debug and reproduce, and causing occasional flaky test failures.

### Second Problem Identified
The tests in
https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/awsService/ec2/explorer/ec2InstanceNode.ts
setup an unnatural state. The `testNode` sets its parent to the
`testParentNode`, but `testParentNode` is unaware this child exists.
This is problematic because when the child reports its status as pending
to the parent, the parent will throw an error since it can't find the
child. (example:
https://d1ihu6zq92vp9p.cloudfront.net/7b1e96c7-f2b7-4a8e-927c-b7aa84437960/report.html)
This type of state should not be allowed.
## Solution
### Solution to first problem
- clear the set, and the timer in-between each test. 

### Solution to second problem 
- make this confusing state impossible by adding the child to the parent
and parent to the child together.
- stub the resulting API call its makes. 
- Disable the polling set timer in the second tests (via sinon stubbing)
since it isn't relevant to what's being tested.

### Tangential Work included in PR:
- Throw our own error when an `instanceId` is not in map on the
parentNode. This will make it easier to catch if something goes wrong.
- Clean up test file:
`src/test/awsService/ec2/explorer/ec2ParentNode.test.ts`.

---

<!--- 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
Continuation of #5670

## Solution
same as previous

---

<!--- 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
continuation of performance test work:
#5670

## Solution
same as previous.
CPU threshold set very high because it spikes pretty wildly on this one.

![image](https://github.com/user-attachments/assets/cc8a6ce9-1be1-4504-b4de-cbafd1241016)


---

<!--- 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.
…hieve. (#5710)

## Problem
Continuation of work here:
#5670

## Solution
In this case `downloadExportResultArchieve` is reading a large
collection of objects into a buffer, then writing that buffer to a file.
We test this with varying collections of objects. We test 1x1KB,
10x100B, 100x10B, and 1000x1B.

---

<!--- 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.
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.2 to
3.3.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/prettier/prettier/releases">prettier's
releases</a>.</em></p>
<blockquote>
<h2>3.3.3</h2>
<p>🔗 <a
href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#333">Changelog</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md">prettier's
changelog</a>.</em></p>
<blockquote>
<h1>3.3.3</h1>
<p><a
href="https://github.com/prettier/prettier/compare/3.3.2...3.3.3">diff</a></p>
<h4>Add parentheses for nullish coalescing in ternary (<a
href="https://redirect.github.com/prettier/prettier/pull/16391">#16391</a>
by <a
href="https://github.com/cdignam-segment"><code>@​cdignam-segment</code></a>)</h4>
<p>This change adds clarity to operator precedence.</p>
<!-- raw HTML omitted -->
<pre lang="js"><code>// Input
foo ? bar ?? foo : baz;
foo ?? bar ? a : b;
a ? b : foo ?? bar;
<p>// Prettier 3.3.2<br />
foo ? bar ?? foo : baz;<br />
foo ?? bar ? a : b;<br />
a ? b : foo ?? bar;</p>
<p>// Prettier 3.3.3<br />
foo ? (bar ?? foo) : baz;<br />
(foo ?? bar) ? a : b;<br />
a ? b : (foo ?? bar);<br />
</code></pre></p>
<h4>Add parentheses for decorator expressions (<a
href="https://redirect.github.com/prettier/prettier/pull/16458">#16458</a>
by <a
href="https://github.com/y-schneider"><code>@​y-schneider</code></a>)</h4>
<p>Prevent parentheses around member expressions or tagged template
literals from being removed to follow the stricter parsing rules of
TypeScript 5.5.</p>
<!-- raw HTML omitted -->
<pre lang="ts"><code>// Input
@(foo`tagged template`)
class X {}
<p>// Prettier 3.3.2<br />
<a href="https://github.com/foo"><code>@​foo</code></a><code>tagged
template</code><br />
class X {}</p>
<p>// Prettier 3.3.3<br />
@(foo<code>tagged template</code>)<br />
class X {}<br />
</code></pre></p>
<h4>Support <code>@let</code> declaration syntax (<a
href="https://redirect.github.com/prettier/prettier/pull/16474">#16474</a>
by <a
href="https://github.com/sosukesuzuki"><code>@​sosukesuzuki</code></a>)</h4>
<p>Adds support for Angular v18 <code>@let</code> declaration
syntax.</p>
<p>Please see the following code example. The <code>@let</code>
declaration allows you to define local variables within the
template:</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/prettier/prettier/commit/52829385bcc4d785e58ae2602c0b098a643523c9"><code>5282938</code></a>
Release 3.3.3</li>
<li><a
href="https://github.com/prettier/prettier/commit/9102b73d8cd01795e7ba5af8a476d500c5dbcf2c"><code>9102b73</code></a>
Add parentheses for decorator expressions (<a
href="https://redirect.github.com/prettier/prettier/issues/16458">#16458</a>)</li>
<li><a
href="https://github.com/prettier/prettier/commit/6bbd46194e4db25025afd6fe2f8506a8a2d1e47e"><code>6bbd461</code></a>
chore(deps): update eslint related dependencies (<a
href="https://redirect.github.com/prettier/prettier/issues/16478">#16478</a>)</li>
<li><a
href="https://github.com/prettier/prettier/commit/04b560fc4386ee2ba1fc7c611c7a78655d6e60da"><code>04b560f</code></a>
chore(deps): update dependency browserslist to v4.23.2 (<a
href="https://redirect.github.com/prettier/prettier/issues/16475">#16475</a>)</li>
<li><a
href="https://github.com/prettier/prettier/commit/614f070ac5f8d30628cc6cbbca1dda0e080e41d9"><code>614f070</code></a>
chore(deps): update typescript-eslint to v8.0.0-alpha.41 (<a
href="https://redirect.github.com/prettier/prettier/issues/16477">#16477</a>)</li>
<li><a
href="https://github.com/prettier/prettier/commit/d59a15ded901c6dd66c07cf508e14646a6f12cd9"><code>d59a15d</code></a>
chore(deps): update dependency npm-run-all2 to v6.2.2 (<a
href="https://redirect.github.com/prettier/prettier/issues/16476">#16476</a>)</li>
<li><a
href="https://github.com/prettier/prettier/commit/5ca2fc9be8369bf8c96899e2e5e8f3264086645a"><code>5ca2fc9</code></a>
Support Angular <code>@let</code> declaration syntax (<a
href="https://redirect.github.com/prettier/prettier/issues/16474">#16474</a>)</li>
<li><a
href="https://github.com/prettier/prettier/commit/bfcfdccdf892141ce9cfbc179493557157c24e4c"><code>bfcfdcc</code></a>
chore(deps): update babel to v7.24.8 (<a
href="https://redirect.github.com/prettier/prettier/issues/16472">#16472</a>)</li>
<li><a
href="https://github.com/prettier/prettier/commit/977c161924efa328660fe1802b604de2bc2527ea"><code>977c161</code></a>
chore(deps): update dependency acorn to v8.12.1 (<a
href="https://redirect.github.com/prettier/prettier/issues/16464">#16464</a>)</li>
<li><a
href="https://github.com/prettier/prettier/commit/550606edf9f3c2e2d2c75f37f627c42030de34a3"><code>550606e</code></a>
chore(deps): update babel to v7.24.8 (<a
href="https://redirect.github.com/prettier/prettier/issues/16470">#16470</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/prettier/prettier/compare/3.3.2...3.3.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prettier&package-manager=npm_and_yarn&previous-version=3.3.2&new-version=3.3.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maxim Hayes <[email protected]>
## Problem
- Static `errorName` is unnecessary in feature dev error classes. It
also causes error code mismatches some of errorName which result in
wrong state.

## Solution
- Remove `errorName` from error classes
- use class name match to ensure error handled correctly.
- Add unit tests to cover all the error cases.
#5788

## Problem:

This test was flaky due to the event emitter and the test expecting 2 of
the same event to come in, but sometimes the second one was not capture.

This looks to be due to the second `captureEventOnce` call needing to do
some initial setup before it could capture an event. And I think there
was a race condition between it being setup in time and the event being
emitted before it could start listening.

## Solution:

Make a new function which does the event capture once and then listens N
amount of times. This is reliable.
…opyAtClipboard #5768

## Problem
- Client side telemetry event `interactWithMessage` is missing
`cwsprChatProgrammingLanguage` parameter which helps to understand the
language of generated code.

## Solution
- Added `cwsprChatProgrammingLanguage` parameter for insertAtCursor and
CopyAtClipboard events.
- No Test cases were added in this PR.
- Added `extractCodeBlockLanguage` function as current UTG Sync API
sends python and java in the first chunk of generated code but thats the
not case for other languages. To counter this, I am checking entire
response for generated code language and emitting those metrics.
- Added `cwsprChatProgrammingLanguage` in
[commons](https://github.com/aws/aws-toolkit-common) package:
aws/aws-toolkit-common#883
- Added `cwsprChatHasProjectContext and cwsprChatTotalCodeBlocks` in in
[commons](https://github.com/aws/aws-toolkit-common) package:
aws/aws-toolkit-common#884
Bumps
[@types/webpack-env](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack-env)
from 1.18.1 to 1.18.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack-env">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/webpack-env&package-manager=npm_and_yarn&previous-version=1.18.1&new-version=1.18.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Problem
https://github.com/aws/aws-toolkit-vscode/blob/0164d4145e58ae036ddf3815455ea12a159d491d/packages/core/src/test/shared/credentials/userCredentialsUtils.test.ts#L38-L39

This test is deleting my actual aws config file.

## Solution
Update the environment variable to point to a fake location before test
Then recover them after test
## Problem
Eliminate fs-extra from the codebase.

## Solution
We can use `fs.cp` since node v16.7.0+.
Note that `overwrite` is now `force` based on
https://nodejs.org/api/fs.html#fscpsyncsrc-dest-options

Bump the dependency @types/node to avoid casting (fs as any).
## Problem:

When a user does a sleep then wake of their computer, the heartbeat is
not up to date since it cannot be sent when the user's computer is
asleep.

Due to this there is a race condition on wake between the next fresh
heartbeat being sent versus when we check the heartbeats to determine if
they are stale (crash). If the crash checker runs before a new heartbeat
can be sent, it will be seen as a crash.

## Solution:

Use a TimeLag class that helps to determine when there is a time
discrepancy. It works by updating a state every second, and if we
determine that the next update to that state took longer than a second,
we determine that there was a lag. Then we simply skip the next crash
check, allowing a fresh heartbeat to be sent.

---

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