Skip to content

Commit 0c332cb

Browse files
committed
Merge branch 'main' into refactor/kelvin-add-query-context
2 parents 9043dd8 + 1b93a02 commit 0c332cb

276 files changed

Lines changed: 13061 additions & 4882 deletions

File tree

Some content is hidden

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

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ GT_KAFKA_ENDPOINTS = localhost:9092
2424

2525
# Setting for fuzz tests
2626
GT_MYSQL_ADDR = localhost:4002
27+
28+
# Setting for unstable fuzz tests
29+
GT_FUZZ_BINARY_PATH=/path/to/
30+
GT_FUZZ_INSTANCE_ROOT_DIR=/tmp/unstable_greptime

.github/actions/fuzz-test/action.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ description: 'Fuzz test given setup and service'
33
inputs:
44
target:
55
description: "The fuzz target to test"
6+
required: true
7+
max-total-time:
8+
description: "Max total time(secs)"
9+
required: true
10+
unstable:
11+
default: 'false'
12+
description: "Enable unstable feature"
613
runs:
714
using: composite
815
steps:
916
- name: Run Fuzz Test
1017
shell: bash
11-
run: cargo fuzz run ${{ inputs.target }} --fuzz-dir tests-fuzz -D -s none -- -max_total_time=120
12-
env:
13-
GT_MYSQL_ADDR: 127.0.0.1:4002
18+
run: cargo fuzz run ${{ inputs.target }} --fuzz-dir tests-fuzz -D -s none ${{ inputs.unstable == 'true' && '--features=unstable' || '' }} -- -max_total_time=${{ inputs.max-total-time }}
19+

.github/pr-title-breaking-change-label-config.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/pr-title-checker-config.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/develop.yml

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,20 @@ jobs:
3838
runs-on: ubuntu-20.04
3939
steps:
4040
- uses: actions/checkout@v4
41-
- uses: crate-ci/typos@v1.13.10
41+
- uses: crate-ci/typos@master
4242
- name: Check the config docs
4343
run: |
4444
make config-docs && \
4545
git diff --name-only --exit-code ./config/config.md \
4646
|| (echo "'config/config.md' is not up-to-date, please run 'make config-docs'." && exit 1)
4747
48+
license-header-check:
49+
runs-on: ubuntu-20.04
50+
name: Check License Header
51+
steps:
52+
- uses: actions/checkout@v4
53+
- uses: korandoru/hawkeye@v5
54+
4855
check:
4956
name: Check
5057
runs-on: ${{ matrix.os }}
@@ -130,7 +137,7 @@ jobs:
130137
runs-on: ubuntu-latest
131138
strategy:
132139
matrix:
133-
target: [ "fuzz_create_table", "fuzz_alter_table", "fuzz_create_database", "fuzz_create_logical_table", "fuzz_alter_logical_table" ]
140+
target: [ "fuzz_create_table", "fuzz_alter_table", "fuzz_create_database", "fuzz_create_logical_table", "fuzz_alter_logical_table", "fuzz_insert", "fuzz_insert_logical_table" ]
134141
steps:
135142
- uses: actions/checkout@v4
136143
- uses: arduino/setup-protoc@v3
@@ -164,8 +171,62 @@ jobs:
164171
uses: ./.github/actions/fuzz-test
165172
env:
166173
CUSTOM_LIBFUZZER_PATH: /usr/lib/llvm-14/lib/libFuzzer.a
174+
GT_MYSQL_ADDR: 127.0.0.1:4002
175+
with:
176+
target: ${{ matrix.target }}
177+
max-total-time: 120
178+
179+
unstable-fuzztest:
180+
name: Unstable Fuzz Test
181+
needs: build
182+
runs-on: ubuntu-latest
183+
strategy:
184+
matrix:
185+
target: [ "unstable_fuzz_create_table_standalone" ]
186+
steps:
187+
- uses: actions/checkout@v4
188+
- uses: arduino/setup-protoc@v3
189+
with:
190+
repo-token: ${{ secrets.GITHUB_TOKEN }}
191+
- uses: dtolnay/rust-toolchain@master
192+
with:
193+
toolchain: ${{ env.RUST_TOOLCHAIN }}
194+
- name: Rust Cache
195+
uses: Swatinem/rust-cache@v2
196+
with:
197+
# Shares across multiple jobs
198+
shared-key: "fuzz-test-targets"
199+
- name: Set Rust Fuzz
200+
shell: bash
201+
run: |
202+
sudo apt update && sudo apt install -y libfuzzer-14-dev
203+
cargo install cargo-fuzz
204+
- name: Download pre-built binaries
205+
uses: actions/download-artifact@v4
206+
with:
207+
name: bins
208+
path: .
209+
- name: Unzip binaries
210+
run: tar -xvf ./bins.tar.gz
211+
- name: Fuzz Test
212+
uses: ./.github/actions/fuzz-test
213+
env:
214+
CUSTOM_LIBFUZZER_PATH: /usr/lib/llvm-14/lib/libFuzzer.a
215+
GT_MYSQL_ADDR: 127.0.0.1:4002
216+
GT_FUZZ_BINARY_PATH: ./bins/greptime
217+
GT_FUZZ_INSTANCE_ROOT_DIR: /tmp/unstable-greptime/
167218
with:
168219
target: ${{ matrix.target }}
220+
max-total-time: 120
221+
unstable: 'true'
222+
- name: Upload unstable fuzz test logs
223+
if: failure()
224+
uses: actions/upload-artifact@v4
225+
with:
226+
name: unstable-fuzz-logs
227+
path: /tmp/unstable-greptime/
228+
retention-days: 3
229+
169230

170231
sqlness:
171232
name: Sqlness Test
@@ -265,7 +326,7 @@ jobs:
265326
# Shares with `Check` job
266327
shared-key: "check-lint"
267328
- name: Run cargo clippy
268-
run: cargo clippy --workspace --all-targets -- -D warnings
329+
run: make clippy
269330

270331
coverage:
271332
if: github.event.pull_request.draft == false

.github/workflows/docs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ jobs:
3434
runs-on: ubuntu-20.04
3535
steps:
3636
- uses: actions/checkout@v4
37-
- uses: crate-ci/typos@v1.13.10
37+
- uses: crate-ci/typos@master
38+
39+
license-header-check:
40+
runs-on: ubuntu-20.04
41+
name: Check License Header
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: korandoru/hawkeye@v5
3845

3946
check:
4047
name: Check

.github/workflows/license.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/nightly-ci.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Nightly CI: runs tests every night for our second tier plaforms (Windows)
2-
31
on:
42
schedule:
53
- cron: '0 23 * * 1-5'
@@ -15,13 +13,29 @@ env:
1513
RUST_TOOLCHAIN: nightly-2024-04-18
1614

1715
jobs:
18-
sqlness:
19-
name: Sqlness Test
16+
sqlness-test:
17+
name: Run sqlness test
18+
if: ${{ github.repository == 'GreptimeTeam/greptimedb' }}
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Run sqlness test
27+
uses: ./.github/actions/sqlness-test
28+
with:
29+
data-root: sqlness-test
30+
aws-ci-test-bucket: ${{ vars.AWS_CI_TEST_BUCKET }}
31+
aws-region: ${{ vars.AWS_CI_TEST_BUCKET_REGION }}
32+
aws-access-key-id: ${{ secrets.AWS_CI_TEST_ACCESS_KEY_ID }}
33+
aws-secret-access-key: ${{ secrets.AWS_CI_TEST_SECRET_ACCESS_KEY }}
34+
35+
sqlness-windows:
36+
name: Sqlness tests on Windows
2037
if: ${{ github.repository == 'GreptimeTeam/greptimedb' }}
21-
runs-on: ${{ matrix.os }}
22-
strategy:
23-
matrix:
24-
os: [ windows-latest-8-cores ]
38+
runs-on: windows-latest-8-cores
2539
timeout-minutes: 60
2640
steps:
2741
- uses: actions/checkout@v4
@@ -52,6 +66,7 @@ jobs:
5266
retention-days: 3
5367

5468
test-on-windows:
69+
name: Run tests on Windows
5570
if: ${{ github.repository == 'GreptimeTeam/greptimedb' }}
5671
runs-on: windows-latest-8-cores
5772
timeout-minutes: 60

.github/workflows/nightly-funtional-tests.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/pr-title-checker.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)