You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/09/13 10:34:42 UTC
(datafusion) 01/01: ci: share extended test commands through xtask (#25256)
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-25256-681705e6fdc4ab1c3df7f734e845a409b8797a83
in repository https://gitbox.apache.org/repos/asf/datafusion.git
commit d9646f49fb6f2dd4f0182187d6d55140c3fd91ee
Author: Kumar Ujjawal <uj...@gmail.com>
AuthorDate: Sun Sep 13 10:34:19 2026 +0000
ci: share extended test commands through xtask (#25256)
## Which issue does this PR close?
- Part of #21048 and #24487. Both issues stay open.
## Rationale for this change
The three extended test suites run only in the merge queue, on release
branches, and by manual dispatch. Their `cargo test` commands and
environment variables exist only inside `extended.yml`. A developer who
wants to reproduce a merge-queue failure must copy them by hand. This PR
defines each command once in `xtask`, so local runs and GitHub Actions
use the same definition.
## What changes are included in this PR?
- `cargo xtask ci step test` gets three variants: `extended`,
`hash-collisions`, and `sqlite`. Each variant reproduces the current CI
invocation and sets only the environment that its suite needs. The
`sqlite` variant sets no `RUST_BACKTRACE`, because its CI job skips the
builder setup on purpose.
- `extended.yml` calls the three commands. Triggers, job IDs, job names,
runners, containers, the clean working tree check, and `cargo clean` do
not change.
- `xtask/README.md` documents the commands, their environment,
prerequisites, and the parts of a CI job that a command does not
reproduce.
`--explain` prints the underlying command without running the suite:
```sh
cargo xtask ci step test extended --explain
```
## What is the testing strategy for this PR?
- Snapshot tests in `xtask/src/ci_steps.rs` cover the exact command,
working directory, and environment of each variant, plus rejection of an
unknown variant.
- `check_asf_yaml_status_checks.py` passes. All required check names are
unchanged.
- Each new command ran the real suite locally through `xtask` on macOS.
The `extended`, `hash-collisions`, and `sqlite` suites all passed with a
clean working tree.
The extended jobs skip ordinary pull request updates, so green PR checks
do not exercise these commands. The merge queue does.
## Are there any user-facing changes?
No. The GitHub CI behavior is the same. Developers get three new local
commands.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <no...@anthropic.com>
---
.github/workflows/extended.yml | 30 ++++-----
xtask/src/ci_steps.rs | 135 +++++++++++++++++++++++++++++++++++++++--
2 files changed, 141 insertions(+), 24 deletions(-)
diff --git a/.github/workflows/extended.yml b/.github/workflows/extended.yml
index cdddc3c9a4..8d3b13c5b8 100644
--- a/.github/workflows/extended.yml
+++ b/.github/workflows/extended.yml
@@ -15,6 +15,14 @@
# specific language governing permissions and limitations
# under the License.
+# Each test command below is implemented with `cargo xtask` so developers can
+# run the same suite locally. Append `--explain` to print the underlying
+# `cargo test` invocation without running it. Job setup, the clean working tree
+# check, and `cargo clean` remain in this workflow.
+#
+# See `xtask/README.md` for details about DataFusion's `xtask` tooling.
+# Track progress at https://github.com/apache/datafusion/issues/24487.
+
name: Datafusion extended tests
concurrency:
@@ -75,22 +83,7 @@ jobs:
run: |
df -h
- name: Run tests (excluding doctests)
- env:
- RUST_BACKTRACE: 1
- # Run more random scenarios of the spill pool fuzzer than the
- # default suite does (about a minute).
- DATAFUSION_SPILL_POOL_FUZZ_ITERATIONS: 1000
- run: |
- cargo test \
- --profile ci \
- --exclude datafusion-examples \
- --exclude datafusion-benchmarks \
- --exclude datafusion-cli \
- --workspace \
- --lib \
- --tests \
- --bins \
- --features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption
+ run: cargo xtask ci step test extended
- parallel:
- name: Verify Working Directory Clean
run: git diff --exit-code
@@ -118,8 +111,8 @@ jobs:
rust-version: stable
- name: Run tests
run: |
+ cargo xtask ci step test hash-collisions
cd datafusion
- cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --exclude datafusion-cli --workspace --lib --tests --features=force_hash_collisions,avro
cargo clean
sqllogictest-sqlite:
@@ -142,5 +135,4 @@ jobs:
run: |
apt-get update && apt-get install -y protobuf-compiler
- name: Run sqllogictest
- run: |
- cargo test --features backtrace,parquet_encryption --profile ci-optimized --test sqllogictests -- --include-sqlite
+ run: cargo xtask ci step test sqlite
diff --git a/xtask/src/ci_steps.rs b/xtask/src/ci_steps.rs
index e409d14164..521d527ab8 100644
--- a/xtask/src/ci_steps.rs
+++ b/xtask/src/ci_steps.rs
@@ -55,7 +55,7 @@ static CI_STEPS: &[StepInfo] = &[
},
StepInfo {
command: "test",
- help_usage: "test <workspace|cli|doctest|ffi|benchmark-plan|benchmark-sqllogic|postgres|substrait> [--explain]",
+ help_usage: "test <workspace|cli|doctest|ffi|benchmark-plan|benchmark-sqllogic|postgres|substrait|extended|hash-collisions|sqlite> [--explain]",
help_examples: &["test cli", "test workspace"],
help_description: "Run a CI test suite",
error_message: "Cargo test step failed",
@@ -358,6 +358,70 @@ impl StepContext {
"limit.slt",
]);
}
+ "extended" => {
+ command
+ .args([
+ "test",
+ "--profile",
+ "ci",
+ "--exclude",
+ "datafusion-examples",
+ "--exclude",
+ "datafusion-benchmarks",
+ "--exclude",
+ "datafusion-cli",
+ "--workspace",
+ "--lib",
+ "--tests",
+ "--bins",
+ "--features",
+ "avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption",
+ ])
+ .env("RUST_BACKTRACE", "1")
+ // Run more random scenarios of the spill pool fuzzer than the
+ // default suite does (about a minute).
+ .env("DATAFUSION_SPILL_POOL_FUZZ_ITERATIONS", "1000");
+ }
+ "hash-collisions" => {
+ // Check answers are correct when hash values collide. The CI job
+ // runs from the `datafusion` directory with the builder setup,
+ // which sets `RUST_BACKTRACE=1`.
+ command
+ .args([
+ "test",
+ "--profile",
+ "ci",
+ "--exclude",
+ "datafusion-examples",
+ "--exclude",
+ "datafusion-benchmarks",
+ "--exclude",
+ "datafusion-sqllogictest",
+ "--exclude",
+ "datafusion-cli",
+ "--workspace",
+ "--lib",
+ "--tests",
+ "--features=force_hash_collisions,avro",
+ ])
+ .current_dir(self.root.join("datafusion"))
+ .env("RUST_BACKTRACE", "1");
+ }
+ "sqlite" => {
+ // The CI job skips the builder setup because backtraces make this
+ // suite expensive, so `RUST_BACKTRACE` is deliberately not set.
+ command.args([
+ "test",
+ "--features",
+ "backtrace,parquet_encryption",
+ "--profile",
+ "ci-optimized",
+ "--test",
+ "sqllogictests",
+ "--",
+ "--include-sqlite",
+ ]);
+ }
_ => return Err(StepError::Usage),
}
@@ -546,6 +610,8 @@ fn required_env(name: &str) -> Result<String> {
mod tests {
use super::*;
+ const TEST_USAGE: &str = "usage: cargo xtask ci step test <workspace|cli|doctest|ffi|benchmark-plan|benchmark-sqllogic|postgres|substrait|extended|hash-collisions|sqlite> [--explain]";
+
fn args(args: &[&str]) -> Vec<String> {
args.iter().map(|arg| (*arg).to_string()).collect()
}
@@ -590,10 +656,17 @@ mod tests {
.err()
.unwrap();
- assert_eq!(
- error,
- "usage: cargo xtask ci step test <workspace|cli|doctest|ffi|benchmark-plan|benchmark-sqllogic|postgres|substrait> [--explain]"
- );
+ assert_eq!(error, TEST_USAGE);
+ }
+
+ #[test]
+ fn unknown_test_variant_is_rejected() {
+ let error = context()
+ .ci_step(&args(&["test", "extended_tests", "--explain"]))
+ .err()
+ .unwrap();
+
+ assert_eq!(error, TEST_USAGE);
}
// Test all available commands, ensure their executed command is expected
@@ -775,6 +848,58 @@ cargo test \
--test sqllogictests \
--features substrait \
-- --substrait-round-trip limit.slt
+")
+ },
+ },
+ Cmd {
+ command: &["test", "extended"],
+ expected: |actual| {
+ insta::assert_snapshot!(actual, @r"
+cd /workspace && \
+DATAFUSION_SPILL_POOL_FUZZ_ITERATIONS=1000 \
+RUST_BACKTRACE=1 \
+cargo test \
+--profile ci \
+--exclude datafusion-examples \
+--exclude datafusion-benchmarks \
+--exclude datafusion-cli \
+--workspace \
+--lib \
+--tests \
+--bins \
+--features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption
+")
+ },
+ },
+ Cmd {
+ command: &["test", "hash-collisions"],
+ expected: |actual| {
+ insta::assert_snapshot!(actual, @r"
+cd /workspace/datafusion && \
+RUST_BACKTRACE=1 \
+cargo test \
+--profile ci \
+--exclude datafusion-examples \
+--exclude datafusion-benchmarks \
+--exclude datafusion-sqllogictest \
+--exclude datafusion-cli \
+--workspace \
+--lib \
+--tests \
+--features=force_hash_collisions,avro
+")
+ },
+ },
+ Cmd {
+ command: &["test", "sqlite"],
+ expected: |actual| {
+ insta::assert_snapshot!(actual, @r"
+cd /workspace && \
+cargo test \
+--features backtrace,parquet_encryption \
+--profile ci-optimized \
+--test sqllogictests \
+-- --include-sqlite
")
},
},
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org