HyukjinKwon opened a new pull request, #473: URL: https://github.com/apache/spark-connect-rust/pull/473
### What changes were proposed in this pull request? [SPARK-61385](https://issues.apache.org/jira/browse/SPARK-61385): Run the two offline tests of the execution hook in the crate, on a session of a dead port whose client does not retry (`RetryPolicy::no_retries()`, as the tests of the streaming module do). They were `the_error_of_a_hook_is_the_error_of_the_execution` and `a_cleared_or_replaced_hook_is_not_called` in `crates/spark-connect/tests/execute_plan_hook.rs`. They move to a new `execute_plan_hook_tests` module at the end of `crates/spark-connect/src/session.rs`, unchanged otherwise. The test that needs a server stays in the integration test file. ### Why are the changes needed? Since SPARK-61263 (#445, plan compression), the first plan of a session reads the plan compression confs of the server with a `Config` call before the hook runs, as PySpark's `_get_plan_compression_threshold_and_algorithm` does. The two tests used `sc://127.0.0.1:1` with the default retry policy, so that `Config` call was retried for its whole backoff before the hook ran. The test binary has taken 639 s since then; it took 0.00 s before. CI runs it in several jobs. On master at 729a7a36: | Job | `execute_plan_hook` | |---|---| | Rust build and test (stable) | 639 s, twice | | Rust checks | 639 s | | WASM UDF feature | 639 s | | Measure and publish coverage badges | 639 s | | Rust behavioral e2e (one test at a time) | 1278 s | "Rust build and test (stable)" took 7.1 minutes at aad559aa, the last full run before SPARK-61263, and 34.7 minutes at 2c768214, the first one after it. The client's behavior is not changed. PySpark retries that `Config` call too, and a session of a dead server waits for the retries in both. ### Does this PR introduce _any_ user-facing change? No, test-only. ### How was this patch tested? - `cargo test -p apache-spark-connect --release --lib execute_plan_hook_tests`: both tests pass in 0.00 s. - `cargo test -p apache-spark-connect --release --test execute_plan_hook` with `SPARK_REMOTE` set to a local Spark 4.3.0 server: the remaining test passes. - The build of all the tests of the crate, without warnings, and `cargo fmt --all --check`. Clippy reports nothing in the changed lines. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5.5 This pull request and its description were written by Isaac. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
