Skip to content

Commit

Permalink
Merge pull request #9 from KnowItAllAus/update-vertica-driver
Browse files Browse the repository at this point in the history
Update vertica driver
  • Loading branch information
timbrownls20 committed Sep 16, 2024
2 parents 04334c0 + 2c81b0d commit 8672648
Show file tree
Hide file tree
Showing 1,538 changed files with 185,104 additions and 96,933 deletions.
9 changes: 6 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
!rust/cubestore/bin
!rust/cubesql/package.json

# Ignoring builds for native from local machime to protect a problem with different architecture
packages/cubejs-backend-native/index.node
packages/cubejs-backend-native/native/
# Caches
packages/cubejs-backend-native/target
packages/*/node_modules/
packages/*/dist/
packages/*/coverage/
# Other
packages/cubejs-server-core/playground/
packages/cubejs-serverless
packages/cubejs-serverless-aws
packages/cubejs-serverless-google
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.rs]
indent_size = 4
4 changes: 2 additions & 2 deletions .github/actions/init-ci/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ runs:
using: "composite"
steps:
- name: Use Node.js ${{ inputs.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node }}
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
Expand Down
2 changes: 2 additions & 0 deletions .github/buildkitd.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[worker.oci]
max-parallelism = 1
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ updates:
directory: "/packages"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/examples"
schedule:
interval: "monthly"
labels: [ ]
ignore:
- dependency-name: "*"
2 changes: 1 addition & 1 deletion .github/label-actions.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"help wanted":
comment: |
If you are interested in working on this issue, please provide go ahead and provide PR for that.
If you are interested in working on this issue, please go ahead and provide PR for that.
We'd be happy to review it and merge it.
If this is the first time you are contributing a Pull Request to Cube, please check our [contribution guidelines](https://github.com/cube-js/cube/blob/master/CONTRIBUTING.md).
You can also post any questions while contributing in the #contributors channel in the [Cube Slack](https://slack.cube.dev/).
26 changes: 9 additions & 17 deletions .github/workflows/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
- 'packages/cubejs-base-driver/**'
- 'packages/cubejs-query-orchestrator/**'
- 'packages/cubejs-schema-compiler/**'
- 'packages/cubejs-backend-shared/**'
- 'packages/cubejs-server-core/**'
# drivers
- 'packages/cubejs-athena-driver/**'
- 'packages/cubejs-bigquery-driver/**'
Expand All @@ -35,11 +37,11 @@ jobs:
- id: git-log
run: git log HEAD~30..HEAD
- id: get-tag-test
run: echo "$SHA $(git rev-list -n 1 $(git tag --contains $SHA))"
run: echo "$SHA $(git rev-list -n 1 "$(git tag --contains "$SHA")")"
env:
SHA: ${{ github.sha }}
- id: get-tag
run: echo "::set-output name=sha::$(git rev-list -n 1 $(git tag --contains $SHA))"
run: echo "sha=$(git rev-list -n 1 "$(git tag --contains "$SHA")")" >> "$GITHUB_OUTPUT"
env:
SHA: ${{ github.sha }}
- id: get-tag-out
Expand All @@ -55,40 +57,30 @@ jobs:

strategy:
matrix:
node-version: [ 18.x ]
node-version: [ 20.x ]
db: [ 'athena', 'bigquery', 'snowflake' ]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Disable rustup update (issue workaround for Windows)
run: rustup set auto-self-update disable
if: contains(runner.os, 'windows')
shell: bash
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
shell: bash
- name: Restore yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set Yarn version
run: yarn policies set-version v1.22.19
run: yarn policies set-version v1.22.22
- name: Yarn install
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
- name: Build client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Cross Images
on:
push:
paths:
- '.github/workflows/push-cross-images.yml'
- '.github/workflows/cross-images.yml'
- 'rust/cubestore/cross/**'
branches:
- 'master'
pull_request:
paths:
- '.github/workflows/push-cross-images.yml'
- '.github/workflows/cross-images.yml'
- 'rust/cubestore/cross/**'

jobs:
Expand All @@ -33,22 +33,20 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: v0.9.1
driver-opts: network=host
- name: Load .cross file
uses: xom9ikk/dotenv@v2
buildkitd-config: .github/buildkitd.toml
- name: Build & push (base images)
uses: docker/bake-action@v5
with:
path: rust/cubestore/cross/
- name: Push to Docker Hub
uses: docker/build-push-action@v3
workdir: ./rust/cubestore/cross
targets: ${{ matrix.target }}
push: ${{ github.ref == 'refs/heads/master' }}
- name: Build & push (with python)
if: ${{ matrix.target != 'x86_64-unknown-linux-musl' }}
uses: docker/bake-action@v5
with:
context: ./
file: ./rust/cubestore/cross/${{ matrix.target }}.Dockerfile
platforms: linux/amd64
workdir: ./rust/cubestore/cross
targets: ${{ matrix.target }}-python
push: ${{ github.ref == 'refs/heads/master' }}
tags: cubejs/rust-cross:${{ matrix.target }},cubejs/rust-cross:${{ matrix.target }}-${{ env.CROSS_VERSION }}
111 changes: 50 additions & 61 deletions .github/workflows/drivers-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ on:
- 'packages/cubejs-testing-drivers/**'
- 'packages/cubejs-testing-shared/**'
- 'packages/cubejs-query-orchestrator/src/**'
- 'packages/cubejs-backend-shared/**'
- 'packages/cubejs-server-core/**'
- 'packages/cubejs-schema-compiler/**'

- 'packages/cubejs-base-driver/src/**'
- 'packages/cubejs-jdbc-driver/src/**'

- 'packages/cubejs-athena-driver/**'
- 'packages/cubejs-bigquery-driver/**'
- 'packages/cubejs-clickhouse-driver/**'
- 'packages/cubejs-databricks-jdbc-driver/**'
- 'packages/cubejs-mssql-driver/**'
Expand All @@ -31,10 +35,14 @@ on:
- 'packages/cubejs-testing-drivers/**'
- 'packages/cubejs-testing-shared/**'
- 'packages/cubejs-query-orchestrator/src/**'
- 'packages/cubejs-backend-shared/**'
- 'packages/cubejs-server-core/**'
- 'packages/cubejs-schema-compiler/**'

- 'packages/cubejs-base-driver/src/**'
- 'packages/cubejs-jdbc-driver/src/**'

- 'packages/cubejs-athena-driver/**'
- 'packages/cubejs-bigquery-driver/**'
- 'packages/cubejs-clickhouse-driver/**'
- 'packages/cubejs-databricks-jdbc-driver/**'
- 'packages/cubejs-mssql-driver/**'
Expand All @@ -58,11 +66,11 @@ jobs:
- id: git-log
run: git log HEAD~30..HEAD
- id: get-tag-test
run: echo "$SHA $(git rev-list -n 1 $(git tag --contains $SHA))"
run: echo "$SHA $(git rev-list -n 1 "$(git tag --contains "$SHA")")"
env:
SHA: ${{ github.sha }}
- id: get-tag
run: echo "::set-output name=sha::$(git rev-list -n 1 $(git tag --contains $SHA))"
run: echo "sha=$(git rev-list -n 1 "$(git tag --contains "$SHA")")" >> "$GITHUB_OUTPUT"
env:
SHA: ${{ github.sha }}
- id: get-tag-out
Expand All @@ -76,64 +84,47 @@ jobs:
name: Build native Linux ${{ matrix.node-version }} ${{ matrix.target }} Python ${{ matrix.python-version }}
strategy:
matrix:
node-version: [ 16 ]
node-version: [ 20 ]
python-version: [ "fallback" ]
target: [ "x86_64-unknown-linux-gnu" ]
fail-fast: false
container:
image: cubejs/rust-cross:${{ matrix.target }}-30052023
image: cubejs/rust-cross:${{ matrix.target }}-15082024

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-12-13
override: true
toolchain: nightly-2024-07-15
# override: true # this is by default on
rustflags: ""
components: rustfmt
target: ${{ matrix.target }}
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install -g yarn
- name: Set Yarn version
run: yarn policies set-version v1.22.19
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
shell: bash
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Copy yarn.lock file
run: cp yarn.lock packages/cubejs-docker
- name: Yarn install
uses: nick-invision/retry@v2
env:
CUBESTORE_SKIP_POST_INSTALL: true
run: yarn policies set-version v1.22.22
- name: Install cargo-cp-artifact
run: npm install -g [email protected]
- uses: Swatinem/rust-cache@v2
with:
max_attempts: 3
retry_on: error
retry_wait_seconds: 15
timeout_minutes: 20
command: yarn install --frozen-lockfile
- name: Compile TypeScript
run: yarn tsc
workspaces: ./packages/cubejs-backend-native
key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
shared-key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
- name: Build native (fallback)
if: (matrix.python-version == 'fallback')
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
run: cd packages/cubejs-backend-native && npm run native:build-release
- name: Setup cross compilation
if: (matrix.target == 'aarch64-unknown-linux-gnu')
uses: allenevans/set-env@v3.0.0
uses: allenevans/set-env@v4.0.0
with:
PYO3_CROSS_PYTHON_VERSION: ${{ matrix.python-version }}
- name: Build native (with Python)
Expand Down Expand Up @@ -163,23 +154,15 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

uses: docker/setup-qemu-action@v3
- name: Download native build
uses: actions/download-artifact@v4
with:
name: backend-native
path: packages/cubejs-backend-native/

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.10.3

- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
file: ./packages/cubejs-docker/testing-drivers.Dockerfile
Expand All @@ -193,8 +176,8 @@ jobs:
if: (needs['latest-tag-sha'].outputs.sha != github.sha)
strategy:
matrix:
node:
- 18.x
node:
- 20.x
database:
- athena
- bigquery
Expand All @@ -211,23 +194,29 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-06-22
override: true
components: rustfmt

- name: Install Node.js 18.x
uses: actions/setup-node@v3
- name: Install Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x

- name: Configure `yarn`
run: yarn policies set-version v1.22.19
run: yarn policies set-version v1.22.22

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
shell: bash
- name: Restore yarn cache
# We don't want to save it on finish, restore only!
uses: actions/cache/restore@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
uses: nick-invision/retry@v2
uses: nick-fields/retry@v3
env:
CUBESTORE_SKIP_POST_INSTALL: true
with:
Expand Down Expand Up @@ -269,4 +258,4 @@ jobs:
run: |
cd ./packages/cubejs-testing-drivers
export DEBUG=testcontainers
yarn ${{ matrix.database }}-full
yarn ${{ matrix.database }}-full
Loading

0 comments on commit 8672648

Please sign in to comment.