You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/TESTPLAN.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,8 +45,7 @@ The test suite has the following categories of tests:
45
45
46
46
## Test files
47
47
48
-
Currently, most if not all testing code lives in the subproject `packages/core/`.
49
-
For more information, see [arch_develop.md](./arch_develop.md#monorepo-structure)
48
+
Currently, most testing code lives in the subproject `packages/core/` due to the move to monorepo. See [arch_develop.md](./arch_develop.md#monorepo-structure).
50
49
51
50
-`src/test/` : unit tests
52
51
-`src/test/globalSetup.test.ts` :
@@ -60,6 +59,8 @@ For more information, see [arch_develop.md](./arch_develop.md#monorepo-structure
60
59
-`.vscode/launch.json` : defines VSCode launch configs useful for Toolkit
61
60
developers, e.g. the `Extension Tests` config runs all tests in `src/test/`.
62
61
62
+
Many tests required running in an activated extension environment, but the core-lib is just a library and does not have any extension to activate itself. Core-lib tests are run from `packages/toolkit`, and web tests are run from `packages/amazonq`.
63
+
63
64
## How we test
64
65
65
66
VSCode documentation describes an [extension testing](https://code.visualstudio.com/api/working-with-extensions/testing-extension)
Copy file name to clipboardExpand all lines: docs/arch_develop.md
+2-18Lines changed: 2 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ If you are considering contributing, please consider whether your implementation
23
23
library or in `packages/toolkit`. If your work could be re-used by other packages (e.g. auth mechanisms,
24
24
utilities), then it may belong in the core library. If instead you are adding something toolkit specific
25
25
(eg. an integration to a new AWS service in the Explorer Tree), consider putting it in `packages/toolkit`.
26
-
To import from the core library, please export your desired code using `index.ts` files, and add an appropriate `exports` statement
26
+
To import from the core library, please export your desired code using `index.ts` files and add an appropriate `exports` statement
27
27
in `packages/core/package.json`.
28
28
29
29
Unless otherwise stated, the documentation throughout this project is referring to the code and
@@ -51,25 +51,9 @@ Current quirks of the current monorepo status that should be resolved/evaluated
51
51
- Pre-release only publishes packages/toolkit extension directly. It should be extended to other added extensions. See [`release.yml`](../.github/workflows/release.yml)
52
52
- VSCode does not support inheriting/extending `.vscode/` settings: https://github.com/microsoft/vscode/issues/15909
53
53
54
-
Additional quirks introduced by creating a core library from the original extension code:
55
-
56
-
- Tests are ran from `packages/core/`
57
-
- Extension runs from `packages/toolkit`
58
-
- Extension tests run from the core lib. Since some of the tests require an extension context/sandbox, we initiate a "fake" extension to run these tests. This is also why there are vscode extension properties in the package.json
59
-
- Some of original extension code (that now lives in `packages/core`) depends on the package.json, specifically the contributes section. This section is very large AND needs to be present in both the core library and toolkit extension package.jsons. The core library code needs access to this section to create types, set up SAM debuggers, etc. The toolkit needs this section during packaging/debugging so that the extension can run in vscode. The short term solution was to creat a [build script](../packages/toolkit/scripts/build/handlePackageJson.ts) to copy necessary fields over to the toolkit extension during packaging and debugging.
60
-
61
54
### Contributes and Settings
62
55
63
-
Some components of the core library depend on the `package.json`s of the extensions. One example of this is compile time checking of the extension's settings values. However, VSCode also requires a complete local `package.json` for the individual extensions during packaging. As a temporary workaround to this, we are using scripts to auto-populate the `package.json`s for the individual extensions from the core `package.json`.
- Moves all Amazon Q related `configuration.properties` to the local `package.json` only, overwriting anything that exists with the same name locally.
71
-
- Does not restore, it is a superset of what exists in `packages/core` for `configuration.properties`.
72
-
- To develop for the Amazon Q extension: add all changes to `packages/amazonq/package.json`, EXCEPT for settings that are references by code in the core library, or settings that already exist in the core `package.json`
56
+
`packages/toolkit/` and `packages/amazonq` have independent extension packageJSON files. They do not rely on `packages/core/package.json`. However, to get typed icons in the core-lib we require a place to store the icon entries. This currently happens in `packages/core/package.json`. See [`icons.md`](./icons.md) for more information.
73
57
74
58
If you are modifying or registering new debuggers in VS Code via the `debuggers` contribution point, you may need to regenerate the [definitions file](../packages/core/src/shared/sam/debugger/awsSamDebugConfiguration.gen.ts). After updating ['toolkit/package.json'](../packages/toolkit/package.json), run `npm run generateConfigurationAttributes -w packages/toolkit`
Copy file name to clipboardExpand all lines: docs/arch_features.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,13 @@ For connecting a new VSCode _terminal_, remote connect works like this:
39
39
1. Toolkit [builds a session-manager-plugin command](https://github.com/aws/aws-toolkit-vscode/blob/c77fc076fd0ed837d077bc0318716b711a2854c8/packages/core/src/ecs/util.ts#L92-L104) and [passes it to a new VSCode Terminal](https://github.com/aws/aws-toolkit-vscode/blob/c77fc076fd0ed837d077bc0318716b711a2854c8/packages/core/src/ecs/commands.ts#L141-L147).
40
40
1. VSCode displays the terminal, so the user can enter shell commands on the remote machine.
41
41
42
+
For EC2 specifically, there are a few additional steps:
43
+
44
+
1. If connecting to EC2 instance via remote window, the toolkit generates temporary SSH keys (30 second lifetime), with the public key sent to the remote instance.
45
+
- Key type is ed25519 if supported, or RSA otherwise.
46
+
1. If insufficient permissions are detected on the attached IAM role, toolkit will prompt to add an inline policy with the necessary actions.
47
+
1. If SSM sessions remain open after closing the window/terminal, the toolkit will terminate them on-shutdown, or when starting another session to the same instance.
48
+
42
49
### Implementation of remote connect
43
50
44
51
These modules show how to use and extend the "remote connect" functionality:
0 commit comments