Skip to content

Commit

Permalink
merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmel committed Apr 26, 2024
2 parents 7b0f5b5 + c0c311b commit 85c4bdb
Show file tree
Hide file tree
Showing 72 changed files with 5,322 additions and 3,461 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- dev
- main
paths-ignore: ["**/*.md"]

jobs:
test:
Expand All @@ -19,9 +20,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
- run: npm ci
- run: xvfb-run -a npm run coverage
if: runner.os == 'Linux'
Expand Down Expand Up @@ -54,6 +55,7 @@ jobs:

app-sec:
needs: test
if: "! github.event.pull_request.head.repo.fork "
uses: ./.github/workflows/app-sec-template.yml
with:
github_ref: ${{ github.ref_name }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/prod_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: KX VS Code Production Release Workflow
on:
push:
tags:
- "v[129].[0-9]+.[0-9]+"
- "v[0-9].[0-9]+.[0-9]+"

env:
NODE_ENV: production
Expand All @@ -13,13 +13,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
- name: Install dependencies
run: npm ci --include=dev
- name: Build VSIX file
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
VERSION=${{ github.ref_name }}
echo "run_tag=$(echo ${VERSION:1})" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download VSIX file from build job
Expand Down Expand Up @@ -88,25 +88,25 @@ jobs:
asset_name: kdb-${{ steps.vars.outputs.run_tag }}.vsix
asset_content_type: application/octet-stream

manual-approve:
manual-approval:
needs: release
environment:
name: manual-approval
runs-on: ubuntu-latest
steps:
- name: Manual Approve
- name: Manual Approval
run: echo "Manually approved"

publish:
needs: manual-approve
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"cSpell.words": ["klaw", "picomatch"],
"[antlr]": {
"editor.defaultFormatter": "mike-lischke.vscode-antlr4"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
}
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

All notable changes to the kdb extension will be documented in this file.

# v1.4.0

### Enhancements

- Changed the workflow of adding new connections to improve the experience of new users

### Fixes

- Previously when running code without an active q connection nothing took place, now an error message is displayed
- KDB Results tab now supports display the result of a scan operation
- Using the query panel to re-run the query will now show the new results
- Corrected issues with linter warnings about undeclared variables, and declared variables not being used as parameters
- Connections must now have unique names
- Unprojected function assignments are now displayed in output
- The limitation of 64 characters for the server name has been increased to 2048
- "temporality" parameter of getData API in kdb Insights has been updated
- MacOS keyboard shortcut documentation has been updated
- Issues with the colorization of comments have been fixed


# v1.3.0

### Enhancements
Expand Down
80 changes: 40 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,91 +91,91 @@ To finish, a prompt is offered with an opt-in to receive a newsletter.

## Connections

The kdb VS Code extension allows you to connect VS Code to a q process; this can be remote, referred to as an [**unmanaged q session**](#unmanaged-q-session) or a [**managed q session**](#managed-q-session), which uses the q installed as part of the kdb VS Code extension installation. It runs a child q process from within the extension and is fully managed by the extension. Only one connection can be active at any given time.
The kdb VS Code extension allows you to connect VS Code to a q process; this can be remote, referred to as an [**unmanaged q session**](#my-q) or a [**managed q session**](#bundled-q), which uses the q installed as part of the kdb VS Code extension installation. It runs a child q process from within the extension and is fully managed by the extension. Only one connection can be active at any given time.

### Unmanaged q session
### Bundled q

**Step 1**: Identify the remote location of a running process. The hostname and port will be required along with any authentication information.
This runs a q session using the existing kdb installed as part of the kdb VS Code extension.

**Step 2**: Within the kdb VS Code extension, click _connect to kdb server_, or *Add new connection\*\* from the *CONNECTIONS\* context menu.
**Step 1**: Click _connect to kdb server_ or _Add new connection_ from the _CONNECTIONS_ context menu.

![connecttoakdbserver](https://github.com/KxSystems/kx-vscode/blob/main/img/connecttoakdbserver.png?raw=true)

**Step 3**: When prompted to select the kdb type, choose **Enter a kdb endpoint**.
**Step 2**: A new window will open with the type of connection you desire to add, **Select Bundled q**.

![setendpoint](https://github.com/KxSystems/kx-vscode/blob/main/img/step1connecttoakdbserver.jpg?raw=true)
![setendpoint](https://github.com/KxSystems/kx-vscode/blob/main/img/bundleqform.png?raw=true)

**Step 4**: Assign a _server name / alias_. The server name selected **cannot be `local` or `insights`**, as these are reserved for use by [managed q sessions](#managed-q-session) and [kdb Insights Enterprise connections](#kdb-insights-enterprise); e.g. _dev_
**Step 3**: The _server name / alias_ will already be set as `local`.

**Step 5**: Set the _hostname_ or ip address of the kdb server; e.g. _localhost_.
**Step 4**: The _connection address_ will be already be set as `127.0.0.1` which corresponds to your _localhost_

**Step 6**: Set the _port_ used by the kdb server; e.g. _5001_.
**Step 5**: Set the _port_ for the kdb server. Ensure the port used doesn't conflict with any other running q process; e.g. _5002_

- I want to learn more about [setting a q port](https://code.kx.com/q/basics/ipc/)

Upon completion, the localhost connection appears under _KX:CONNECTIONS_ in the left hand panel.

![localkdbconnection](https://github.com/KxSystems/kx-vscode/blob/main/img/localkdbconnection.jpg?raw=true)

**Step 7**: Right-click the connection to _connect kdb server_. Ensure the q process is running.
**Step 6**: Click **Create connection** to confirm the _connection creation_

![localkdbconnection](https://github.com/KxSystems/kx-vscode/blob/main/img/connectserver.jpg?raw=true)
**Step 7**: Right-click the q bundled process listed under _KX:CONNECTIONS_, and click _Start q process_.

If authentication is required to access the connection, from the connection dropdown menu, add the required _username_ and the _password_, clicking Enter to move between the two.
![setendpoint](https://github.com/KxSystems/kx-vscode/blob/main/img/managedqprocess.jpg?raw=true)

From the connection dropdown menu there is also an option to enable TLS encryption; the default is _false_.
**Step 8**: From the same right-click menu, click _Connect kdb server_. This connects to the child q process running inside the kdb VS Code extension.

- I want to learn more [about TLS encryption](https://code.kx.com/q/kb/ssl/).
If you close the extension, the connection to the child q process also closes.

### Managed q session
### My q

This runs a q session using the existing kdb installed as part of the kdb VS Code extension.
**Step 1**: Identify the remote location of a running process. The hostname and port will be required along with any authentication information.

**Step 1**: Click _connect to kdb server_ or _Add new connection_ from the _CONNECTIONS_ context menu.
**Step 2**: Within the kdb VS Code extension, click _connect to kdb server_, or *Add new connection\*\* from the *CONNECTIONS\* context menu.

![connecttoakdbserver](https://github.com/KxSystems/kx-vscode/blob/main/img/connecttoakdbserver.png?raw=true)

**Step 2**: When prompted to select the kdb type, choose **Enter a kdb endpoint**.
**Step 3**: A new window will open with the type of connection you desire to add, **Select My q**.

![setendpoint](https://github.com/KxSystems/kx-vscode/blob/main/img/step1connecttoakdbserver.jpg?raw=true)
![setendpoint](https://github.com/KxSystems/kx-vscode/blob/main/img/myq.png?raw=true)

**Step 3**: Set the _server name / alias_ to `local`.
**Step 4**: Assign a _server name / alias_. The server name selected **cannot be `local` or `insights`**, as these are reserved for use by [Bundled q connections](#bundled-q) and [Insights connections](#insights-connection), respectively; e.g. dev

**Step 4**: Set the _hostname_; e.g. _localhost_
**Step 5**: Set the _connection address_ or ip address of the kdb server; e.g. _localhost_.

**Step 5**: Set the _port_ for the kdb server. Ensure the port used doesn't conflict with any other running q process; e.g. _5002_
**Step 6**: Set the _port_ used by the kdb server; e.g. _5001_.

- I want to learn more about [setting a q port](https://code.kx.com/q/basics/ipc/)

**Step 6**: Right-click the managed q process listed under _KX:CONNECTIONS_, and click _Start q process_.
**Step 7**: If authentication is needed, fill in the username and password fields, otherwise, leave these fields **blank**

![setendpoint](https://github.com/KxSystems/kx-vscode/blob/main/img/managedqprocess.jpg?raw=true)
**Step 8**: If TLS is enabled, check the checkbox.

**Step 7**: From the same right-click menu, click _Connect kdb server_. This connects to the child q process running inside the kdb VS Code extension.
- I want to learn more [about TLS encryption](https://code.kx.com/q/kb/ssl/).

If you close the extension, the connection to the child q process also closes.
**Step 9**: Click **Create connection** to confirm the _connection creation_

### kdb Insights Enterprise
Upon completion, the localhost connection appears under _KX:CONNECTIONS_ in the left hand panel.

### Insights Connection

For kdb Insights Enterprise, the kdb VS Code extension is using a shared kdb process. Unlike for a **managed q session**, you must have [kdb Insights Enterprise Personal Edition](https://trykdb.kx.com/kx/signup) running before using these connections.

**Step 1**: Click _connect to kdb server_.

![connecttoakdbserver](https://github.com/KxSystems/kx-vscode/blob/main/img/connecttoakdbserver.png?raw=true)

**Step 2**: When prompted to select a kdb type, choose _Connect to kdb insights_
**Step 2**: A new window will open with the type of connection you desire to add, **Select Insights connection**.

![connecttoinsights](https://github.com/KxSystems/kx-vscode/blob/main/img/connecttoinsights.jpg?raw=true)
![connecttoinsights](https://github.com/KxSystems/kx-vscode/blob/main/img/insightsconnection.png?raw=true)

**Step 3**: Create a _server name / alias_; this can be any name, aside from `local`, which is used by the [managed q session](#managed-q-session).
**Step 3**: Create a _server name / alias_; this can be any name, aside from `local`, which is used by [Bundled q connection](#bundled-q).

**Step 4**: Set the _hostname_. This is the remote address of your kdb Insights Enterprise deployment: e.g `https://mykdbinsights.cloudapp.azure.com`

**Step 5**: The kdb Insights Enterprise connection is listed under _KX:Connections_, with its own icon. Right-click the connection and _Connect to Insights_
**Step 5**: Click **Create connection** to confirm the _connection creation_

**Step 6**: The kdb Insights Enterprise connection is listed under _KX:Connections_, with its own icon. Right-click the connection and _Connect to Insights_

![connecttoinsights](https://github.com/KxSystems/kx-vscode/blob/main/img/kdbinsightsconnection.jpg?raw=true)

**Step 6**: The kdb VS Code extension runs an authentication step with the remote kdb Insights Enterprise process; sign-in to kdb Insights Enterprise.
**Step 7**: The kdb VS Code extension runs an authentication step with the remote kdb Insights Enterprise process; sign-in to kdb Insights Enterprise.

![authenticateinsights](https://github.com/KxSystems/kx-vscode/blob/main/img/insightsauthenticate.jpg?raw=true)

Expand Down Expand Up @@ -403,8 +403,8 @@ To update kdb VS Code settings, search for `kdb` from _Preferences_ > _Settings_
| F12 | Go to definition |
| Shift + F12 | Go to references |
| Ctrl + Shift + F12 | Find all references |
| Ctrl + Q | Execute current selection |
| Ctrl + Shift + Q | Execute entire file |
| Ctrl + D | Execute current selection |
| Ctrl + Shift + D | Execute entire file |
| Ctrl + Shift + R | Run q file in new q instance |

### For MacOS
Expand All @@ -414,6 +414,6 @@ To update kdb VS Code settings, search for `kdb` from _Preferences_ > _Settings_
| F12 | Go to definition |
| Shift + F12 | Go to references |
| ⌘ + Shift + F12 | Find all references |
| ⌘ + Q | Execute current selection |
| ⌘ + Shift + Q | Execute entire file |
| ⌘ + D | Execute current selection |
| ⌘ + Shift + D | Execute entire file |
| ⌘ + Shift + R | Run q file in new q instance |
Loading

0 comments on commit 85c4bdb

Please sign in to comment.