Skip to content

Commit bfbd8a6

Browse files
Merge remote-tracking branch 'origin' into add-azure-credential
2 parents 794b68b + e93a7d4 commit bfbd8a6

File tree

784 files changed

+100489
-55863
lines changed

Some content is hidden

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

784 files changed

+100489
-55863
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
!rust/cubestore/bin
1212
!rust/cubesql/package.json
1313

14+
packages/cubejs-backend-native/target
1415
packages/*/node_modules/
1516
packages/*/dist/
1617
packages/*/coverage/

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ updates:
44
directory: "/packages"
55
schedule:
66
interval: "weekly"
7+
- package-ecosystem: "npm"
8+
directory: "/examples"
9+
schedule:
10+
interval: "monthly"
11+
labels: [ ]
12+
ignore:
13+
- dependency-name: "*"

.github/label-actions.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"help wanted":
22
comment: |
3-
If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you.
4-
If this is the first time you are contributing a Pull Request to Cube.js, please check our [contribution guidelines](https://github.com/cube-js/cube/blob/master/CONTRIBUTING.md).
5-
You can also post any questions while contributing in the #contributors channel in the [Cube.js Slack](https://slack.cube.dev/).
3+
If you are interested in working on this issue, please go ahead and provide PR for that.
4+
We'd be happy to review it and merge it.
5+
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).
6+
You can also post any questions while contributing in the #contributors channel in the [Cube Slack](https://slack.cube.dev/).

.github/workflows/birdbox.yml

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,15 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
os: [ubuntu-20.04, ubuntu-18.04, macos-11, windows-2019]
28-
node-version: [16.x]
27+
os: [ubuntu-20.04, ubuntu-18.04, macos-12, windows-2019]
28+
node-version: [18.x]
2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@v4
3232
- name: Disable rustup update (issue workaround for Windows)
3333
run: rustup set auto-self-update disable
3434
if: contains(runner.os, 'windows')
3535
shell: bash
36-
- name: Install Rust
37-
uses: actions-rs/toolchain@v1
38-
with:
39-
toolchain: nightly-2022-06-22
40-
override: true
41-
components: rustfmt
4236
- name: Install Node.js ${{ matrix.node-version }}
4337
uses: actions/setup-node@v3
4438
with:
@@ -52,9 +46,9 @@ jobs:
5246
node_modules
5347
rust/cubestore/node_modules
5448
packages/*/node_modules
55-
key: ${{ runner.os }}-workspace-main-16.x-${{ hashFiles('**/yarn.lock') }}
49+
key: ${{ runner.os }}-workspace-main-18.x-${{ hashFiles('**/yarn.lock') }}
5650
restore-keys: |
57-
${{ runner.os }}-workspace-main-16.x-
51+
${{ runner.os }}-workspace-main-18.x-
5852
- name: Set Yarn version
5953
run: yarn policies set-version v1.22.19
6054
- name: Yarn install
@@ -77,7 +71,7 @@ jobs:
7771
run: |
7872
cd packages/cubejs-testing/
7973
npx cubejs-cli@${{ github.event.inputs.version }} create birdbox-test-project -d postgres
80-
export BIRDBOX_CUBEJS_VERSION=${{ github.event.inputs.version }}${{ matrix.node-arch }}
74+
export BIRDBOX_CUBEJS_VERSION=${{ github.event.inputs.version }}
8175
yarn run dataset:minimal
8276
yarn run birdbox:cli:postgresql
8377
- name: Slack Failure
@@ -97,20 +91,13 @@ jobs:
9791
fail-fast: false
9892
matrix:
9993
target: ['postgresql', 'postgresql-cubestore', 'postgresql-pre-aggregations']
100-
arch: ['', '-alpine']
10194
steps:
10295
- name: Checkout
10396
uses: actions/checkout@v4
104-
- name: Install Rust
105-
uses: actions-rs/toolchain@v1
106-
with:
107-
toolchain: nightly-2022-06-22
108-
override: true
109-
components: rustfmt
110-
- name: Install Node.js 16.x
97+
- name: Install Node.js 18.x
11198
uses: actions/setup-node@v3
11299
with:
113-
node-version: 16.x
100+
node-version: 18.x
114101
- name: Restore lerna
115102
uses: actions/cache@v3
116103
with:
@@ -120,9 +107,9 @@ jobs:
120107
node_modules
121108
rust/cubestore/node_modules
122109
packages/*/node_modules
123-
key: ${{ runner.os }}-workspace-main-16.x-${{ hashFiles('**/yarn.lock') }}
110+
key: ${{ runner.os }}-workspace-main-18.x-${{ hashFiles('**/yarn.lock') }}
124111
restore-keys: |
125-
${{ runner.os }}-workspace-main-16.x-
112+
${{ runner.os }}-workspace-main-18.x-
126113
- name: Set Yarn version
127114
run: yarn policies set-version v1.22.19
128115
- name: Yarn install
@@ -143,7 +130,7 @@ jobs:
143130
run: |
144131
cd packages/cubejs-testing/
145132
export DEBUG=testcontainers
146-
export BIRDBOX_CUBEJS_VERSION=${{ github.event.inputs.version }}${{ matrix.node-arch }}
133+
export BIRDBOX_CUBEJS_VERSION=${{ github.event.inputs.version }}
147134
yarn run dataset:minimal
148135
yarn run birdbox:${{ matrix.target }}
149136
- name: Slack Failure
@@ -170,16 +157,10 @@ jobs:
170157
steps:
171158
- name: Checkout
172159
uses: actions/checkout@v4
173-
- name: Install Rust
174-
uses: actions-rs/toolchain@v1
175-
with:
176-
toolchain: nightly-2022-06-22
177-
override: true
178-
components: rustfmt
179-
- name: Install Node.js 16.x
160+
- name: Install Node.js 18.x
180161
uses: actions/setup-node@v3
181162
with:
182-
node-version: 16.x
163+
node-version: 18.x
183164
- name: Restore lerna
184165
uses: actions/cache@v3
185166
with:
@@ -189,9 +170,9 @@ jobs:
189170
node_modules
190171
rust/cubestore/node_modules
191172
packages/*/node_modules
192-
key: ${{ runner.os }}-workspace-main-16.x-${{ hashFiles('**/yarn.lock') }}
173+
key: ${{ runner.os }}-workspace-main-18.x-${{ hashFiles('**/yarn.lock') }}
193174
restore-keys: |
194-
${{ runner.os }}-workspace-main-16.x-
175+
${{ runner.os }}-workspace-main-18.x-
195176
- name: Set Yarn version
196177
run: yarn policies set-version v1.22.19
197178
- name: Yarn install

.github/workflows/cloud.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
- 'packages/cubejs-base-driver/**'
1616
- 'packages/cubejs-query-orchestrator/**'
1717
- 'packages/cubejs-schema-compiler/**'
18+
- 'packages/cubejs-backend-shared/**'
19+
- 'packages/cubejs-server-core/**'
1820
# drivers
1921
- 'packages/cubejs-athena-driver/**'
2022
- 'packages/cubejs-bigquery-driver/**'
@@ -55,7 +57,7 @@ jobs:
5557

5658
strategy:
5759
matrix:
58-
node-version: [ 16.x ]
60+
node-version: [ 18.x ]
5961
db: [ 'athena', 'bigquery', 'snowflake' ]
6062
fail-fast: false
6163

@@ -66,12 +68,6 @@ jobs:
6668
run: rustup set auto-self-update disable
6769
if: contains(runner.os, 'windows')
6870
shell: bash
69-
- name: Install Rust
70-
uses: actions-rs/toolchain@v1
71-
with:
72-
toolchain: nightly-2022-06-22
73-
override: true
74-
components: rustfmt
7571
- name: Install Node.js ${{ matrix.node-version }}
7672
uses: actions/setup-node@v3
7773
with:

.github/workflows/drivers-tests.yml

Lines changed: 103 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,50 @@ on:
1010
- 'packages/cubejs-testing-drivers/**'
1111
- 'packages/cubejs-testing-shared/**'
1212
- 'packages/cubejs-query-orchestrator/src/**'
13+
- 'packages/cubejs-backend-shared/**'
14+
- 'packages/cubejs-server-core/**'
15+
- 'packages/cubejs-schema-compiler/**'
16+
1317
- 'packages/cubejs-base-driver/src/**'
1418
- 'packages/cubejs-jdbc-driver/src/**'
15-
1619
- 'packages/cubejs-athena-driver/**'
20+
- 'packages/cubejs-bigquery-driver/**'
1721
- 'packages/cubejs-clickhouse-driver/**'
1822
- 'packages/cubejs-databricks-jdbc-driver/**'
1923
- 'packages/cubejs-mssql-driver/**'
2024
- 'packages/cubejs-mysql-driver/**'
2125
- 'packages/cubejs-postgres-driver/**'
2226
- 'packages/cubejs-snowflake-driver/**'
27+
28+
# To test SQL API Push down
29+
- 'packages/cubejs-backend-native/**'
30+
- 'rust/cubesql/**'
2331
pull_request:
2432
paths:
2533
- '.github/workflows/drivers-tests.yml'
2634

2735
- 'packages/cubejs-testing-drivers/**'
2836
- 'packages/cubejs-testing-shared/**'
2937
- 'packages/cubejs-query-orchestrator/src/**'
38+
- 'packages/cubejs-backend-shared/**'
39+
- 'packages/cubejs-server-core/**'
40+
- 'packages/cubejs-schema-compiler/**'
41+
3042
- 'packages/cubejs-base-driver/src/**'
3143
- 'packages/cubejs-jdbc-driver/src/**'
32-
3344
- 'packages/cubejs-athena-driver/**'
45+
- 'packages/cubejs-bigquery-driver/**'
3446
- 'packages/cubejs-clickhouse-driver/**'
3547
- 'packages/cubejs-databricks-jdbc-driver/**'
3648
- 'packages/cubejs-mssql-driver/**'
3749
- 'packages/cubejs-mysql-driver/**'
3850
- 'packages/cubejs-postgres-driver/**'
3951
- 'packages/cubejs-snowflake-driver/**'
4052

53+
# To test SQL API Push down
54+
- 'packages/cubejs-backend-native/**'
55+
- 'rust/cubesql/**'
56+
4157
jobs:
4258
latest-tag-sha:
4359
runs-on: ubuntu-20.04
@@ -62,8 +78,68 @@ jobs:
6278
env:
6379
OUT: ${{ steps.get-tag.outputs.sha }}
6480

81+
native_linux:
82+
runs-on: ubuntu-20.04
83+
timeout-minutes: 60
84+
name: Build native Linux ${{ matrix.node-version }} ${{ matrix.target }} Python ${{ matrix.python-version }}
85+
strategy:
86+
matrix:
87+
node-version: [ 18 ]
88+
python-version: [ "fallback" ]
89+
target: [ "x86_64-unknown-linux-gnu" ]
90+
fail-fast: false
91+
container:
92+
image: cubejs/rust-cross:${{ matrix.target }}-02042024
93+
94+
steps:
95+
- name: Checkout
96+
uses: actions/checkout@v4
97+
- name: Install Rust
98+
uses: actions-rs/toolchain@v1
99+
with:
100+
toolchain: nightly-2023-12-13
101+
override: true
102+
components: rustfmt
103+
target: ${{ matrix.target }}
104+
- name: Install Node.js ${{ matrix.node-version }}
105+
uses: actions/setup-node@v3
106+
with:
107+
node-version: ${{ matrix.node-version }}
108+
- name: Install Yarn
109+
run: npm install -g yarn
110+
- name: Set Yarn version
111+
run: yarn policies set-version v1.22.19
112+
- name: Install cargo-cp-artifact
113+
run: npm install -g [email protected]
114+
- uses: Swatinem/rust-cache@v2
115+
with:
116+
workspaces: ./packages/cubejs-backend-native
117+
key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
118+
shared-key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
119+
- name: Build native (fallback)
120+
if: (matrix.python-version == 'fallback')
121+
env:
122+
CARGO_BUILD_TARGET: ${{ matrix.target }}
123+
run: cd packages/cubejs-backend-native && npm run native:build-release
124+
- name: Setup cross compilation
125+
if: (matrix.target == 'aarch64-unknown-linux-gnu')
126+
uses: allenevans/[email protected]
127+
with:
128+
PYO3_CROSS_PYTHON_VERSION: ${{ matrix.python-version }}
129+
- name: Build native (with Python)
130+
if: (matrix.python-version != 'fallback')
131+
env:
132+
PYO3_PYTHON: python${{ matrix.python-version }}
133+
CARGO_BUILD_TARGET: ${{ matrix.target }}
134+
run: cd packages/cubejs-backend-native && npm run native:build-release-python
135+
- name: Upload native build
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: backend-native
139+
path: packages/cubejs-backend-native/index.node
140+
65141
build:
66-
needs: latest-tag-sha
142+
needs: [latest-tag-sha, native_linux]
67143
if: (needs['latest-tag-sha'].outputs.sha != github.sha)
68144
runs-on: ubuntu-20.04
69145
timeout-minutes: 30
@@ -81,6 +157,12 @@ jobs:
81157
- name: Set up QEMU
82158
uses: docker/setup-qemu-action@v2
83159

160+
- name: Download native build
161+
uses: actions/download-artifact@v4
162+
with:
163+
name: backend-native
164+
path: packages/cubejs-backend-native/
165+
84166
- name: Set up Docker Buildx
85167
uses: docker/setup-buildx-action@v2
86168
with:
@@ -102,12 +184,13 @@ jobs:
102184
strategy:
103185
matrix:
104186
node:
105-
- 16.x
187+
- 18.x
106188
database:
107189
- athena
108190
- bigquery
109191
- clickhouse
110192
- databricks-jdbc
193+
- databricks-jdbc-export-bucket
111194
- mssql
112195
- mysql
113196
- postgres
@@ -118,21 +201,27 @@ jobs:
118201
- name: Checkout
119202
uses: actions/checkout@v4
120203

121-
- name: Install Rust
122-
uses: actions-rs/toolchain@v1
123-
with:
124-
toolchain: nightly-2022-06-22
125-
override: true
126-
components: rustfmt
127-
128-
- name: Install Node.js 16.x
204+
- name: Install Node.js 18.x
129205
uses: actions/setup-node@v3
130206
with:
131-
node-version: 16.x
207+
node-version: 18.x
132208

133209
- name: Configure `yarn`
134210
run: yarn policies set-version v1.22.19
135211

212+
- name: Get yarn cache directory path
213+
id: yarn-cache-dir-path
214+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
215+
shell: bash
216+
- name: Restore yarn cache
217+
# We don't want to save it on finish, restore only!
218+
uses: actions/cache/restore@v3
219+
with:
220+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
221+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
222+
restore-keys: |
223+
${{ runner.os }}-yarn-
224+
136225
- name: Install dependencies
137226
uses: nick-invision/retry@v2
138227
env:
@@ -176,4 +265,4 @@ jobs:
176265
run: |
177266
cd ./packages/cubejs-testing-drivers
178267
export DEBUG=testcontainers
179-
yarn ${{ matrix.database }}-full
268+
yarn ${{ matrix.database }}-full

0 commit comments

Comments
 (0)