Skip to content

Commit 7fad125

Browse files
authored
docs: DH-20440: Enterprise e2e contributing docs (#319)
DH-20440: Added some notes on how to run Enterprise e2e tests locally.
1 parent df788df commit 7fad125

1 file changed

Lines changed: 44 additions & 5 deletions

File tree

CONTRIBUTING.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
## Development
44

55
### Deephaven Packages
6+
67
The extension depends on some Deephaven web-client-ui npm packages (`@deephaven/*`). In cases where the dependencies need to be developed as part of extension development, the dependencies can be aliased locally to the location of the web-client-ui packages source code.
78

8-
1. Create a `.env.local` file in the root of this project
9+
1. Create a `.env.local` file in the root of this project
910
1. Set the `DHC_PACKAGES_PATH` env variable to the path of the web-client-ui/packages directory
1011

1112
e.g.
13+
1214
```ini
1315
DHC_PACKAGES_PATH=/path/to/web-client-ui/packages/
1416
```
@@ -44,6 +46,30 @@ To run using `VS Code` debugger:
4446

4547
The `vscode-extension-tester` library uses `Mocha` to run tests. If you need to tweak debugging settings such as test timeout, you can do so in [`e2e-testing/src/mocharcDebug.ts`](./e2e-testing/src/mocharcDebug.ts).
4648

49+
#### Enterprise end-to-end Testing
50+
51+
Enterprise end-to-end tests are not yet integrated into CI builds, but they can be run locally. It is recommended to run them against QA / dev servers before doing extension releases.
52+
53+
Tests can be run by specifying the `--coreplus` flag and pointing to an enterprise server:
54+
55+
```sh
56+
npm run test:e2e -- --coreplus https://my-enterprise-server.com:8123/
57+
```
58+
59+
For release testing:
60+
61+
1. Checkout the appropriate pre-release tag for the pending release.
62+
1. Run `npm install`
63+
1. It is recommended to run against a few different server configurations:
64+
- Server configured with both basic and SAML configs
65+
- Server with basic only config
66+
- Envoy server
67+
- Non-envoy server
68+
- Grizzly server
69+
- Grizzly+ or later server
70+
71+
Some servers satisfy multiple of these cases, so can consolidate test runs.
72+
4773
### Documentation
4874

4975
The `/docs` directory contains the documentation for Deephaven VS Code Extension.
@@ -54,9 +80,10 @@ If any changes were made to docs, you **must** format them before committing cha
5480
npm run docs:start # Start docs server on port 3001 (npm run docs:start -- -p <port>) to run on a different port.
5581
npm run docs:format # Format all docs using dprint.
5682
npm run docs:validate # Validates the docs build and links are valid.
57-
```
83+
```
5884

5985
## VSCE
86+
6087
[vsce](https://github.com/microsoft/vscode-vsce), short for "Visual Studio Code Extensions", is a command-line tool for packaging, publishing and managing `VS Code` extensions. The Deephaven extension calls `vsce` via npm scripts. Note that `vsce package` and `vsce publish` both call the `vscode:prepublish` script.
6188

6289
## Installation from .VSIX
@@ -112,36 +139,44 @@ We create tags for released commits as well as named branches (`vX.X.X-pre` and
112139
See [versioning strategy](#versioning-strategy) for details on our version number scheme.
113140

114141
#### Choosing a Commit
142+
115143
Before publishing, you will need to checkout the commit to be published.
116144

117145
##### Pre-release
118-
This will typically be latest `main`
146+
147+
This will typically be latest `main`
119148

120149
##### Release
150+
121151
Releases should be published from a tagged commit for an existing `pre-release`. e.g. To deploy `v1.0.7-release`, we deploy from the `v1.1.7-pre` tag. Since the `publish.sh` script increments based on the previous release tag, it's important to do a release corresponding to every pre-release to keep things in sequence.
122152

123153
1. Determine what the next release tag will be:
124154

125155
```sh
126156
./scripts/nextreleasetag.sh
127157
```
128-
129-
1. Checkout the corresponding pre-release tag (the minor version should be odd)
158+
159+
1. Checkout the corresponding pre-release tag (the minor version should be odd)
130160

131161
e.g. If the script yields `1.0.7-release`, run
162+
132163
```sh
133164
git checkout v1.1.7-pre
134165
```
135166

136167
#### Verify Package Contents
168+
137169
To verify the package will include what you expect, run:
170+
138171
```sh
139172
npx vsce ls
140173
```
174+
141175
1. If expected content is missing or unexpected content is included, the `.vscodeignore` file will likely need to be updated in a separate PR before doing the release (this should not be common).
142176
1. Optionally run `npm run package:dev` if you want to locally install a `.vsix` for testing before publishing.
143177

144178
#### Publish a New Version
179+
145180
1. Make sure you are in a clean branch whose HEAD points to the commit to publish (see [Choosing a Commit](#choosing-a-commit)).
146181
1. `npm install` to ensure npm packages up to date
147182
1. Make sure you are logged in with `vsce` using a personal access token for a user in the https://dev.azure.com/deephaven-oss/ org. `npx vsce login deephaven`.
@@ -163,6 +198,7 @@ npm run publish
163198
> Note if the publish fails due to an expired token, you can just re-run the appropriate `npx vsce publish` cmd found at the end of the `scripts/publish.sh` file.
164199
165200
#### Release Notes
201+
166202
After a successful pre-release / release, release notes can be created here: https://github.com/deephaven/vscode-deephaven/releases. A branch will have been created for the release. Just leave this as-is. No need to merge or delete.
167203

168204
## PNG Generation
@@ -174,14 +210,17 @@ rsvg-convert -w 128 -h 128 images/dh-logo-128.svg -o images/dh-logo-128.png
174210
```
175211

176212
## Icon Font Generation
213+
177214
The extension uses an icon font generated from SVGs in `@deephaven/icons`. Running the generator requires a local checkout of web-client-ui.
178215

179216
The generator can be run via the following script, where `<path-to-dh-icons-directory>` is the location of `packages/icons/src/icons` in `web-client-ui`.
217+
180218
```sh
181219
npm run icon:gen -- <path-to-dh-icons-directory>
182220
```
183221

184222
The script will automatically copy `icons/dist/dh-icons.woff2` file to the `/assets` folder of the extension, but the contents of `icons/dist/dh/dh-contributes-icons.json` has to be manually copied to the `package.json` `contributes/icons` section.
223+
185224
> Note: All of the icons should be consumed via the `dh-xxx` icon ids, so no code changes should be necessary unless icons have been renamed or removed.
186225
187226
## Implementation Notes

0 commit comments

Comments
 (0)