Skip to content

Commit ea09657

Browse files
committed
[MINOR][INFRA] Ignore AGENTS.md and CONTRIBUTING.md in determine_modules_for_files
### What changes were proposed in this pull request? This PR extends `determine_modules_for_files` in `dev/sparktestsupport/utils.py` to ignore `AGENTS.md` and `CONTRIBUTING.md` in addition to the existing `README.md`. ### Why are the changes needed? A documentation-only PR that touches only `AGENTS.md` (e.g. #55707) currently triggers all CI test jobs because the file is not associated with any submodule, so it falls through to the `root` module. Neither file affects code or tests, and neither is consumed by the docs build, so they should be ignored just like `README.md`. ### Does this PR introduce _any_ user-facing change? No, this is only a testing infra change. ### How was this patch tested? Updated and ran the doctests in `dev/sparktestsupport/utils.py`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.7
1 parent c26a127 commit ea09657

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

dev/sparktestsupport/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,22 @@ def determine_modules_for_files(filenames):
3434
Given a list of filenames, return the set of modules that contain those files.
3535
If a file is not associated with a more specific submodule, then this method will consider that
3636
file to belong to the 'root' module. `.github` directory is counted only in GitHub Actions,
37-
and `README.md` is always ignored.
37+
and `README.md`, `AGENTS.md`, `CONTRIBUTING.md` are always ignored.
3838
3939
>>> sorted(x.name for x in determine_modules_for_files(["python/pyspark/a.py", "sql/core/foo"]))
4040
['pyspark-core', 'pyspark-errors', 'sql']
4141
>>> [x.name for x in determine_modules_for_files(["file_not_matched_by_any_subproject"])]
4242
['root']
4343
>>> [x.name for x in determine_modules_for_files(["sql/README.md"])]
4444
[]
45+
>>> [x.name for x in determine_modules_for_files(["AGENTS.md"])]
46+
[]
47+
>>> [x.name for x in determine_modules_for_files(["CONTRIBUTING.md"])]
48+
[]
4549
"""
4650
changed_modules = set()
4751
for filename in filenames:
48-
if filename.endswith("README.md"):
52+
if filename.endswith(("README.md", "AGENTS.md", "CONTRIBUTING.md")):
4953
continue
5054
if filename in (
5155
"scalastyle-config.xml",

0 commit comments

Comments
 (0)