Skip to content

Commit 2d43b69

Browse files
authored
Merge branch 'master' into master
2 parents 2d427c3 + e9fdf95 commit 2d43b69

File tree

519 files changed

+69939
-35283
lines changed

Some content is hidden

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

519 files changed

+69939
-35283
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.

.github/actions/smoke.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ 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::RBAC"
61+
yarn lerna run --concurrency 1 --stream --no-prefix smoke:rbac
62+
echo "::endgroup::"

.github/workflows/drivers-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ jobs:
196196
databricks-jdbc
197197
databricks-jdbc-export-bucket-s3
198198
databricks-jdbc-export-bucket-azure
199+
redshift
200+
redshift-export-bucket-s3
199201
snowflake
200202
snowflake-export-bucket-s3
201203
snowflake-export-bucket-azure
@@ -221,6 +223,8 @@ jobs:
221223
- mssql
222224
- mysql
223225
- postgres
226+
- redshift
227+
- redshift-export-bucket-s3
224228
- snowflake
225229
- snowflake-export-bucket-s3
226230
- snowflake-export-bucket-azure
@@ -312,6 +316,11 @@ jobs:
312316
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY }}
313317
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET }}
314318

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+
315324
# Snowflake
316325
DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER }}
317326
DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS }}
@@ -324,3 +333,4 @@ jobs:
324333
cd ./packages/cubejs-testing-drivers
325334
export DEBUG=testcontainers
326335
yarn ${{ matrix.database }}-full
336+

.github/workflows/post-release.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
})

.github/workflows/publish.yml

Lines changed: 75 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
strategy:
153153
matrix:
154154
node-version: [20.x]
155-
os-version: ["macos-12"]
155+
os-version: ["macos-13"]
156156
target: ["x86_64-apple-darwin", "aarch64-apple-darwin"]
157157
python-version: ["3.9", "3.10", "3.11", "3.12", "fallback"]
158158
include:
@@ -191,7 +191,7 @@ jobs:
191191
components: rustfmt
192192
target: ${{ matrix.target }}
193193
- name: Install Python
194-
uses: actions/setup-python@v4
194+
uses: actions/setup-python@v5
195195
if: (matrix.python-version != 'fallback')
196196
with:
197197
python-version: ${{ matrix.python-version }}
@@ -265,7 +265,7 @@ jobs:
265265
rustflags: ""
266266
components: rustfmt
267267
- name: Install Python
268-
uses: actions/setup-python@v4
268+
uses: actions/setup-python@v5
269269
if: (matrix.python-version != 'fallback')
270270
with:
271271
python-version: ${{ matrix.python-version }}
@@ -305,7 +305,7 @@ jobs:
305305
overwrite: true
306306

307307
docker-default:
308-
needs: [npm, cubestore_linux, native_linux]
308+
needs: [npm, cubestore_linux, native_linux, detect_branch]
309309
name: Debian docker image
310310
runs-on: ${{ matrix.os }}
311311
strategy:
@@ -345,7 +345,11 @@ jobs:
345345
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
346346
MINOR=${VERSION%.*}
347347
MAJOR=${MINOR%.*}
348-
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR},${DOCKER_IMAGE}:${MAJOR},${DOCKER_IMAGE}:latest"
348+
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR},${DOCKER_IMAGE}:${MAJOR}"
349+
fi
350+
351+
if [ "${{ needs['detect_branch'].outputs.is_master }}" = "true" ]; then
352+
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
349353
fi
350354
351355
{
@@ -385,7 +389,7 @@ jobs:
385389
IMAGE_VERSION=${{ steps.prep.outputs.version }}
386390
387391
docker-debian-jdk:
388-
needs: [npm, cubestore_linux, native_linux]
392+
needs: [npm, cubestore_linux, native_linux, detect_branch]
389393
name: Debian with jdk docker image
390394
runs-on: ubuntu-24.04
391395
timeout-minutes: 30
@@ -420,11 +424,15 @@ jobs:
420424
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
421425
MINOR=${VERSION%.*}
422426
MAJOR=${MINOR%.*}
423-
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}-jdk,${DOCKER_IMAGE}:${MAJOR}-jdk,${DOCKER_IMAGE}:jdk"
427+
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}-jdk,${DOCKER_IMAGE}:${MAJOR}-jdk"
424428
elif [ "${{ github.event_name }}" = "push" ]; then
425429
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}-jdk"
426430
fi
427431
432+
if [ "${{ needs['detect_branch'].outputs.is_master }}" = "true" ]; then
433+
TAGS="$TAGS,${DOCKER_IMAGE}:jdk"
434+
fi
435+
428436
{
429437
echo "version=${VERSION}"
430438
echo "tags=${TAGS}"
@@ -464,6 +472,7 @@ jobs:
464472
docker-cubestore:
465473
name: Cube Store Docker
466474
runs-on: ${{ matrix.os }}
475+
needs: [detect_branch]
467476
strategy:
468477
fail-fast: false
469478
matrix:
@@ -521,7 +530,11 @@ jobs:
521530
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
522531
MINOR=${VERSION%.*}
523532
MAJOR=${MINOR%.*}
524-
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}${{ matrix.postfix }},${DOCKER_IMAGE}:${MAJOR}${{ matrix.postfix }},${DOCKER_IMAGE}:${{ matrix.tag }}"
533+
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}${{ matrix.postfix }},${DOCKER_IMAGE}:${MAJOR}${{ matrix.postfix }}"
534+
fi
535+
536+
if [ "${{ needs['detect_branch'].outputs.is_master }}" = "true" ]; then
537+
TAGS="$TAGS,${DOCKER_IMAGE}:${{ matrix.tag }}"
525538
fi
526539
527540
{
@@ -653,17 +666,26 @@ jobs:
653666
target:
654667
- x86_64-pc-windows-msvc
655668
- x86_64-apple-darwin
669+
- aarch64-apple-darwin
656670
include:
657671
- target: x86_64-pc-windows-msvc
658672
os: windows-2019
659673
executable_name: cubestored.exe
660674
strip: true
661675
# cubestored.exe: CantPackException: superfluous data between sections
662676
compress: false
663-
# Please use minimal possible version of macOS, because it produces constraint on libstdc++
664677
tar_executable: tar
678+
# Please use minimal possible version of macOS, because it produces constraint on libstdc++
665679
- target: x86_64-apple-darwin
666-
os: macos-12
680+
os: macos-13
681+
executable_name: cubestored
682+
# upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05.
683+
strip: false
684+
compress: false
685+
# bsd tar has a different format with Sparse files which breaks download script
686+
tar_executable: gtar
687+
- os: macos-14
688+
target: aarch64-apple-darwin
667689
executable_name: cubestored
668690
# upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05.
669691
strip: false
@@ -744,7 +766,7 @@ jobs:
744766
name: Trigger test suites run
745767
runs-on: ubuntu-20.04
746768
needs: [docker-default]
747-
timeout-minutes: 60
769+
timeout-minutes: 15
748770
steps:
749771
- name: Checkout
750772
uses: actions/checkout@v4
@@ -769,3 +791,45 @@ jobs:
769791
'initiator': '${{ github.actor }}'
770792
}
771793
})
794+
795+
detect_branch:
796+
runs-on: ubuntu-24.04
797+
outputs:
798+
is_master: ${{ steps.detect_branch.outputs.is_master }}
799+
branch: ${{ steps.detect_branch.outputs.branch }}
800+
steps:
801+
- name: Checkout
802+
uses: actions/checkout@v4
803+
- name: Detect branch name
804+
id: detect_branch
805+
run: |
806+
# Git & GitHub (for now) doesn't provide an easy/stable way to detect branch name from tag.
807+
echo "branch=master" >> "$GITHUB_OUTPUT"
808+
echo "is_master=true" >> "$GITHUB_OUTPUT"
809+
810+
trigger-repo-sync:
811+
name: Trigger runtime repo
812+
runs-on: ubuntu-20.04
813+
needs: [docker-default, detect_branch]
814+
timeout-minutes: 15
815+
steps:
816+
- name: Checkout
817+
uses: actions/checkout@v4
818+
- name: Trigger runtime
819+
uses: actions/github-script@v7
820+
with:
821+
github-token: ${{ secrets.GH_TRIGGER_TOKEN }}
822+
script: |
823+
const tagName = process.env.GITHUB_REF.replace('refs/tags/', '');
824+
const branchName = '${{ needs['detect_branch'].outputs.branch }}';
825+
826+
await github.rest.actions.createWorkflowDispatch({
827+
owner: 'cubedevinc',
828+
repo: 'cube-runtime',
829+
workflow_id: 'sync.yml',
830+
ref: 'master',
831+
inputs: {
832+
'tag': tagName,
833+
'branch': branchName,
834+
}
835+
})

.github/workflows/rust-cubesql.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ jobs:
6262
# We use host instead of cross container, because it's much faster
6363
runs-on: ubuntu-24.04
6464
timeout-minutes: 60
65-
name: Unit (Rewrite Engine)
65+
name: Unit (Rewrite Engine) (CUBESQL_TOP_DOWN_EXTRACTOR=${{ matrix.top-down-extractor }})
66+
strategy:
67+
matrix:
68+
top-down-extractor: ['true', 'false']
69+
fail-fast: false
6670

6771
steps:
6872
- name: Checkout
@@ -90,6 +94,7 @@ jobs:
9094
CUBESQL_TESTING_CUBE_TOKEN: ${{ secrets.CUBESQL_TESTING_CUBE_TOKEN }}
9195
CUBESQL_TESTING_CUBE_URL: ${{ secrets.CUBESQL_TESTING_CUBE_URL }}
9296
CUBESQL_SQL_PUSH_DOWN: true
97+
CUBESQL_TOP_DOWN_EXTRACTOR: ${{ matrix.top-down-extractor }}
9398
CUBESQL_REWRITE_CACHE: true
9499
CUBESQL_REWRITE_TIMEOUT: 60
95100
run: |
@@ -245,7 +250,7 @@ jobs:
245250
components: rustfmt
246251
target: ${{ matrix.target }}
247252
- name: Install Python
248-
uses: actions/setup-python@v4
253+
uses: actions/setup-python@v5
249254
if: (matrix.python-version != 'fallback')
250255
with:
251256
python-version: ${{ matrix.python-version }}
@@ -327,7 +332,7 @@ jobs:
327332
rustflags: ""
328333
components: rustfmt
329334
- name: Install Python
330-
uses: actions/setup-python@v4
335+
uses: actions/setup-python@v5
331336
if: (matrix.python-version != 'fallback')
332337
with:
333338
python-version: ${{ matrix.python-version }}

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
- name: Set up Docker Buildx
150150
uses: docker/setup-buildx-action@v3
151151
- name: Push to Docker Hub
152-
uses: docker/build-push-action@v3
152+
uses: docker/build-push-action@v6
153153
with:
154154
context: ./rust/cubestore
155155
file: ./rust/cubestore/Dockerfile
@@ -187,6 +187,7 @@ jobs:
187187
target:
188188
- x86_64-pc-windows-msvc
189189
- x86_64-apple-darwin
190+
- aarch64-apple-darwin
190191
include:
191192
- os: windows-2019
192193
target: x86_64-pc-windows-msvc
@@ -195,12 +196,18 @@ jobs:
195196
# cubestored.exe: CantPackException: superfluous data between sections
196197
compress: false
197198
# Please use minimal possible version of macOS, because it produces constraint on libstdc++
198-
- os: macos-12
199+
- os: macos-13
199200
target: x86_64-apple-darwin
200201
executable_name: cubestored
201202
# upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05.
202203
strip: false
203204
compress: false
205+
- os: macos-14
206+
target: aarch64-apple-darwin
207+
executable_name: cubestored
208+
# upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05.
209+
strip: false
210+
compress: false
204211
fail-fast: false
205212
steps:
206213
- uses: actions/checkout@v4

.github/workflows/rust-cubestore.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- name: Set up Docker Buildx
9898
uses: docker/setup-buildx-action@v3
9999
- name: Build only
100-
uses: docker/build-push-action@v3
100+
uses: docker/build-push-action@v6
101101
with:
102102
context: ./rust/cubestore/
103103
file: ./rust/cubestore/Dockerfile
@@ -118,6 +118,7 @@ jobs:
118118
target:
119119
- x86_64-pc-windows-msvc
120120
- x86_64-apple-darwin
121+
- aarch64-apple-darwin
121122
include:
122123
- os: windows-2019
123124
target: x86_64-pc-windows-msvc
@@ -126,12 +127,18 @@ jobs:
126127
# cubestored.exe: CantPackException: superfluous data between sections
127128
compress: false
128129
# Please use minimal possible version of macOS, because it produces constraint on libstdc++
129-
- os: macos-12
130+
- os: macos-13
130131
target: x86_64-apple-darwin
131132
executable_name: cubestored
132133
# upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05.
133134
strip: false
134135
compress: false
136+
- os: macos-14
137+
target: aarch64-apple-darwin
138+
executable_name: cubestored
139+
# upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05.
140+
strip: false
141+
compress: false
135142
fail-fast: false
136143
steps:
137144
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)