HyukjinKwon opened a new pull request, #841:
URL: https://github.com/apache/spark-connect-rust/pull/841
### What changes were proposed in this pull request?
A follow-up of #774 (SPARK-61851) and #796 (1d383d8d).
**1. The guards of the Python test lists read the lists that they guard.**
- The offline guard of `coverage.yml` checks that each `test_*_offline.py`
file and `test_arrow_handoff.py` is in the list of the step "Offline Python
test suite". It grepped the whole of `coverage.yml`, so a file dropped from
that step and named on an indented line of another step passed it.
- The e2e guard of `build_python_connect.yml` (connect-parity) checks that
each `test_*_e2e.py` file is in a workflow's pytest list. It grepped every line
of every workflow, so a file named only in a comment, or in a command that is
not pytest, passed it.
- Now the offline guard reads the lines of that step only, from its `-
name:` to the next step, without comments. The e2e guard reads the pytest
commands of the workflows, each with the lines that a backslash continues,
without comments.
- A probe ran each guard's `run:` script, taken from the YAML, on copies of
the workflows:
| Case | Before | After |
|---|---|---|
| the workflows as they are | passes | passes |
| `test_als_offline.py` moved from the offline step to another step |
passes | fails |
| `test_als_offline.py` commented out in the offline step | fails | fails |
| `test_statistics_e2e.py` named only in a comment | passes | fails |
| `test_statistics_e2e.py` named only in a command that is not pytest |
passes | fails |
**2. The offline file that connect-parity also runs is named.**
- `dev/design/ci.md` and the comment of the offline guard said that no other
workflow runs the offline files.
- The step "Drop-in live-server tests" of connect-parity runs
`test_proto_rust_offline.py` too, without protobuf, as `ci.md` says elsewhere.
- Both now name that exception. `docs/contributing.md` now says which files
the guards check: the offline ones and the `test_*_e2e.py` ones, not every test
file.
**3. The lint job fails on rustdoc's warnings.**
- #796 made `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps` pass, but no
workflow ran it.
- The new step "rustdoc - blocking" of `lint.yml` runs it with the job's
pinned toolchain for `apache-spark-connect`, `-core`, `-macros` and `-build`,
with `wasm-udf` on so that its module is documented too.
- `apache-spark-connect-proto` is left out. Its docs are generated from the
comments of Spark's `.proto` files, whose links rustdoc cannot resolve: master
fails there with `unresolved link to Response` and `redundant explicit link
target`.
- With `wasm-udf`, master failed the step on the module docs of
`wasm_udf.rs`, whose links resolved in the crate root:
- `UserDefinedFunction::with_batch_entrypoint` and `AbiType` (twice) did
not resolve;
- both `udf` links went to the `spark_connect::udf` module instead of
`wasm_udf::udf`.
The five links now name their items by path. Only the docs change.
- `docs/contributing.md`, `AGENTS.md` and `dev/design/ci.md` describe the
step.
### Why are the changes needed?
So that the guards fail when a test file is not in the list that runs it, as
the docs say they do, and so that a broken intra-doc link fails CI rather than
staying until someone runs `cargo doc`.
### Does this PR introduce _any_ user-facing change?
No. The CI guards, the lint job and the docs for contributors change. The
links of the `wasm_udf` module docs now go to their items.
### How was this patch tested?
- **Guards:** the probe `p_guards.py` above, on master's workflows and on
this branch's.
- **rustdoc:**
- `RUSTDOCFLAGS="-D warnings" cargo +1.100.0 doc --no-deps -p
apache-spark-connect -p apache-spark-connect-core -p
apache-spark-connect-macros -p apache-spark-connect-build --features
apache-spark-connect/wasm-udf` passes. It failed on master on the three
unresolved links.
- In the HTML, the links of the `wasm_udf` module docs go to
`fn.udf.html`, `enum.AbiType.html` and
`UserDefinedFunction::with_batch_entrypoint`.
- With `-p apache-spark-connect-proto`, it fails on master and here, which
is why that crate is left out.
- The three workflows parse as YAML, and the new step comes after clippy in
`rust-fmt-clippy`.
- `cargo fmt --all --check`, `cargo +1.100.0 clippy -p
apache-spark-connect-core -p apache-spark-connect -p pyspark-rs --all-targets
-- -D warnings`, `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps -p
apache-spark-connect -p apache-spark-connect-core`, and `cargo test -p
pyspark-rs --lib` (13 passed).
### 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]