Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7da5fe5
refactor: rewrite test_compat_fuse
dantengsky Feb 10, 2026
9f17bcd
refactor: extract fuse compat test matrix into test_cases.yaml
dantengsky Feb 10, 2026
1a3faff
docs: update compat_fuse README to match current implementation
dantengsky Feb 10, 2026
534c428
refactor: merge compat-stateless flashback tests into parameterized s…
dantengsky Feb 10, 2026
2d0087f
fix: correct NEW_FMT_VER for v2 case and document stateless field in …
dantengsky Feb 10, 2026
f480d60
fix: use current meta for reader phase in meta compression cases
dantengsky Feb 11, 2026
e70e404
refactor: replace hand-rolled yaml parser with PyYAML
dantengsky Feb 11, 2026
e5245e1
fix: add intermediate meta upgrade steps for meta compression cases
dantengsky Feb 11, 2026
db0b59d
fix: restore original meta chains and download reader binary
dantengsky Feb 11, 2026
fac5ec6
fix: bump meta versions to satisfy current query min-compatible-metas…
dantengsky Feb 12, 2026
b7ae2a0
fix: remove V0 compat tests (1.0.56/1.1.30) dropped since ea91e06b93
dantengsky Feb 12, 2026
891220a
fix: add .test extension to sqllogictest files so runner actually exe…
dantengsky Feb 12, 2026
8ff564b
fix: remove trailing commas in base/fuse_compat_write.test
dantengsky Feb 12, 2026
c0be702
fix: update expected show grants output in revoke/fuse_compat_read
dantengsky Feb 12, 2026
afc4f7d
fix: split rbac tests into basic (1.2.311) and full (1.2.833) suites
dantengsky Feb 12, 2026
f4c9b10
fix: typo in rbac_all read test - access procedure, not access sequence
dantengsky Feb 12, 2026
37e70ce
refactor: rename rbac test suites to include version context
dantengsky Feb 13, 2026
f1c5e96
fix: suppress noisy CI output from git advice and old binary backtraces
dantengsky Feb 13, 2026
6099bd6
refactor: improve version check output in CI logs
dantengsky Feb 13, 2026
91c4e7f
fix: lazy-import PyYAML so single-case mode works without it
dantengsky Feb 13, 2026
214cc32
docs: clarify procedure version comment in test_cases.yaml
dantengsky Feb 13, 2026
bcc9ef7
docs: fix sqllogictest filenames in README to include .test extension
dantengsky Feb 13, 2026
4c5b0bd
docs: fix docstring to cover both backward and forward compat
dantengsky Feb 13, 2026
3bfb359
fix: use explicit privilege list instead of ALL in revoke write test
dantengsky Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .github/actions/test_compat_fuse/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@ runs:
- name: Test compatibility
shell: bash
run: |
bash ./tests/compat_fuse/test_compat_fuse.sh --writer-version 1.2.46 --reader-version current --meta-versions 1.2.527 1.2.677 1.2.833 --logictest-path base
bash ./tests/compat_fuse/test_compat_fuse.sh --writer-version 1.2.241 --reader-version current --meta-versions 1.2.527 1.2.677 1.2.833 --logictest-path revoke
bash ./tests/compat_fuse/test_compat_fuse.sh --writer-version 1.2.311 --reader-version current --meta-versions 1.2.527 1.2.677 1.2.833 --logictest-path rbac
bash ./tests/compat_fuse/test_compat_fuse.sh --writer-version 1.2.318 --reader-version current --meta-versions 1.2.527 1.2.677 1.2.833 --logictest-path rbac
bash ./tests/compat_fuse/test_compat_fuse.sh --writer-version 1.2.680 --reader-version current --meta-versions 1.2.680 1.2.833 --logictest-path udf

bash ./tests/compat_fuse/test_compat_fuse.sh --writer-version current --reader-version 1.2.311 --meta-versions 1.2.770 --logictest-path rbac
bash ./tests/compat_fuse/test_compat_fuse.sh --writer-version current --reader-version 1.2.318 --meta-versions 1.2.770 --logictest-path rbac
bash ./tests/compat_fuse/test_compat_fuse.sh --writer-version current --reader-version 1.2.680 --meta-versions 1.2.770 --logictest-path udf
pip install pyyaml -q
python3 ./tests/compat_fuse/test_compat_fuse.py --run-all
- name: Upload failure
if: failure()
uses: ./.github/actions/artifact_failure
Expand Down
67 changes: 50 additions & 17 deletions tests/compat_fuse/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,68 @@
# Fuse table compatibility test

This script tests whether a newer version databend-query can read fuse table data written
by a older version databend-query.
Tests write-then-read compatibility of fuse-table format across databend-query versions.

- **Backward compat**: old writer → current reader
- **Forward compat**: current writer → old reader

## Test matrix

All test cases are defined in `test_cases.yaml`. Each entry specifies:

| Field | Description |
|------------|--------------------------------------------------------------------|
| `writer` | Query version that writes data (`"current"` = latest build) |
| `reader` | Query version that reads data (`"current"` = latest build) |
| `meta` | Meta-service versions to run in order (upgrades on-disk meta data) |
| `suite` | sqllogictest sub-directory under `compat-logictest/` |

To add a test case, append an entry to `test_cases.yaml`.

## Usage

Run all cases (CI mode):

```shell
tests/compat_fuse/test_compat_fuse.sh <old_ver>
tests/compat_fuse/test_compat_fuse_forward.sh <old_ver>
python3 tests/compat_fuse/test_compat_fuse.py --run-all
```

E.g. `tests/compat_fuse/test-compat_fuse.sh 0.7.151` tests if the fuse-table written
by **databend-query-0.7.151** can be read by **current** version databend-query.
Dry run (print cases without executing):

`tests/compat_fuse/test-fuse-forward-compat.sh 1.2.307` tests if the fuse-table written
by **current** can be read by **databend-query-0.7.151** version databend-query.
```shell
python3 tests/compat_fuse/test_compat_fuse.py --run-all --dry-run
```

Run a single case (local debugging):

```shell
python3 tests/compat_fuse/test_compat_fuse.py \
--writer-version 1.2.46 \
--reader-version current \
--meta-versions 1.2.527 1.2.677 1.2.833 \
--logictest-path base
```

## Prerequisites

- Current version of databend-query and databend-meta must reside in `./bins`:
- `./bins/current/databend-query`
- `./bins/current/databend-meta`
Current version binaries must reside in `./bins/current/bin/`:

- `databend-query`
- `databend-meta`
- `databend-sqllogictests`

This is handled by the CI setup action. Old version binaries are downloaded automatically.

## Test flow

Since building a binary takes several minutes,
this step is usually done by the calling process, e.g., the CI script.
For each case, the script runs three phases:

1. **Write** — start meta (first version) + query (writer version), run `fuse_compat_write.test`
2. **Meta upgrade** — cycle through all meta versions to upgrade on-disk data
3. **Read** — start meta (last version) + query (reader version), run `fuse_compat_read.test`

## Testing data

- Suite `tests/compat_fuse/compat-logictest/fuse_compat_write` writes data into a fuse table via an old version query.
- Suite `tests/compat_fuse/compat-logictest/fuse_compat_read` reads the data via current version query.
Each suite under `compat-logictest/` contains two sqllogictest files:

Fuse table maintainers update these two `logictest` scripts to let the write/read
operations cover fuse-table features.
- `fuse_compat_write.test` — creates tables and writes data
- `fuse_compat_read.test` — reads and verifies the data

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading