Skip to content

Commit fd25552

Browse files
authored
Merge branch 'master' into chore/deps-upgrade
2 parents 0cd5911 + 3822107 commit fd25552

File tree

112 files changed

+6154
-2278
lines changed

Some content is hidden

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

112 files changed

+6154
-2278
lines changed

.github/workflows/cloud.yml

Lines changed: 21 additions & 0 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,15 +62,31 @@ 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: nightly-2024-07-15
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:
7082
node-version: ${{ matrix.node-version }}
83+
- name: Install cargo-cp-artifact
84+
run: npm install -g [email protected]
85+
- uses: Swatinem/rust-cache@v2
86+
with:
87+
workspaces: ./packages/cubejs-backend-native
88+
key: native-${{ runner.OS }}-${{ matrix.target }}
89+
shared-key: native-${{ runner.OS }}-${{ matrix.target }}
7190
- name: Get yarn cache directory path
7291
id: yarn-cache-dir-path
7392
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
@@ -87,6 +106,8 @@ jobs:
87106
run: yarn build
88107
- name: Lerna tsc
89108
run: yarn tsc
109+
- name: Build native (no python)
110+
run: cd packages/cubejs-backend-native && npm run native:build-release
90111
- name: Run Integration tests for ${{ matrix.db }} matrix
91112
timeout-minutes: 30
92113
env:

.github/workflows/drivers-tests.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ on:
5656
- 'packages/cubejs-backend-native/**'
5757
- 'rust/cubesql/**'
5858

59+
env:
60+
CUBEJS_TESSERACT_ORCHESTRATOR: true
61+
5962
jobs:
6063
latest-tag-sha:
6164
runs-on: ubuntu-20.04
@@ -117,8 +120,8 @@ jobs:
117120
- uses: Swatinem/rust-cache@v2
118121
with:
119122
workspaces: ./packages/cubejs-backend-native
120-
key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
121-
shared-key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
123+
key: native-${{ runner.OS }}-${{ matrix.target }}
124+
shared-key: native-${{ runner.OS }}-${{ matrix.target }}
122125
- name: Build native (fallback)
123126
if: (matrix.python-version == 'fallback')
124127
env:
@@ -165,7 +168,12 @@ jobs:
165168
uses: actions/download-artifact@v4
166169
with:
167170
name: backend-native
168-
path: packages/cubejs-backend-native/
171+
path: packages/cubejs-backend-native
172+
# current .dockerignore prevents use of native build
173+
- name: Unignore native from .dockerignore
174+
run: |
175+
grep -v -E "packages/cubejs-backend-native/((native)|(index.node))" .dockerignore > .dockerignore.tmp
176+
mv .dockerignore.tmp .dockerignore
169177
- name: Build and push
170178
uses: docker/build-push-action@v6
171179
with:

.github/workflows/master.yml

Lines changed: 2 additions & 0 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

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ jobs:
552552
- name: Push to Docker Hub
553553
uses: docker/build-push-action@v6
554554
with:
555-
context: ./rust/cubestore/
555+
context: ./rust/
556556
file: ./rust/cubestore/Dockerfile
557557
platforms: ${{ matrix.platforms }}
558558
build-args: ${{ matrix.build-args }}

.github/workflows/push.yml

Lines changed: 108 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- 'packages/**'
1010
- 'rust/cubestore/**'
1111
- 'rust/cubesql/**'
12+
- 'rust/cubenativeutils/**'
13+
- 'rust/cubeorchestrator/**'
14+
- 'rust/cubeshared/**'
15+
- 'rust/cubesqlplanner/**'
1216
- '.eslintrc.js'
1317
- '.prettierrc'
1418
- 'package.json'
@@ -24,13 +28,20 @@ on:
2428
- 'packages/**'
2529
- 'rust/cubestore/**'
2630
- 'rust/cubesql/**'
31+
- 'rust/cubenativeutils/**'
32+
- 'rust/cubeorchestrator/**'
33+
- 'rust/cubeshared/**'
34+
- 'rust/cubesqlplanner/**'
2735
- '.eslintrc.js'
2836
- '.prettierrc'
2937
- 'package.json'
3038
- 'lerna.json'
3139
- 'rollup.config.js'
3240
- 'yarn.lock'
3341

42+
env:
43+
CUBEJS_TESSERACT_ORCHESTRATOR: true
44+
3445
jobs:
3546
unit:
3647
runs-on: ubuntu-20.04
@@ -95,14 +106,15 @@ jobs:
95106
command: yarn install --frozen-lockfile
96107
- name: Lerna tsc
97108
run: yarn tsc
109+
- name: Build native (no python)
110+
run: cd packages/cubejs-backend-native && npm run native:build-release
98111
- name: Build client
99112
run: yarn build
100113
- name: Build cubejs-backend-native (with Python)
101114
run: yarn run native:build-release-python
102115
working-directory: ./packages/cubejs-backend-native
103116
env:
104117
PYO3_PYTHON: python${{ matrix.python-version }}
105-
106118
- name: Lerna test
107119
run: yarn lerna run --concurrency 1 --stream --no-prefix unit
108120
# - uses: codecov/codecov-action@v1
@@ -111,6 +123,21 @@ jobs:
111123
# files: ./packages/*/coverage/clover.xml
112124
# flags: cube-backend
113125
# verbose: true # optional (default = false)
126+
- name: Cargo test cubeorchestrator
127+
run: |
128+
cargo test --manifest-path rust/cubeorchestrator/Cargo.toml -j 1
129+
- name: Cargo test cubenativeutils
130+
run: |
131+
cargo test --manifest-path rust/cubenativeutils/Cargo.toml -j 1
132+
- name: Cargo test cubeshared
133+
run: |
134+
cargo test --manifest-path rust/cubeshared/Cargo.toml -j 1
135+
# - name: Cargo test cubesql
136+
# run: |
137+
# cargo test --manifest-path rust/cubesql/Cargo.toml -j 1
138+
# - name: Cargo test cubesqlplanner
139+
# run: |
140+
# cargo test --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -j 1
114141

115142
lint:
116143
runs-on: ubuntu-20.04
@@ -159,6 +186,21 @@ jobs:
159186
run: yarn lint:npm
160187
- name: Lerna lint
161188
run: yarn lerna run --concurrency 1 lint
189+
- name: Cargo fmt cubeorchestrator
190+
run: |
191+
cargo fmt --manifest-path rust/cubeorchestrator/Cargo.toml -- --check
192+
- name: Cargo fmt cubenativeutils
193+
run: |
194+
cargo fmt --manifest-path rust/cubenativeutils/Cargo.toml -- --check
195+
- name: Cargo fmt cubeshared
196+
run: |
197+
cargo fmt --manifest-path rust/cubeshared/Cargo.toml -- --check
198+
# - name: Cargo fmt cubesql
199+
# run: |
200+
# cargo fmt --manifest-path rust/cubesql/Cargo.toml -- --check
201+
# - name: Cargo fmt cubesqlplanner
202+
# run: |
203+
# cargo fmt --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -- --check
162204

163205
build:
164206
runs-on: ubuntu-20.04
@@ -211,6 +253,21 @@ jobs:
211253
run: yarn lerna run --concurrency 1 build
212254
env:
213255
NODE_OPTIONS: --max_old_space_size=4096
256+
- name: Cargo build cubeorchestrator
257+
run: |
258+
cargo build --manifest-path rust/cubeorchestrator/Cargo.toml -j 4
259+
- name: Cargo build cubenativeutils
260+
run: |
261+
cargo build --manifest-path rust/cubenativeutils/Cargo.toml -j 4
262+
- name: Cargo build cubeshared
263+
run: |
264+
cargo build --manifest-path rust/cubeshared/Cargo.toml -j 4
265+
# - name: Cargo build cubesql
266+
# run: |
267+
# cargo build --manifest-path rust/cubesql/Cargo.toml -j 4
268+
# - name: Cargo build cubesqlplanner
269+
# run: |
270+
# cargo build --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -j 4
214271

215272
build-cubestore:
216273
needs: [latest-tag-sha]
@@ -276,6 +333,13 @@ jobs:
276333
df -h
277334
- name: Checkout
278335
uses: actions/checkout@v4
336+
- name: Install Rust
337+
uses: actions-rust-lang/setup-rust-toolchain@v1
338+
with:
339+
toolchain: nightly-2024-07-15
340+
# override: true # this is by default on
341+
rustflags: ""
342+
components: rustfmt
279343
- name: Install Node.js ${{ matrix.node-version }}
280344
uses: actions/setup-node@v4
281345
with:
@@ -305,6 +369,9 @@ jobs:
305369
command: yarn install --frozen-lockfile
306370
- name: Lerna tsc
307371
run: yarn tsc
372+
- name: Build cubejs-backend-native (without Python)
373+
run: yarn run native:build-release
374+
working-directory: ./packages/cubejs-backend-native
308375
- name: Download cubestored-x86_64-unknown-linux-gnu-release artifact
309376
uses: actions/download-artifact@v4
310377
with:
@@ -539,6 +606,8 @@ jobs:
539606
- 5000:5000
540607
strategy:
541608
matrix:
609+
node-version: [ 20 ]
610+
target: [ "x86_64-unknown-linux-gnu" ]
542611
dockerfile:
543612
- dev.Dockerfile
544613
include:
@@ -565,21 +634,29 @@ jobs:
565634
df -h
566635
- name: Checkout
567636
uses: actions/checkout@v4
568-
- name: Set up QEMU
569-
uses: docker/setup-qemu-action@v3
570-
- name: Build image
571-
uses: docker/build-push-action@v6
572-
timeout-minutes: 30
637+
- name: Install Rust
638+
uses: actions-rust-lang/setup-rust-toolchain@v1
573639
with:
574-
context: .
575-
file: ./packages/cubejs-docker/${{ matrix.dockerfile }}
576-
platforms: linux/amd64
577-
push: true
578-
tags: localhost:5000/cubejs/cube:${{ matrix.tag }}
579-
- name: Use Node.js 20.x
640+
toolchain: nightly-2024-07-15
641+
# override: true # this is by default on
642+
rustflags: ""
643+
components: rustfmt
644+
target: ${{ matrix.target }}
645+
- name: Install Node.js ${{ matrix.node-version }}
580646
uses: actions/setup-node@v4
581647
with:
582-
node-version: 20.x
648+
node-version: ${{ matrix.node-version }}
649+
- name: Install Yarn
650+
run: npm install -g yarn
651+
- name: Set Yarn version
652+
run: yarn policies set-version v1.22.22
653+
- name: Install cargo-cp-artifact
654+
run: npm install -g [email protected]
655+
- uses: Swatinem/rust-cache@v2
656+
with:
657+
workspaces: ./packages/cubejs-backend-native
658+
key: native-${{ runner.OS }}-${{ matrix.target }}
659+
shared-key: native-${{ runner.OS }}-${{ matrix.target }}
583660
- name: Get yarn cache directory path
584661
id: yarn-cache-dir-path
585662
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
@@ -591,8 +668,6 @@ jobs:
591668
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
592669
restore-keys: |
593670
${{ runner.os }}-yarn-
594-
- name: Set Yarn version
595-
run: yarn policies set-version v1.22.22
596671
- name: Yarn install
597672
uses: nick-fields/retry@v3
598673
env:
@@ -607,6 +682,24 @@ jobs:
607682
run: yarn build
608683
- name: Lerna tsc
609684
run: yarn tsc
685+
- name: Build native (no python)
686+
run: cd packages/cubejs-backend-native && npm run native:build-release
687+
- name: Set up QEMU
688+
uses: docker/setup-qemu-action@v3
689+
# current .dockerignore prevents use of native build
690+
- name: Unignore native from .dockerignore
691+
run: |
692+
grep -v -E "packages/cubejs-backend-native/((native)|(index.node))" .dockerignore > .dockerignore.tmp
693+
mv .dockerignore.tmp .dockerignore
694+
- name: Build image
695+
uses: docker/build-push-action@v6
696+
timeout-minutes: 30
697+
with:
698+
context: .
699+
file: ./packages/cubejs-docker/${{ matrix.dockerfile }}
700+
platforms: linux/amd64
701+
push: true
702+
tags: localhost:5000/cubejs/cube:${{ matrix.tag }}
610703
- name: Testing CubeJS (container mode) via BirdBox
611704
run: |
612705
cd packages/cubejs-testing/

.github/workflows/rust-cubestore-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
- name: Push to Docker Hub
152152
uses: docker/build-push-action@v6
153153
with:
154-
context: ./rust/cubestore
154+
context: ./rust
155155
file: ./rust/cubestore/Dockerfile
156156
platforms: ${{ matrix.platforms }}
157157
build-args: ${{ matrix.build-args }}

.github/workflows/rust-cubestore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
- name: Build only
100100
uses: docker/build-push-action@v6
101101
with:
102-
context: ./rust/cubestore/
102+
context: ./rust/
103103
file: ./rust/cubestore/Dockerfile
104104
platforms: ${{ matrix.platforms }}
105105
build-args: ${{ matrix.build-args }}

docs/pages/product/configuration/data-sources/mysql.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ CUBEJS_DB_PASS=**********
3838
| `CUBEJS_DB_SSL` | If `true`, enables SSL encryption for database connections from Cube | `true`, `false` ||
3939
| `CUBEJS_CONCURRENCY` | The number of concurrent connections each queue has to the database. Default is `2` | A valid number ||
4040
| `CUBEJS_DB_MAX_POOL` | The maximum number of concurrent database connections to pool. Default is `8` | A valid number ||
41+
| `CUBEJS_DB_MYSQL_USE_NAMED_TIMEZONES` | The flag to use time zone names or numeric offsets for time zone conversion. Default is `false` | `true`, `false` ||
4142

4243
## Pre-Aggregation Feature Support
4344

docs/pages/product/configuration/data-sources/snowflake.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ redirect_from:
1212
- [The region][snowflake-docs-regions] for the [Snowflake][snowflake] warehouse
1313
- The username/password for the [Snowflake][snowflake] account
1414

15+
## Snowflake quoted identifiers
16+
17+
Due to an issue in snowflakes opinion about quoted identifers we set a session value to override
18+
snowflake defaults for users that have set an account value for: QUOTED_IDENTIFIERS_IGNORE_CASE
19+
you can learn more about this here: https://docs.snowflake.com/en/sql-reference/identifiers-syntax#double-quoted-identifiers
20+
1521
## Setup
1622

1723
<WarningBox>

docs/pages/product/deployment/cloud/deployment-types.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ module.exports = {
165165
If your implementation of `context_to_app_id` returns identifiers that change
166166
over time for each tenant, requests from one tenant would likely hit multiple
167167
production clusters and you would not have the benefit of reduced memory footprint.
168+
Also you might see 502 or timeout errors in case of different cluster nodes would return different `context_to_app_id` results for the same request.
168169

169170
</WarningBox>
170171

@@ -183,4 +184,4 @@ and select from the available options:
183184
[ref-scalability]: /product/deployment/cloud/scalability
184185
[ref-multitenancy]: /product/configuration/advanced/multitenancy
185186
[ref-auto-sus]: /product/deployment/cloud/auto-suspension
186-
[ref-refresh-worker]: /product/deployment#refresh-worker
187+
[ref-refresh-worker]: /product/deployment#refresh-worker

0 commit comments

Comments
 (0)