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

#137: Extracted common code for virtual schema based extensions #139

Merged
merged 31 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a0a013c
Increment version & upgrade dependencies
kaklakariada Oct 20, 2023
285c685
Upgrade extension dependencies
kaklakariada Oct 20, 2023
21c115e
Extract common code for VS extensions
kaklakariada Oct 30, 2023
fa07b53
Increment version
kaklakariada Oct 30, 2023
5121daf
Revert changes to previous changelog
kaklakariada Oct 30, 2023
5ddd62e
Update references
kaklakariada Oct 31, 2023
da61a1d
Upgrade dependencies
kaklakariada Oct 31, 2023
432ea65
#137: Migrate to base extension
kaklakariada Oct 31, 2023
3c3d18b
Adapt tests, delete unused code
kaklakariada Oct 31, 2023
d51e9fd
#137: Remove unused code
kaklakariada Nov 2, 2023
4a9d2b0
Update changelog
kaklakariada Nov 2, 2023
a75edd5
Remove unwanted system property
kaklakariada Nov 2, 2023
42e51de
Upgrade to Go 1.20
kaklakariada Nov 2, 2023
5a5821b
Adapt to updated interface
kaklakariada Nov 2, 2023
d1a20ae
Adapt test to base extension
kaklakariada Nov 2, 2023
920ac7d
Add CI test with Exasol 8
kaklakariada Nov 3, 2023
1e7bd0c
Upgrade dependencies
kaklakariada Nov 3, 2023
52ab8f8
Fix EM version
kaklakariada Nov 3, 2023
0f372d9
Upgrade dependencies
kaklakariada Nov 6, 2023
559b0b3
Add tests based on base integration tests
kaklakariada Nov 6, 2023
d142bfa
Migrate integration tests to use new base class
kaklakariada Nov 6, 2023
1b300e9
Rename test classes
kaklakariada Nov 6, 2023
e12afad
Adapt to new interface
kaklakariada Nov 6, 2023
08bf7c0
Use renamed base class
kaklakariada Nov 7, 2023
a13bcbd
Update release date
kaklakariada Nov 7, 2023
85d5f4a
Fix reference check
kaklakariada Nov 7, 2023
c2ad099
Upgrade dependencies
kaklakariada Nov 7, 2023
4ece151
Update classes list
kaklakariada Nov 7, 2023
2d789b8
Deactivate tests broken with Exasol 8
kaklakariada Nov 7, 2023
4af6910
Add test annotations
kaklakariada Nov 7, 2023
a241cad
Update release date
kaklakariada Nov 8, 2023
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
20 changes: 14 additions & 6 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ on:

jobs:
build:
name: Build with Exasol ${{ matrix.exasol_db_version }}
runs-on: ubuntu-20.04 # UDFs fail with "VM error: Internal error: VM crashed" on ubuntu-latest
strategy:
fail-fast: false
matrix:
exasol_db_version: ["7.1.23", "8.23.0"]
env:
DEFAULT_EXASOL_DB_VERSION: "7.1.23"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.exasol_db_version }}
cancel-in-progress: true
steps:
- name: Checkout the repository
Expand All @@ -25,16 +32,16 @@ jobs:
17
11
cache: "maven"
- name: Set up Node 16
- name: Set up Node 18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "npm"
cache-dependency-path: extension/package-lock.json
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: "1.20"
- name: Cache Go modules
uses: actions/cache@v3
with:
Expand All @@ -60,7 +67,8 @@ jobs:
run: |
JAVA_HOME=$JAVA_HOME_11_X64 mvn --batch-mode clean verify \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-DtrimStackTrace=false
-DtrimStackTrace=false \
-Dcom.exasol.dockerdb.image=${{ matrix.exasol_db_version }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -77,7 +85,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Sonar analysis
if: ${{ env.SONAR_TOKEN != null }}
if: ${{ env.SONAR_TOKEN != null && matrix.exasol_db_version == env.DEFAULT_EXASOL_DB_VERSION }}
run: |
JAVA_HOME=$JAVA_HOME_17_X64 mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/dependencies_check.yml

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

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: "1.20"
- name: Enable testcontainer reuse
run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties"
- name: Create test_config.properties
Expand Down
4 changes: 2 additions & 2 deletions dependencies.md

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

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.

54 changes: 54 additions & 0 deletions doc/changes/changes_2.8.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# S3 Document Files Virtual Schema 2.8.3, released 2023-11-07

Code name: Refactoring of Extension

## Summary

This release moves common extension code to `extension-manager-interface` to simplify the extension. We added the following optional parameters to the extension, so you can also use them with Extension Manager:

* `MAX_PARALLEL_UDFS`: Maximum number of UDFs that are executed in parallel
* `DEBUG_ADDRESS`: Network address and port to which to send debug output
* `LOG_LEVEL`: Log level for debug output

## Refactoring

* #137: Moved common extension code to `extension-manager-interface`

## Dependency Updates

### Virtual Schema for Document Data in Files on AWS S3

#### Compile Dependency Updates

* Updated `software.amazon.awssdk:s3:2.21.6` to `2.21.16`

#### Test Dependency Updates

* Updated `com.amazonaws:aws-java-sdk-s3:1.12.572` to `1.12.582`
* Updated `com.exasol:extension-manager-integration-test-java:0.5.3` to `0.5.5`
* Updated `com.exasol:hamcrest-resultset-matcher:1.6.1` to `1.6.2`
* Updated `nl.jqno.equalsverifier:equalsverifier:3.15.2` to `3.15.3`
* Updated `org.junit.jupiter:junit-jupiter-engine:5.10.0` to `5.10.1`
* Updated `org.junit.jupiter:junit-jupiter-params:5.10.0` to `5.10.1`
* Updated `org.mockito:mockito-core:5.6.0` to `5.7.0`

#### Plugin Dependency Updates

* Updated `com.exasol:project-keeper-maven-plugin:2.9.14` to `2.9.15`
* Updated `org.apache.maven.plugins:maven-clean-plugin:3.3.1` to `3.3.2`

### Extension

#### Compile Dependency Updates

* Updated `@exasol/extension-manager-interface:0.3.0` to `0.4.0`

#### Development Dependency Updates

* Updated `eslint:^8.46.0` to `^8.53.0`
* Updated `@typescript-eslint/parser:^6.3.0` to `^6.9.1`
* Updated `@types/jest:^29.5.3` to `^29.5.7`
* Updated `typescript:^5.1.6` to `^5.2.2`
* Updated `@typescript-eslint/eslint-plugin:^6.3.0` to `^6.9.1`
* Updated `jest:29.6.2` to `29.7.0`
* Updated `esbuild:^0.19.0` to `^0.19.5`
6 changes: 3 additions & 3 deletions doc/hands_on/hands_on.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ For the document Virtual Schemas, and by that also the S3 Virtual Schema, this i
To install the Virtual Schema adapter, download its latest jar from the [releases](https://github.com/exasol/s3-document-files-virtual-schema/releases) and upload to BucketFS:

``` shell script
curl -I -X PUT -T document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar http://w:writepw@<YOUR_DB_IP>:2580/default/
curl -I -X PUT -T document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar http://w:writepw@<YOUR_DB_IP>:2580/default/
```

(If you have never used BucketFS, you can check out [its documentation](https://docs.exasol.com/database_concepts/bucketfs/bucketfs.htm))
Expand All @@ -75,7 +75,7 @@ CREATE SCHEMA ADAPTER;
--/
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.S3_FILES_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar;
/

--/
Expand All @@ -85,7 +85,7 @@ CREATE OR REPLACE JAVA SET SCRIPT ADAPTER.IMPORT_FROM_S3_DOCUMENT_FILES(
CONNECTION_NAME VARCHAR(500))
EMITS(...) AS
%scriptclass com.exasol.adapter.document.UdfEntryPoint;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar;
/
```

Expand Down
6 changes: 3 additions & 3 deletions doc/hands_on/hands_on_parquet.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ For the document Virtual Schemas, and by that also the S3 Virtual Schema, this i
To install the Virtual Schema adapter, download its latest jar from the [releases](https://github.com/exasol/s3-document-files-virtual-schema/releases) and upload to BucketFS:

``` shell script
curl -I -X PUT -T document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar http://w:writepw@<YOUR_DB_IP>:2580/default/
curl -I -X PUT -T document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar http://w:writepw@<YOUR_DB_IP>:2580/default/
```

(If you have never used BucketFS, you can check out [its documentation](https://docs.exasol.com/database_concepts/bucketfs/bucketfs.htm))
Expand All @@ -59,7 +59,7 @@ CREATE SCHEMA ADAPTER;

CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.S3_FILES_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar;
/

CREATE OR REPLACE JAVA SET SCRIPT ADAPTER.IMPORT_FROM_S3_DOCUMENT_FILES(
Expand All @@ -68,7 +68,7 @@ CREATE OR REPLACE JAVA SET SCRIPT ADAPTER.IMPORT_FROM_S3_DOCUMENT_FILES(
CONNECTION_NAME VARCHAR(500))
EMITS(...) AS
%scriptclass com.exasol.adapter.document.UdfEntryPoint;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar;
/
```

Expand Down
8 changes: 4 additions & 4 deletions doc/user_guide/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Next create the Adapter Script:
```sql
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.S3_FILES_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar;
/
```

Expand All @@ -30,7 +30,7 @@ CREATE OR REPLACE JAVA SET SCRIPT ADAPTER.IMPORT_FROM_S3_DOCUMENT_FILES(
CONNECTION_NAME VARCHAR(500))
EMITS(...) AS
%scriptclass com.exasol.adapter.document.UdfEntryPoint;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar;
%jar /buckets/bfsdefault/default/document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar;
/
```

Expand Down Expand Up @@ -77,7 +77,7 @@ In the definitions you have to define the `source` property. For S3, you define

This Virtual Schema adapter automatically detects the type of the document file by the file extension. You can find a list of supported file types and their extensions in the [user guide of the common repository for all file Virtual Schemas](https://github.com/exasol/virtual-schema-common-document-files/blob/main/doc/user_guide/user_guide.md).

### Mapping multiple files
### Mapping Multiple Files

For some file type (for example JSON) each source file contains only a single document. That means, that you have one file for each row in the mapped table. To define mappings for such types, you can use the GLOB syntax. That means, you can use `*` and `?` as wildcards, where `*` matches multiple characters and `?` a single one.

Expand Down Expand Up @@ -126,7 +126,7 @@ In DbVisualizer use exactly this command:
--/
CREATE OR REPLACE JAVA ADAPTER SCRIPT ADAPTER.S3_FILES_ADAPTER AS
%scriptclass com.exasol.adapter.RequestDispatcher;
%jar /buckets/bfsdefault/default/vs/document-files-virtual-schema-dist-7.3.6-s3-2.8.2.jar;
%jar /buckets/bfsdefault/default/vs/document-files-virtual-schema-dist-7.3.6-s3-2.8.3.jar;
/
```

Expand Down
Loading
Loading