Skip to content

refactor: extract fuse compat test matrix into test_cases.yaml#19441

Merged
dantengsky merged 24 commits intodatabendlabs:mainfrom
dantengsky:refactor/fuse-compatibility-check
Feb 13, 2026
Merged

refactor: extract fuse compat test matrix into test_cases.yaml#19441
dantengsky merged 24 commits intodatabendlabs:mainfrom
dantengsky:refactor/fuse-compatibility-check

Conversation

@dantengsky
Copy link
Member

@dantengsky dantengsky commented Feb 10, 2026

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Extract the 8 hardcoded python3 invocations in action.yml into a declarative test_cases.yaml file, and fix a pre-existing bug where all compat_fuse sqllogictest files have never been executed since 2025-02-14.

Refactoring: test matrix extraction

  • test_cases.yaml: declarative test matrix with comments
  • test_compat_fuse.py: add --run-all / --dry-run, use PyYAML for parsing
  • action.yml: 8 lines → 1 line python3 ... --run-all
  • Single-case CLI mode preserved for local debugging

Bug fix: compat_fuse sqllogictest silently broken since 2025-02-14

Root cause: 54fceaa6b0 (2025-02-14, PR #17449) added a .test extension filter to the sqllogictest runner. All compat_fuse test files (fuse_compat_write, fuse_compat_read) lack the .test extension. From that point on, the runner silently skipped them — CI reported green with Run all tests[0] (0 tests executed).

Subsequent PRs added incompatible SQL without noticing. After the filter silenced execution, multiple PRs added SQL that older writer versions don't support.

Fixes:

  • Rename all test files to .test extension so the runner finds them
  • Update --run_file parameter to match new filenames
  • Fix trailing commas in base/fuse_compat_write.test (incompatible with writer 1.2.46)
  • Update revoke/fuse_compat_read.test expected output for show grants (current query expands ALL into individual privilege names)

RBAC test suite changes

After the .test extension filter silenced test execution (2025-02-14), PRs #17262, #18382, #18423, #18730 added procedure/sequence/connection/warehouse SQL to rbac/fuse_compat_write that writer versions 1.2.311/1.2.318 don't support. The original rbac suite (from PR #14393, writer 1.2.306, bumped to 1.2.311 in PR #18500) was basic role/grant/ownership tests only.

Split into two version-aware suites:

  • rbac_v1_2_311/ — original basic rbac test (reverted to pre-54fceaa6b0 content), used by writer 1.2.311 and 1.2.318
  • rbac_current/ — full rbac test with procedure/sequence/connection/warehouse, writer 1.2.833

Typo fix in rbac_current/fuse_compat_read.test: GRANT access sequence on procedure p1(int)GRANT access procedure on procedure p1(int). The original SQL (from PR #18730) is syntactically invalid — after GRANT access sequence on, the parser expects a sequence name, not the reserved keyword procedure. Likely a copy-paste error from the line above (GRANT access sequence on sequence seq2). Changed to access procedure to match the object type.

Removed: V0 compat tests

The compat-stateless/01_flashback/, compat-stateless/02_flashback_v3_to_v4/ and their logictest suites (01_meta_compression/, 02_meta_compression_v3_to_v4/) were removed. These covered fuse table format version V0 compatibility (writer 1.0.56 and 1.1.30), already dropped in ea91e06b93 (PR #14818).

Tests

  • CI test_compat_fuse — verifies all 10 cases actually execute sqllogictest files (was 0 tests before)

Type of change

  • Refactoring
  • Bug Fix

This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Feb 10, 2026
@dantengsky
Copy link
Member Author

@codex review

@dantengsky dantengsky force-pushed the refactor/fuse-compatibility-check branch from e8db300 to 2d0087f Compare February 10, 2026 14:49
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea465c7ffd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@dantengsky
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@dantengsky dantengsky force-pushed the refactor/fuse-compatibility-check branch from 7190601 to 60b0308 Compare February 11, 2026 07:28
@dantengsky dantengsky force-pushed the refactor/fuse-compatibility-check branch from 60b0308 to e70e404 Compare February 11, 2026 07:34
…cutes them

The sqllogictest runner filters files by `.test` extension
(tests/sqllogictests/src/main.rs:308). Without it, `--run_file` never
matches and 0 tests are executed. This is a pre-existing bug on main
that affects all compat_fuse cases.
Old query (1.2.46) does not support trailing commas in CREATE TABLE
column definitions or INSERT VALUES. This was never caught because
the test files were never actually executed (missing .test extension).
Current query expands ALL into individual privilege names
(CREATE,SELECT,INSERT,...) instead of showing ALL.
rbac/ reverted to pre-54fceaa6b0 content compatible with writer 1.2.311.
rbac_all/ preserves the expanded test (procedure/sequence/connection/
warehouse) with writer 1.2.833 which supports all these features.
@dantengsky dantengsky force-pushed the refactor/fuse-compatibility-check branch from 5eea9b3 to afc4f7d Compare February 12, 2026 11:18
PR databendlabs#18730 wrote "GRANT access sequence on procedure" which is
syntactically wrong. Should be "GRANT access procedure on procedure".
Never caught because the test was never executed.
rbac -> rbac_v1_2_311 (compatible with writer 1.2.311/1.2.318)
rbac_all -> rbac_current (requires current query features)
- Add -c advice.detachedHead=false to git clone in git_partial_clone()
- Capture --cmd ver output to suppress backtrace from old binaries
- Add context message before/after version checks
- Only print the "version:" line from --cmd ver output
- Use "checking metasrv/query" prefix for clarity
@dantengsky
Copy link
Member Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6099bd66b7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@dantengsky
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@dantengsky dantengsky merged commit 22f5588 into databendlabs:main Feb 13, 2026
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-refactor this PR changes the code base without new features or bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants