Skip to content

Commit 3a95520

Browse files
committed
Merge branch 'master' into feat-suboptimal-which-do-not-use-all-dimensions
2 parents 93b6121 + 7a3335d commit 3a95520

File tree

1,159 files changed

+251998
-71564
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,159 files changed

+251998
-71564
lines changed

.dockerignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
!rust/cubestore/bin
1212
!rust/cubesql/package.json
1313

14+
# Ignoring builds for native from local machime to protect a problem with different architecture
15+
packages/cubejs-backend-native/index.node
16+
packages/cubejs-backend-native/native/
17+
# Caches
1418
packages/cubejs-backend-native/target
1519
packages/*/node_modules/
1620
packages/*/dist/
1721
packages/*/coverage/
22+
# Other
1823
packages/cubejs-server-core/playground/
19-
packages/cubejs-serverless
20-
packages/cubejs-serverless-aws
21-
packages/cubejs-serverless-google

.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/workflows/cloud.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757

5858
strategy:
5959
matrix:
60-
node-version: [ 18.x ]
60+
node-version: [ 20.x ]
6161
db: [ 'athena', 'bigquery', 'snowflake' ]
6262
fail-fast: false
6363

@@ -80,7 +80,7 @@ jobs:
8080
restore-keys: |
8181
${{ runner.os }}-yarn-
8282
- name: Set Yarn version
83-
run: yarn policies set-version v1.22.19
83+
run: yarn policies set-version v1.22.22
8484
- name: Yarn install
8585
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile
8686
- name: Build client

.github/workflows/drivers-tests.yml

Lines changed: 89 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
name: Build native Linux ${{ matrix.node-version }} ${{ matrix.target }} Python ${{ matrix.python-version }}
8585
strategy:
8686
matrix:
87-
node-version: [ 18 ]
87+
node-version: [ 20 ]
8888
python-version: [ "fallback" ]
8989
target: [ "x86_64-unknown-linux-gnu" ]
9090
fail-fast: false
@@ -109,7 +109,7 @@ jobs:
109109
- name: Install Yarn
110110
run: npm install -g yarn
111111
- name: Set Yarn version
112-
run: yarn policies set-version v1.22.19
112+
run: yarn policies set-version v1.22.22
113113
- name: Install cargo-cp-artifact
114114
run: npm install -g [email protected]
115115
- uses: Swatinem/rust-cache@v2
@@ -144,6 +144,8 @@ jobs:
144144
if: (needs['latest-tag-sha'].outputs.sha != github.sha)
145145
runs-on: ubuntu-20.04
146146
timeout-minutes: 30
147+
env:
148+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
147149
steps:
148150
- name: Check out the repo
149151
uses: actions/checkout@v4
@@ -154,6 +156,7 @@ jobs:
154156
with:
155157
username: ${{ secrets.DOCKERHUB_USERNAME }}
156158
password: ${{ secrets.DOCKERHUB_TOKEN }}
159+
if: (env.DOCKERHUB_USERNAME != '')
157160
- name: Set up QEMU
158161
uses: docker/setup-qemu-action@v3
159162
- name: Download native build
@@ -167,40 +170,79 @@ jobs:
167170
context: .
168171
file: ./packages/cubejs-docker/testing-drivers.Dockerfile
169172
tags: cubejs/cube:testing-drivers
170-
push: true
173+
push: ${{ (env.DOCKERHUB_USERNAME != '') }}
174+
- name: Save Docker image as artifact
175+
run: |
176+
IMAGE_TAG=cubejs/cube:testing-drivers
177+
docker save -o image.tar $IMAGE_TAG
178+
gzip image.tar
179+
continue-on-error: true
180+
- name: Upload Docker image artifact
181+
uses: actions/upload-artifact@v4
182+
with:
183+
name: docker-image
184+
path: image.tar.gz
171185

172186
tests:
173187
runs-on: ubuntu-20.04
174188
timeout-minutes: 30
175189
needs: [latest-tag-sha, build]
176190
if: (needs['latest-tag-sha'].outputs.sha != github.sha)
191+
env:
192+
CLOUD_DATABASES: >
193+
athena-export-bucket-s3
194+
bigquery-export-bucket-gcs
195+
clickhouse-export-bucket-s3
196+
databricks-jdbc
197+
databricks-jdbc-export-bucket-s3
198+
databricks-jdbc-export-bucket-azure
199+
redshift
200+
redshift-export-bucket-s3
201+
snowflake
202+
snowflake-export-bucket-s3
203+
snowflake-export-bucket-azure
204+
snowflake-export-bucket-azure-via-storage-integration
205+
snowflake-export-bucket-gcs
206+
# As per docs:
207+
# Secrets cannot be directly referenced in if: conditionals. Instead, consider setting
208+
# secrets as job-level environment variables, then referencing the environment variables
209+
# to conditionally run steps in the job.
210+
DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}
177211
strategy:
178212
matrix:
179213
node:
180-
- 18.x
214+
- 20.x
181215
database:
182-
- athena
183-
- bigquery
216+
- athena-export-bucket-s3
217+
- bigquery-export-bucket-gcs
184218
- clickhouse
219+
- clickhouse-export-bucket-s3
185220
- databricks-jdbc
186-
- databricks-jdbc-export-bucket
221+
- databricks-jdbc-export-bucket-s3
222+
- databricks-jdbc-export-bucket-azure
187223
- mssql
188224
- mysql
189225
- postgres
226+
- redshift
227+
- redshift-export-bucket-s3
190228
- snowflake
229+
- snowflake-export-bucket-s3
230+
- snowflake-export-bucket-azure
231+
- snowflake-export-bucket-azure-via-storage-integration
232+
- snowflake-export-bucket-gcs
191233
fail-fast: false
192234

193235
steps:
194236
- name: Checkout
195237
uses: actions/checkout@v4
196238

197-
- name: Install Node.js 18.x
239+
- name: Install Node.js 20.x
198240
uses: actions/setup-node@v4
199241
with:
200-
node-version: 18.x
242+
node-version: 20.x
201243

202244
- name: Configure `yarn`
203-
run: yarn policies set-version v1.22.19
245+
run: yarn policies set-version v1.22.22
204246

205247
- name: Get yarn cache directory path
206248
id: yarn-cache-dir-path
@@ -237,7 +279,22 @@ jobs:
237279
cd packages/cubejs-testing-drivers
238280
yarn tsc
239281
282+
- name: Download Docker image artifact
283+
uses: actions/download-artifact@v4
284+
with:
285+
name: docker-image
286+
287+
- name: Load Docker image into Docker Daemon
288+
run: |
289+
gunzip image.tar.gz
290+
docker load -i image.tar
291+
240292
- name: Run tests
293+
uses: nick-fields/retry@v3
294+
# It's enough to test for any one secret because they are set all at once or not set all
295+
if: |
296+
(contains(env.CLOUD_DATABASES, matrix.database) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') ||
297+
(!contains(env.CLOUD_DATABASES, matrix.database))
241298
env:
242299
# Athena
243300
DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}
@@ -246,16 +303,34 @@ jobs:
246303
# BigQuery
247304
DRIVERS_TESTS_CUBEJS_DB_BQ_CREDENTIALS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_BQ_CREDENTIALS }}
248305

306+
#GCS
307+
DRIVERS_TESTS_CUBEJS_DB_EXPORT_GCS_CREDENTIALS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_GCS_CREDENTIALS }}
308+
309+
# Azure
310+
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AZURE_KEY: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AZURE_KEY }}
311+
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AZURE_SAS_TOKEN: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AZURE_SAS_TOKEN }}
312+
249313
# Databricks
250314
DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_URL: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_URL }}
251315
DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_TOKEN: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_TOKEN }}
252316
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY }}
253317
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET }}
254318

319+
# Redshift
320+
DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_HOST: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_HOST }}
321+
DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_USER: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_USER }}
322+
DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_PASS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_PASS }}
323+
255324
# Snowflake
256325
DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER }}
257326
DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS }}
258-
run: |
259-
cd ./packages/cubejs-testing-drivers
260-
export DEBUG=testcontainers
261-
yarn ${{ matrix.database }}-full
327+
with:
328+
max_attempts: 3
329+
retry_on: error
330+
retry_wait_seconds: 15
331+
timeout_minutes: 20
332+
command: |
333+
cd ./packages/cubejs-testing-drivers
334+
export DEBUG=testcontainers
335+
yarn ${{ matrix.database }}-full
336+

.github/workflows/master.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ jobs:
6464
workspaces: ./rust/cubesql -> target
6565
key: cubesql-x86_64-unknown-linux-gnu
6666
shared-key: cubesql-x86_64-unknown-linux-gnu
67-
- name: Install Node.js 18
67+
- name: Install Node.js 20
6868
uses: actions/setup-node@v4
6969
with:
70-
node-version: 18
70+
node-version: 20
7171
- name: Install Yarn
7272
run: npm install -g yarn
7373
- name: Set Yarn version
74-
run: yarn policies set-version v1.22.19
74+
run: yarn policies set-version v1.22.22
7575
# We don't need to install all yarn deps to build native
7676
- name: Install cargo-cp-artifact
7777
run: npm install -g [email protected]
@@ -137,12 +137,19 @@ jobs:
137137
with:
138138
github-token: ${{ secrets.GH_TRIGGER_TOKEN }}
139139
script: |
140+
const prUrl = context.payload.pull_request ? context.payload.pull_request.html_url : '';
141+
const commitUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha}`;
142+
140143
await github.rest.actions.createWorkflowDispatch({
141144
owner: 'cubedevinc',
142145
repo: 'sql-api-test-suite',
143146
workflow_id: 'test_and_run_test_suites.yml',
144147
ref: 'main',
145148
inputs: {
146-
'cube-image': 'cubejs/cube:dev'
149+
'cube-image': 'cubejs/cube:dev',
150+
'source-repo': context.repo.repo,
151+
'source-pr-url': prUrl,
152+
'source-commit-url': commitUrl,
153+
'initiator': '${{ github.actor }}'
147154
}
148155
})

.github/workflows/post-release.yml

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
node-version: [18.x]
28+
node-version: [20.x]
2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@v4
@@ -42,11 +42,11 @@ jobs:
4242
node_modules
4343
rust/cubestore/node_modules
4444
packages/*/node_modules
45-
key: ${{ runner.os }}-workspace-main-18.x-${{ hashFiles('**/yarn.lock') }}
45+
key: ${{ runner.os }}-workspace-main-20.x-${{ hashFiles('**/yarn.lock') }}
4646
restore-keys: |
47-
${{ runner.os }}-workspace-main-18.x-
47+
${{ runner.os }}-workspace-main-20.x-
4848
- name: Set Yarn version
49-
run: yarn policies set-version v1.22.19
49+
run: yarn policies set-version v1.22.22
5050
- name: Yarn install
5151
uses: nick-fields/retry@v3
5252
env:
@@ -91,10 +91,10 @@ jobs:
9191
steps:
9292
- name: Checkout
9393
uses: actions/checkout@v4
94-
- name: Install Node.js 18.x
94+
- name: Install Node.js 20.x
9595
uses: actions/setup-node@v4
9696
with:
97-
node-version: 18.x
97+
node-version: 20.x
9898
- name: Restore lerna
9999
uses: actions/cache@v4
100100
with:
@@ -104,11 +104,11 @@ jobs:
104104
node_modules
105105
rust/cubestore/node_modules
106106
packages/*/node_modules
107-
key: ${{ runner.os }}-workspace-main-18.x-${{ hashFiles('**/yarn.lock') }}
107+
key: ${{ runner.os }}-workspace-main-20.x-${{ hashFiles('**/yarn.lock') }}
108108
restore-keys: |
109-
${{ runner.os }}-workspace-main-18.x-
109+
${{ runner.os }}-workspace-main-20.x-
110110
- name: Set Yarn version
111-
run: yarn policies set-version v1.22.19
111+
run: yarn policies set-version v1.22.22
112112
- name: Yarn install
113113
uses: nick-fields/retry@v3
114114
env:
@@ -155,10 +155,10 @@ jobs:
155155
steps:
156156
- name: Checkout
157157
uses: actions/checkout@v4
158-
- name: Install Node.js 18.x
158+
- name: Install Node.js 20.x
159159
uses: actions/setup-node@v4
160160
with:
161-
node-version: 18.x
161+
node-version: 20.x
162162
- name: Restore lerna
163163
uses: actions/cache@v4
164164
with:
@@ -168,11 +168,11 @@ jobs:
168168
node_modules
169169
rust/cubestore/node_modules
170170
packages/*/node_modules
171-
key: ${{ runner.os }}-workspace-main-18.x-${{ hashFiles('**/yarn.lock') }}
171+
key: ${{ runner.os }}-workspace-main-20.x-${{ hashFiles('**/yarn.lock') }}
172172
restore-keys: |
173-
${{ runner.os }}-workspace-main-18.x-
173+
${{ runner.os }}-workspace-main-20.x-
174174
- name: Set Yarn version
175-
run: yarn policies set-version v1.22.19
175+
run: yarn policies set-version v1.22.22
176176
- name: Yarn install
177177
uses: nick-fields/retry@v3
178178
env:
@@ -205,22 +205,3 @@ jobs:
205205
color: danger
206206
env:
207207
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
208-
209-
trigger-repo-sync:
210-
runs-on: ubuntu-20.04
211-
name: 'Sync runtime repo'
212-
timeout-minutes: 60
213-
steps:
214-
- name: Checkout
215-
uses: actions/checkout@v4
216-
- name: Trigger runtime
217-
uses: actions/github-script@v6
218-
with:
219-
github-token: ${{ secrets.GH_TRIGGER_TOKEN }}
220-
script: |
221-
await github.rest.actions.createWorkflowDispatch({
222-
owner: 'cubedevinc',
223-
repo: 'cube-runtime',
224-
workflow_id: 'sync.yml',
225-
ref: 'master'
226-
})

0 commit comments

Comments
 (0)