Skip to content

Commit

Permalink
Merge branch 'master' into chore/deps-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
KSDaemon authored Jan 24, 2025
2 parents 0cd5911 + 3822107 commit fd25552
Show file tree
Hide file tree
Showing 112 changed files with 6,154 additions and 2,278 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
- 'package.json'
- 'yarn.lock'

env:
CUBEJS_TESSERACT_ORCHESTRATOR: true

jobs:
latest-tag-sha:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -59,15 +62,31 @@ jobs:
matrix:
node-version: [ 20.x ]
db: [ 'athena', 'bigquery', 'snowflake' ]
target: [ "x86_64-unknown-linux-gnu" ]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
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@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install cargo-cp-artifact
run: npm install -g [email protected]
- uses: Swatinem/rust-cache@v2
with:
workspaces: ./packages/cubejs-backend-native
key: native-${{ runner.OS }}-${{ matrix.target }}
shared-key: native-${{ runner.OS }}-${{ matrix.target }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
Expand All @@ -87,6 +106,8 @@ jobs:
run: yarn build
- name: Lerna tsc
run: yarn tsc
- name: Build native (no python)
run: cd packages/cubejs-backend-native && npm run native:build-release
- name: Run Integration tests for ${{ matrix.db }} matrix
timeout-minutes: 30
env:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/drivers-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ on:
- 'packages/cubejs-backend-native/**'
- 'rust/cubesql/**'

env:
CUBEJS_TESSERACT_ORCHESTRATOR: true

jobs:
latest-tag-sha:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -117,8 +120,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
workspaces: ./packages/cubejs-backend-native
key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
shared-key: native-${{ runner.OS }}-x86_64-unknown-linux-gnu
key: native-${{ runner.OS }}-${{ matrix.target }}
shared-key: native-${{ runner.OS }}-${{ matrix.target }}
- name: Build native (fallback)
if: (matrix.python-version == 'fallback')
env:
Expand Down Expand Up @@ -165,7 +168,12 @@ jobs:
uses: actions/download-artifact@v4
with:
name: backend-native
path: packages/cubejs-backend-native/
path: packages/cubejs-backend-native
# current .dockerignore prevents use of native build
- name: Unignore native from .dockerignore
run: |
grep -v -E "packages/cubejs-backend-native/((native)|(index.node))" .dockerignore > .dockerignore.tmp
mv .dockerignore.tmp .dockerignore
- name: Build and push
uses: docker/build-push-action@v6
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- 'rust/cubesql/**'
branches:
- master
env:
CUBEJS_TESSERACT_ORCHESTRATOR: true
jobs:
latest-tag-sha:
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ jobs:
- name: Push to Docker Hub
uses: docker/build-push-action@v6
with:
context: ./rust/cubestore/
context: ./rust/
file: ./rust/cubestore/Dockerfile
platforms: ${{ matrix.platforms }}
build-args: ${{ matrix.build-args }}
Expand Down
123 changes: 108 additions & 15 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- 'packages/**'
- 'rust/cubestore/**'
- 'rust/cubesql/**'
- 'rust/cubenativeutils/**'
- 'rust/cubeorchestrator/**'
- 'rust/cubeshared/**'
- 'rust/cubesqlplanner/**'
- '.eslintrc.js'
- '.prettierrc'
- 'package.json'
Expand All @@ -24,13 +28,20 @@ on:
- 'packages/**'
- 'rust/cubestore/**'
- 'rust/cubesql/**'
- 'rust/cubenativeutils/**'
- 'rust/cubeorchestrator/**'
- 'rust/cubeshared/**'
- 'rust/cubesqlplanner/**'
- '.eslintrc.js'
- '.prettierrc'
- 'package.json'
- 'lerna.json'
- 'rollup.config.js'
- 'yarn.lock'

env:
CUBEJS_TESSERACT_ORCHESTRATOR: true

jobs:
unit:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -95,14 +106,15 @@ jobs:
command: yarn install --frozen-lockfile
- name: Lerna tsc
run: yarn tsc
- name: Build native (no python)
run: cd packages/cubejs-backend-native && npm run native:build-release
- name: Build client
run: yarn build
- name: Build cubejs-backend-native (with Python)
run: yarn run native:build-release-python
working-directory: ./packages/cubejs-backend-native
env:
PYO3_PYTHON: python${{ matrix.python-version }}

- name: Lerna test
run: yarn lerna run --concurrency 1 --stream --no-prefix unit
# - uses: codecov/codecov-action@v1
Expand All @@ -111,6 +123,21 @@ jobs:
# files: ./packages/*/coverage/clover.xml
# flags: cube-backend
# verbose: true # optional (default = false)
- name: Cargo test cubeorchestrator
run: |
cargo test --manifest-path rust/cubeorchestrator/Cargo.toml -j 1
- name: Cargo test cubenativeutils
run: |
cargo test --manifest-path rust/cubenativeutils/Cargo.toml -j 1
- name: Cargo test cubeshared
run: |
cargo test --manifest-path rust/cubeshared/Cargo.toml -j 1
# - name: Cargo test cubesql
# run: |
# cargo test --manifest-path rust/cubesql/Cargo.toml -j 1
# - name: Cargo test cubesqlplanner
# run: |
# cargo test --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -j 1

lint:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -159,6 +186,21 @@ jobs:
run: yarn lint:npm
- name: Lerna lint
run: yarn lerna run --concurrency 1 lint
- name: Cargo fmt cubeorchestrator
run: |
cargo fmt --manifest-path rust/cubeorchestrator/Cargo.toml -- --check
- name: Cargo fmt cubenativeutils
run: |
cargo fmt --manifest-path rust/cubenativeutils/Cargo.toml -- --check
- name: Cargo fmt cubeshared
run: |
cargo fmt --manifest-path rust/cubeshared/Cargo.toml -- --check
# - name: Cargo fmt cubesql
# run: |
# cargo fmt --manifest-path rust/cubesql/Cargo.toml -- --check
# - name: Cargo fmt cubesqlplanner
# run: |
# cargo fmt --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -- --check

build:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -211,6 +253,21 @@ jobs:
run: yarn lerna run --concurrency 1 build
env:
NODE_OPTIONS: --max_old_space_size=4096
- name: Cargo build cubeorchestrator
run: |
cargo build --manifest-path rust/cubeorchestrator/Cargo.toml -j 4
- name: Cargo build cubenativeutils
run: |
cargo build --manifest-path rust/cubenativeutils/Cargo.toml -j 4
- name: Cargo build cubeshared
run: |
cargo build --manifest-path rust/cubeshared/Cargo.toml -j 4
# - name: Cargo build cubesql
# run: |
# cargo build --manifest-path rust/cubesql/Cargo.toml -j 4
# - name: Cargo build cubesqlplanner
# run: |
# cargo build --manifest-path rust/cubesqlplanner/cubesqlplanner/Cargo.toml -j 4

build-cubestore:
needs: [latest-tag-sha]
Expand Down Expand Up @@ -276,6 +333,13 @@ jobs:
df -h
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2024-07-15
# override: true # this is by default on
rustflags: ""
components: rustfmt
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -305,6 +369,9 @@ jobs:
command: yarn install --frozen-lockfile
- name: Lerna tsc
run: yarn tsc
- name: Build cubejs-backend-native (without Python)
run: yarn run native:build-release
working-directory: ./packages/cubejs-backend-native
- name: Download cubestored-x86_64-unknown-linux-gnu-release artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -539,6 +606,8 @@ jobs:
- 5000:5000
strategy:
matrix:
node-version: [ 20 ]
target: [ "x86_64-unknown-linux-gnu" ]
dockerfile:
- dev.Dockerfile
include:
Expand All @@ -565,21 +634,29 @@ jobs:
df -h
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build image
uses: docker/build-push-action@v6
timeout-minutes: 30
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
context: .
file: ./packages/cubejs-docker/${{ matrix.dockerfile }}
platforms: linux/amd64
push: true
tags: localhost:5000/cubejs/cube:${{ matrix.tag }}
- name: Use Node.js 20.x
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@v4
with:
node-version: 20.x
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install -g yarn
- name: Set Yarn version
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:
workspaces: ./packages/cubejs-backend-native
key: native-${{ runner.OS }}-${{ matrix.target }}
shared-key: native-${{ runner.OS }}-${{ matrix.target }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"
Expand All @@ -591,8 +668,6 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set Yarn version
run: yarn policies set-version v1.22.22
- name: Yarn install
uses: nick-fields/retry@v3
env:
Expand All @@ -607,6 +682,24 @@ jobs:
run: yarn build
- name: Lerna tsc
run: yarn tsc
- name: Build native (no python)
run: cd packages/cubejs-backend-native && npm run native:build-release
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# current .dockerignore prevents use of native build
- name: Unignore native from .dockerignore
run: |
grep -v -E "packages/cubejs-backend-native/((native)|(index.node))" .dockerignore > .dockerignore.tmp
mv .dockerignore.tmp .dockerignore
- name: Build image
uses: docker/build-push-action@v6
timeout-minutes: 30
with:
context: .
file: ./packages/cubejs-docker/${{ matrix.dockerfile }}
platforms: linux/amd64
push: true
tags: localhost:5000/cubejs/cube:${{ matrix.tag }}
- name: Testing CubeJS (container mode) via BirdBox
run: |
cd packages/cubejs-testing/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-cubestore-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
- name: Push to Docker Hub
uses: docker/build-push-action@v6
with:
context: ./rust/cubestore
context: ./rust
file: ./rust/cubestore/Dockerfile
platforms: ${{ matrix.platforms }}
build-args: ${{ matrix.build-args }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-cubestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Build only
uses: docker/build-push-action@v6
with:
context: ./rust/cubestore/
context: ./rust/
file: ./rust/cubestore/Dockerfile
platforms: ${{ matrix.platforms }}
build-args: ${{ matrix.build-args }}
Expand Down
1 change: 1 addition & 0 deletions docs/pages/product/configuration/data-sources/mysql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ CUBEJS_DB_PASS=**********
| `CUBEJS_DB_SSL` | If `true`, enables SSL encryption for database connections from Cube | `true`, `false` ||
| `CUBEJS_CONCURRENCY` | The number of concurrent connections each queue has to the database. Default is `2` | A valid number ||
| `CUBEJS_DB_MAX_POOL` | The maximum number of concurrent database connections to pool. Default is `8` | A valid number ||
| `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` ||

## Pre-Aggregation Feature Support

Expand Down
6 changes: 6 additions & 0 deletions docs/pages/product/configuration/data-sources/snowflake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ redirect_from:
- [The region][snowflake-docs-regions] for the [Snowflake][snowflake] warehouse
- The username/password for the [Snowflake][snowflake] account

## Snowflake quoted identifiers

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

## Setup

<WarningBox>
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/product/deployment/cloud/deployment-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ module.exports = {
If your implementation of `context_to_app_id` returns identifiers that change
over time for each tenant, requests from one tenant would likely hit multiple
production clusters and you would not have the benefit of reduced memory footprint.
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.

</WarningBox>

Expand All @@ -183,4 +184,4 @@ and select from the available options:
[ref-scalability]: /product/deployment/cloud/scalability
[ref-multitenancy]: /product/configuration/advanced/multitenancy
[ref-auto-sus]: /product/deployment/cloud/auto-suspension
[ref-refresh-worker]: /product/deployment#refresh-worker
[ref-refresh-worker]: /product/deployment#refresh-worker
Loading

0 comments on commit fd25552

Please sign in to comment.