Skip to content

Conversation

@sanujbasu
Copy link
Collaborator

@sanujbasu sanujbasu commented Oct 28, 2025

What changes are proposed in this pull request?

This PR adds an `#[ignore]` attribute to the `read_table_version_hdfs` test to skip it when the Maven executable is not available on the system.

Problem:
The HDFS integration test was failing in environments where Maven is not installed:

cargo test --all-features
thread 'read_table_version_hdfs' panicked at
/Users/sanuj.basu/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/
hdfs-native-0.12.3/src/minidfs.rs:59:37:
Failed to find mvn executable: CannotFindBinaryPath

Solution:
Added the `#[ignore = "Skipping HDFS integration test"]` attribute to the `read_table_version_hdfs` test function. This allows the test to be skipped by default while still being available to run explicitly when needed.

How was this change tested?

Verified that the test is properly skipped:

running 1 test
test read_table_version_hdfs ... ignored, Skipping HDFS integration test

test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out

The test can still be run explicitly with:

cargo test --features integration-test --test hdfs -- --include-ignored

}

#[tokio::test]
#[ignore = "Skipping HDFS integration test"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you check to CI to see if there is anyplace where this test is not being skipped, so it can be run explicitly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ack.
1/ Validated the CI

https://github.com/delta-io/delta-kernel-rs/blob/5058bce725f5fce39e5f33f09ec9445cdd0ea7eb/.github/workflows/build.yml#L131

2/ IIUC the test can be explicitly run by requesting the ignored test to be run with the apt feature flag set. Validated

➜  delta-kernel-rs git:(skiptest) cargo test --features integration-test --test hdfs -- --ignored --list
   Compiling parquet v56.2.0
   Compiling delta_kernel v0.16.0 (/Users/sanuj.basu/KernelSource/delta-kernel-rs/kernel)
   Compiling test_utils v0.16.0 (/Users/sanuj.basu/KernelSource/delta-kernel-rs/test-utils)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 6.30s
     Running tests/hdfs.rs (target/debug/deps/hdfs-bdd8c212ac20f512)
read_table_version_hdfs: test
 delta-kernel-rs git:(skiptest) cargo test --features integration-test --test hdfs -- --include-ignored
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
     Running tests/hdfs.rs (target/debug/deps/hdfs-bdd8c212ac20f512)

running 1 test
test read_table_version_hdfs ... FAILED

failures:

---- read_table_version_hdfs stdout ----

thread 'read_table_version_hdfs' panicked at /Users/sanuj.basu/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hdfs-native-0.12.3/src/minidfs.rs:59:37:
Failed to find mvn executable: CannotFindBinaryPath
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    read_table_version_hdfs

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass `-p delta_kernel --test hdfs`

Copy link
Collaborator

Choose a reason for hiding this comment

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

@nicklan should we just delete this test if we don't have CI coverage for it? Are there plans to add CI coverage?

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.85%. Comparing base (70143ca) to head (88d0cb7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1428   +/-   ##
=======================================
  Coverage   84.85%   84.85%           
=======================================
  Files         119      119           
  Lines       30961    30961           
  Branches    30961    30961           
=======================================
  Hits        26271    26271           
  Misses       3408     3408           
  Partials     1282     1282           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@nicklan nicklan left a comment

Choose a reason for hiding this comment

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

I believe this should already be skipped unless you set the integration-test feature flag (we could maybe give it a better name)

Specifically the line at the top: #![cfg(all(feature = "integration-test", not(target_os = "windows")))] should skip the whole file unless the feature is on.

What command where you running such that you were getting issues?

@nicklan nicklan self-requested a review October 28, 2025 16:56
@sanujbasu
Copy link
Collaborator Author

sanujbasu commented Oct 28, 2025

I was running cargo test --all-features when i hit the issue on my local machine @nicklan . Updated the PR description.

@nicklan
Copy link
Collaborator

nicklan commented Oct 28, 2025

I was running cargo test --all-features when i hit the issue on my local machine @nicklan . Updated the PR message.

Ahh yeah, if you do --all-features it'll try by default to run that test. You can do:
cargo test --all-features -- --skip read_table_version_hdfs if you want to skip it (which is what our CI does)

@sanujbasu
Copy link
Collaborator Author

sanujbasu commented Oct 28, 2025

I was running cargo test --all-features when i hit the issue on my local machine @nicklan . Updated the PR message.

Ahh yeah, if you do --all-features it'll try by default to run that test. You can do: cargo test --all-features -- --skip read_table_version_hdfs if you want to skip it (which is what our CI does)

Seems like it was skipped in the CI file here

run: cargo test --workspace --verbose --all-features -- --skip read_table_version_hdfs
.

Putting the ignored in the test makes it more visible and makes sure new contributors do not trip on it right? Does that sound reasonable? I followed the OSS README which suggests we run cargo test --all-features

---- read_table_version_hdfs stdout ----

thread 'read_table_version_hdfs' panicked at
/Users/sanuj.basu/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/
hdfs-native-0.12.3/src/minidfs.rs:59:37:
Failed to find mvn executable: CannotFindBinaryPath
note: run with `RUST_BACKTRACE=1` environment variable
to display a backtrace

Solution
========
Added the #[ignore = "Skipping HDFS integration test"] attribute
to test read_table_version_hdfs to skip the test temporarily.

Testing:
========
running 1 test
test read_table_version_hdfs ... ignored, Skipping HDFS integration test

skipped as expected
Minor README update removing a bad rust analyzer config.

Testing
=======
Validation using the markdown mode in vscode
Copy link
Collaborator

@nicklan nicklan left a comment

Choose a reason for hiding this comment

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

thanks!

@sanujbasu sanujbasu merged commit 12e93a4 into delta-io:main Oct 29, 2025
22 checks passed
@sanujbasu sanujbasu deleted the skiptest branch November 3, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants