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

#54: Check for existing instance before creating a new one #55

Merged
merged 6 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -17,10 +19,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node 18
uses: actions/setup-node@v3
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm ci
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ jobs:
release:
name: Build and release
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: "npm"
registry-url: "https://registry.npmjs.org"
- run: npm ci
Expand Down
18 changes: 9 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.generate.finalModifiers": true
},
"sonarlint.connectedMode.project": {
"connectionId": "exasol",
"projectKey": "@exasol/extension-manager-interface"
}
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.generate.finalModifiers": "explicit",
},
"sonarlint.connectedMode.project": {
"connectionId": "exasol",
"projectKey": "@exasol/extension-manager-interface"
}
}
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,31 @@

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=%40exasol%2Fextension-manager-interface&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=%40exasol%2Fextension-manager-interface)

This is the interface definition for Exasol extensions that can be installed by
the [Exasol extension-manager](https://github.com/exasol/extension-manager/).
This is the interface definition for Exasol extensions that can be installed by the [Exasol extension-manager](https://github.com/exasol/extension-manager/).

## Creating New Extensions

You have the following options for creating a new extensions:

### Generic Interface

The generic extension interface is defined in [src/api.ts](src/api.ts). It is the most flexible option but requires implementing all extension methods from scratch.

Example: [row-level-security-lua](https://github.com/exasol/row-level-security-lua/blob/main/extension/src/extension.ts)

### Java `SCRIPT` Base

The base extension interface for Java `SCRIPT` based extension is defined in [src/base/index.ts](src/base/index.ts). It is useful for extensions that only consist of one or multiple Java `SCRIPT` UDFs and don't use instances.

Example: [cloud-storage-extension](https://github.com/exasol/cloud-storage-extension/blob/main/extension/src/extension.ts)

### Java `VIRTUAL SCHEMA` Base

The base extension interface for Java `VIRTUAL SCHEMA`s is defined in [src/base-vs/index.ts](src/base-vs/index.ts). It is useful for JDBC or document based Virtual Schemas that are based on Java UDFs.

Examples:
* JDBC based: [oracle-virtual-schema](https://github.com/exasol/oracle-virtual-schema/blob/main/extension/src/extension.ts)
* Document based: [s3-document-files-virtual-schema](https://github.com/exasol/s3-document-files-virtual-schema/blob/main/extension/src/extension.ts)

## Additional Information

Expand Down
1 change: 1 addition & 0 deletions doc/changes/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions doc/changes/changes_0.4.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Extension Manager Interface 0.4.2, released 2024-05-07

Code name: Improve error message for existing virtual schema

## Summary

This release checks if a virtual schema already exists with the same name (case-insensitive) before creating a new one. This improves the error message for the user.

The test is case-insensitive because we create a new `CONNECTION` for virtual schemas based on the virtual schema name, and Exasol `CONNECTION` names are also case-insensitive.

## Bugfix

* #54: Improved error handling for creating a virtual schema

## Dependency Updates

### Development Dependency Updates

* Updated `eslint:^8.53.0` to `^8.57.0`
* Updated `@typescript-eslint/parser:^6.10.0` to `^7.8.0`
* Updated `ts-jest:^29.1.1` to `^29.1.2`
* Updated `typescript:5.2.2` to `5.4.5`
* Updated `@typescript-eslint/eslint-plugin:^6.10.0` to `^7.8.0`
* Updated `ts-node:^10.9.1` to `^10.9.2`
Loading
Loading