This is an automated email from the ASF dual-hosted git repository.

HyukjinKwon pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.x by this push:
     new e7ae20aced6f [MINOR][INFRA] Ignore AGENTS.md and CONTRIBUTING.md in 
determine_modules_for_files
e7ae20aced6f is described below

commit e7ae20aced6fd226c1f7206ba9a9414203d04599
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Fri May 8 14:10:51 2026 +0900

    [MINOR][INFRA] Ignore AGENTS.md and CONTRIBUTING.md in 
determine_modules_for_files
    
    Extend `determine_modules_for_files` in `dev/sparktestsupport/utils.py` to 
ignore `AGENTS.md` and `CONTRIBUTING.md` in addition to the existing 
`README.md`.
    
    A documentation-only PR that touches only `AGENTS.md` (e.g. 
https://github.com/apache/spark/pull/55707, see 
[run](https://github.com/zhengruifeng/spark/actions/runs/25479939541/job/74761859785))
 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`.
    
    No, this is only a testing infra change.
    
    Updated and ran the doctests in `dev/sparktestsupport/utils.py`.
    
    Generated-by: Claude Opus 4.7
    
    Closes #55731 from zhengruifeng/skip-tests-for-top-level-md.
    
    Authored-by: Ruifeng Zheng <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
    (cherry picked from commit bb72aef62854ac35aad11cd7b4813784a539d289)
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 dev/sparktestsupport/utils.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dev/sparktestsupport/utils.py b/dev/sparktestsupport/utils.py
index a66c0e70cb56..b969b96a16c5 100755
--- a/dev/sparktestsupport/utils.py
+++ b/dev/sparktestsupport/utils.py
@@ -34,7 +34,7 @@ def determine_modules_for_files(filenames):
     Given a list of filenames, return the set of modules that contain those 
files.
     If a file is not associated with a more specific submodule, then this 
method will consider that
     file to belong to the 'root' module. `.github` directory is counted only 
in GitHub Actions,
-    and `README.md` is always ignored.
+    and `README.md`, `AGENTS.md`, `CONTRIBUTING.md` are always ignored.
 
     >>> sorted(x.name for x in 
determine_modules_for_files(["python/pyspark/a.py", "sql/core/foo"]))
     ['pyspark-core', 'pyspark-errors', 'sql']
@@ -42,10 +42,14 @@ def determine_modules_for_files(filenames):
     ['root']
     >>> [x.name for x in determine_modules_for_files(["sql/README.md"])]
     []
+    >>> [x.name for x in determine_modules_for_files(["AGENTS.md"])]
+    []
+    >>> [x.name for x in determine_modules_for_files(["CONTRIBUTING.md"])]
+    []
     """
     changed_modules = set()
     for filename in filenames:
-        if filename.endswith("README.md"):
+        if filename.endswith(("README.md", "AGENTS.md", "CONTRIBUTING.md")):
             continue
         if filename in (
             "scalastyle-config.xml",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to