nchammas opened a new pull request, #58136: URL: https://github.com/apache/spark/pull/58136
### What changes were proposed in this pull request? Refactor how we ignore file patterns when determining what modules to test. Use `pathlib.PurePath` glob-style patterns instead of regexes. ### Why are the changes needed? #56312 captured ignored patterns as a `dev-tools` module that has special handling. The problem is that test module detection is additive, so a change to `python/README.md` triggers `dev-tools` _and_ `pyspark-install` and `pyspark-core`. You can see this in the [CI run associated with][1] https://github.com/apache/spark/commit/75ac74bafec1f489224765041a19bec6bad36a9d. [1]: https://github.com/apache/spark/actions/runs/32265494187/job/96146278679 There is also a problem with using regexes for these ignore patterns because most of the patterns include extensions like `.sh` or `.md` without escaping the `.`. This leads to the unlikely but nonetheless surprising case of `README1md` matching the `README.md` pattern. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? I ran the existing doctests on `utils.py`. ### Was this patch authored or co-authored using generative AI tooling? I wrote this with assistance from GitHub Copilot. -- 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]
