Skip to content

Commit edba0d2

Browse files
authored
Merge branch 'master' into master
2 parents 6777642 + 6f43138 commit edba0d2

File tree

1,127 files changed

+181335
-193796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,127 files changed

+181335
-193796
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ insert_final_newline = true
1111

1212
[*.rs]
1313
indent_size = 4
14+
15+
[rust/cubesql/cubesql/egraph-debug-template/**/*.{js,jsx,ts,tsx}]
16+
indent_size = 4

.github/ISSUE_TEMPLATE/sql_api_query_issue.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: SQL API Query Issue
33
about: Create a report to help us improve
44
title: ''
5-
labels: ''
5+
labels: 'api:sql'
66
assignees: ''
77

88
---
@@ -13,8 +13,11 @@ Search for `Failed SQL` log message.
1313
**Logical Plan**
1414
Search for `Can't rewrite plan` log message.
1515

16+
**Tool**
17+
Was thethe SQL query above generated by some BI tool or any other tool? Did you write it yourself?
18+
1619
**Version:**
17-
[e.g. 0.4.5]
20+
E.g., v1.1.0.
1821

1922
**Additional context**
2023
Add any other context about the problem here.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
# Debug log for test containers
5+
export DEBUG=testcontainers
6+
7+
echo "::group::Dremio [cloud]"
8+
yarn lerna run --concurrency 1 --stream --no-prefix integration:dremio
9+
10+
echo "::endgroup::"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
# Debug log for test containers
5+
export DEBUG=testcontainers
6+
7+
echo "::group::Firebolt [cloud]"
8+
yarn lerna run --concurrency 1 --stream --no-prefix integration:firebolt
9+
10+
echo "::endgroup::"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
# Debug log for test containers
5+
export DEBUG=testcontainers
6+
7+
export TEST_VERTICA_VERSION=12.0.4-0
8+
9+
echo "::group::Vertica ${TEST_VERTICA_VERSION}"
10+
docker pull vertica/vertica-ce:${TEST_VERTICA_VERSION}
11+
yarn lerna run --concurrency 1 --stream --no-prefix integration:vertica
12+
echo "::endgroup::"

.github/actions/smoke.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,12 @@ echo "::endgroup::"
5555

5656
echo "::group::MongoBI"
5757
yarn lerna run --concurrency 1 --stream --no-prefix smoke:mongobi
58-
echo "::endgroup::"
58+
echo "::endgroup::"
59+
60+
echo "::group::Vertica"
61+
yarn lerna run --concurrency 1 --stream --no-prefix smoke:vertica
62+
echo "::endgroup::"
63+
64+
echo "::group::RBAC"
65+
yarn lerna run --concurrency 1 --stream --no-prefix smoke:rbac
66+
echo "::endgroup::"

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
**Check List**
2-
- [ ] Tests has been run in packages where changes made if available
2+
- [ ] Tests have been run in packages where changes made if available
33
- [ ] Linter has been run for changed code
44
- [ ] Tests for the changes have been added if not covered yet
55
- [ ] Docs have been added / updated if required

.github/workflows/cloud.yml

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ on:
2525
- 'package.json'
2626
- 'yarn.lock'
2727

28+
env:
29+
CUBEJS_TESSERACT_ORCHESTRATOR: true
30+
2831
jobs:
2932
latest-tag-sha:
3033
runs-on: ubuntu-20.04
@@ -59,11 +62,20 @@ jobs:
5962
matrix:
6063
node-version: [ 20.x ]
6164
db: [ 'athena', 'bigquery', 'snowflake' ]
65+
target: [ "x86_64-unknown-linux-gnu" ]
6266
fail-fast: false
6367

6468
steps:
6569
- name: Checkout
6670
uses: actions/checkout@v4
71+
- name: Install Rust
72+
uses: actions-rust-lang/setup-rust-toolchain@v1
73+
with:
74+
toolchain: 1.84.1
75+
# override: true # this is by default on
76+
rustflags: ""
77+
components: rustfmt
78+
target: ${{ matrix.target }}
6779
- name: Install Node.js ${{ matrix.node-version }}
6880
uses: actions/setup-node@v4
6981
with:
@@ -82,17 +94,37 @@ jobs:
8294
- name: Set Yarn version
8395
run: yarn policies set-version v1.22.22
8496
- name: Yarn install
85-
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
86-
- name: Build client
97+
uses: nick-fields/retry@v3
98+
env:
99+
CUBESTORE_SKIP_POST_INSTALL: true
100+
with:
101+
max_attempts: 3
102+
retry_on: error
103+
retry_wait_seconds: 15
104+
timeout_minutes: 20
105+
command: yarn install --frozen-lockfile
106+
- name: Build Core Client libraries
87107
run: yarn build
108+
- name: Build other packages
109+
run: yarn lerna run --concurrency 1 build
110+
env:
111+
NODE_OPTIONS: --max_old_space_size=4096
88112
- name: Lerna tsc
89113
run: yarn tsc
114+
- name: Build cubejs-backend-native (without Python)
115+
run: yarn run native:build-release
116+
working-directory: ./packages/cubejs-backend-native
90117
- name: Run Integration tests for ${{ matrix.db }} matrix
91-
timeout-minutes: 30
118+
uses: nick-fields/retry@v3
119+
with:
120+
max_attempts: 3
121+
retry_on: error
122+
retry_wait_seconds: 15
123+
timeout_minutes: 30
124+
command: ./.github/actions/integration/${{ matrix.db }}.sh
92125
env:
93126
CUBEJS_DB_BQ_CREDENTIALS: ${{ secrets.CUBEJS_DB_BQ_CREDENTIALS }}
94127
CUBEJS_AWS_KEY: ${{ secrets.CUBEJS_AWS_KEY }}
95128
CUBEJS_AWS_SECRET: ${{ secrets.CUBEJS_AWS_SECRET }}
96129
CUBEJS_DB_USER: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER }}
97130
CUBEJS_DB_PASS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS }}
98-
run: ./.github/actions/integration/${{ matrix.db }}.sh

.github/workflows/drivers-tests.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ on:
2323
- 'packages/cubejs-mssql-driver/**'
2424
- 'packages/cubejs-mysql-driver/**'
2525
- 'packages/cubejs-postgres-driver/**'
26+
- 'packages/cubejs-redshift-driver/**'
2627
- 'packages/cubejs-snowflake-driver/**'
28+
- 'packages/cubejs-vertica-driver/**'
2729

2830
# To test SQL API Push down
2931
- 'packages/cubejs-backend-native/**'
@@ -48,12 +50,17 @@ on:
4850
- 'packages/cubejs-mssql-driver/**'
4951
- 'packages/cubejs-mysql-driver/**'
5052
- 'packages/cubejs-postgres-driver/**'
53+
- 'packages/cubejs-redshift-driver/**'
5154
- 'packages/cubejs-snowflake-driver/**'
55+
- 'packages/cubejs-vertica-driver/**'
5256

5357
# To test SQL API Push down
5458
- 'packages/cubejs-backend-native/**'
5559
- 'rust/cubesql/**'
5660

61+
env:
62+
CUBEJS_TESSERACT_ORCHESTRATOR: true
63+
5764
jobs:
5865
latest-tag-sha:
5966
runs-on: ubuntu-20.04
@@ -97,7 +104,7 @@ jobs:
97104
- name: Install Rust
98105
uses: actions-rust-lang/setup-rust-toolchain@v1
99106
with:
100-
toolchain: nightly-2024-07-15
107+
toolchain: 1.84.1
101108
# override: true # this is by default on
102109
rustflags: ""
103110
components: rustfmt
@@ -115,8 +122,8 @@ jobs:
115122
- uses: Swatinem/rust-cache@v2
116123
with:
117124
workspaces: ./packages/cubejs-backend-native
118-
key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
119-
shared-key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
125+
key: native-${{ runner.OS }}-${{ matrix.target }}
126+
shared-key: native-${{ runner.OS }}-${{ matrix.target }}
120127
- name: Build native (fallback)
121128
if: (matrix.python-version == 'fallback')
122129
env:
@@ -163,7 +170,12 @@ jobs:
163170
uses: actions/download-artifact@v4
164171
with:
165172
name: backend-native
166-
path: packages/cubejs-backend-native/
173+
path: packages/cubejs-backend-native
174+
# current .dockerignore prevents use of native build
175+
- name: Unignore native from .dockerignore
176+
run: |
177+
grep -v -E "packages/cubejs-backend-native/((native)|(index.node))" .dockerignore > .dockerignore.tmp
178+
mv .dockerignore.tmp .dockerignore
167179
- name: Build and push
168180
uses: docker/build-push-action@v6
169181
with:
@@ -196,6 +208,8 @@ jobs:
196208
databricks-jdbc
197209
databricks-jdbc-export-bucket-s3
198210
databricks-jdbc-export-bucket-azure
211+
redshift
212+
redshift-export-bucket-s3
199213
snowflake
200214
snowflake-export-bucket-s3
201215
snowflake-export-bucket-azure
@@ -221,6 +235,8 @@ jobs:
221235
- mssql
222236
- mysql
223237
- postgres
238+
- redshift
239+
- redshift-export-bucket-s3
224240
- snowflake
225241
- snowflake-export-bucket-s3
226242
- snowflake-export-bucket-azure
@@ -312,6 +328,11 @@ jobs:
312328
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY }}
313329
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET }}
314330

331+
# Redshift
332+
DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_HOST: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_HOST }}
333+
DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_USER: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_USER }}
334+
DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_PASS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_PASS }}
335+
315336
# Snowflake
316337
DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER }}
317338
DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS }}
@@ -324,3 +345,4 @@ jobs:
324345
cd ./packages/cubejs-testing-drivers
325346
export DEBUG=testcontainers
326347
yarn ${{ matrix.database }}-full
348+

.github/workflows/master.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616
- 'rust/cubesql/**'
1717
branches:
1818
- master
19+
env:
20+
CUBEJS_TESSERACT_ORCHESTRATOR: true
1921
jobs:
2022
latest-tag-sha:
2123
runs-on: ubuntu-20.04
@@ -45,15 +47,15 @@ jobs:
4547
timeout-minutes: 60
4648
name: Build Linux Native backend for Dev image
4749
container:
48-
image: cubejs/rust-cross:x86_64-unknown-linux-gnu-15082024-python-3.9
50+
image: cubejs/rust-cross:x86_64-unknown-linux-gnu-15082024-python-3.11
4951

5052
steps:
5153
- name: Checkout
5254
uses: actions/checkout@v4
5355
- name: Install Rust
5456
uses: actions-rust-lang/setup-rust-toolchain@v1
5557
with:
56-
toolchain: nightly-2024-07-15
58+
toolchain: 1.84.1
5759
# override: true # this is by default on
5860
rustflags: ""
5961
components: rustfmt
@@ -77,14 +79,14 @@ jobs:
7779
run: npm install -g [email protected]
7880
- name: Build native (with Python)
7981
env:
80-
PYO3_PYTHON: python3.9
82+
PYO3_PYTHON: python3.11
8183
CARGO_BUILD_TARGET: x86_64-unknown-linux-gnu
8284
working-directory: ./packages/cubejs-backend-native
8385
run: yarn run native:build-debug-python
8486
- name: Store build artifact for dev image
8587
uses: actions/upload-artifact@v4
8688
with:
87-
name: "native-linux-x64-glibc-3.9.node" # this name is referenced below in docker-image-dev
89+
name: "native-linux-x64-glibc-3.11.node" # this name is referenced below in docker-image-dev
8890
path: ./packages/cubejs-backend-native/index.node
8991
overwrite: true
9092

@@ -99,7 +101,7 @@ jobs:
99101
- name: Download backend-native artifact
100102
uses: actions/download-artifact@v4
101103
with:
102-
name: "native-linux-x64-glibc-3.9.node" # this name is referenced in above in native_linux
104+
name: "native-linux-x64-glibc-3.11.node" # this name is referenced in above in native_linux
103105
path: ./packages/cubejs-backend-native/
104106
- name: Login to DockerHub
105107
uses: docker/login-action@v3
@@ -108,6 +110,11 @@ jobs:
108110
password: ${{ secrets.DOCKERHUB_TOKEN }}
109111
- name: Set up QEMU
110112
uses: docker/setup-qemu-action@v3
113+
# current .dockerignore prevents use of native build
114+
- name: Unignore native from .dockerignore
115+
run: |
116+
grep -v -E "packages/cubejs-backend-native/((native)|(index.node))" .dockerignore > .dockerignore.tmp
117+
mv .dockerignore.tmp .dockerignore
111118
- name: Push to Docker Hub
112119
uses: docker/build-push-action@v6
113120
with:
@@ -137,12 +144,19 @@ jobs:
137144
with:
138145
github-token: ${{ secrets.GH_TRIGGER_TOKEN }}
139146
script: |
147+
const prUrl = context.payload.pull_request ? context.payload.pull_request.html_url : '';
148+
const commitUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha}`;
149+
140150
await github.rest.actions.createWorkflowDispatch({
141151
owner: 'cubedevinc',
142152
repo: 'sql-api-test-suite',
143153
workflow_id: 'test_and_run_test_suites.yml',
144154
ref: 'main',
145155
inputs: {
146-
'cube-image': 'cubejs/cube:dev'
156+
'cube-image': 'cubejs/cube:dev',
157+
'source-repo': context.repo.repo,
158+
'source-pr-url': prUrl,
159+
'source-commit-url': commitUrl,
160+
'initiator': '${{ github.actor }}'
147161
}
148162
})

0 commit comments

Comments
 (0)