Conversation
| "/LICENSE-binary", | ||
| "/NOTICE-binary", | ||
| "/scalastyle-config.xml", | ||
| "/SECURITY.md", |
There was a problem hiding this comment.
I think these could be loosened to match the pattern anywhere in the path hierarchy.
|
+1, thank you @nchammas and @HyukjinKwon @dongjoon-hyun! |
|
+1, thanks! I think the |
…module test detection Refactor how we ignore file patterns when determining what modules to test. Use `pathlib.PurePath` glob-style patterns instead of regexes. Add some doctests to `modules.py` so we can test the new `is_ignored_file` function directly. Ensure these doctests can be run by themselves and are also run as part of `run-tests.py`. [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. No. I ran the doctests on `modules.py` and `utils.py`. I wrote this with assistance from GitHub Copilot. Closes #58136 from nchammas/SPARK-58885-ignored-test-patterns. Authored-by: Nicholas Chammas <nicholas.chammas@gmail.com> Signed-off-by: Nicholas Chammas <nicholas.chammas@gmail.com> (cherry picked from commit 9a75a1d) Signed-off-by: Nicholas Chammas <nicholas.chammas@gmail.com>
|
Hmm, I had an interesting problem when cherry picking this onto I think it did that because |
|
I've made a mistake and somehow pushed to I think the culprit is a bad worktree setup that I did not notice. I believe it's because I let an agent create the worktree, and it pointed the worktree to What's the correct protocol to fix this? Just revert and push directly? |
|
Yes, the current protocol is to revert and push it directly ASAP, @nchammas . And, please don't give a commit permission to the agent. The first rule of my |
|
The agent didn't push in this case. It was me! I just didn't realize the worktree (created by the agent) was pointed at the wrong remote until it was too late. (For the record, I never let agents commit or push.) I will revert and push right now. |
|
Reverted here: 976b87f |
…trees or branches ### What changes were proposed in this pull request? Specify that when creating a new worktree or branch, agents should use `--no-track` so they don't accidentally target `upstream/master`. ### Why are the changes needed? I just pushed 3731453 directly to `master` from a new worktree. It was a mistake and I was surprised by it. The worktree was configured to push directly to `upstream/master`. I believe this happened because I let an agent (for the first time) create the worktree for me and it followed the instructions in our AGENTS file: > create a new git worktree from `<upstream>/master` and work from there More background here: #58136 (comment) To be clear, I made the commit and push myself, not the agent. What the agent did is create the worktree. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? In a fresh session I had Grok 4.5 create a new worktree using the updated instructions and it ran the following (edited for clarity): ``` git fetch upstream master git worktree add --no-track -b test-changes ../test-changes upstream/master git worktree list git -C ../test-changes status git -C ../test-changes log -1 --oneline ``` I then switched to the new worktree and confirmed it does not track any upstream: ``` $ git status -sb ## test-changes ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes #58207 from nchammas/agents-worktrees. Authored-by: Nicholas Chammas <nicholas.chammas@gmail.com> Signed-off-by: Nicholas Chammas <nicholas.chammas@gmail.com>
### What changes were proposed in this pull request? When a conflict occurs on cherry picking a commit to a branch, ask the user to fix the conflict but have the script continue the cherry pick itself. ### Why are the changes needed? If the user calls `git cherry-pick --continue` themselves, commit message lines starting with `#` will be interpreted as comments and stripped. This is [what happened to me here][1]. Compare the commit message on 9a75a1d (master) to 8cc56ea (branch-4.x) and note how every line beginning with `#` was stripped from the latter. [1]: #58136 (comment) I'm not the only one who has hit this. It seems this has been happening for a while. #### Cherry-Pick Commit Message Loss Cases In all of these cases, the `branch-4x` commit messages are malformed relative to the originals from `master`. | Date | `master` source | `branch-4.x` backport | |---|---|---| | 2026-07-21 | [99025ce](99025ce) | [98e98b7](98e98b7) | | 2026-07-20 | [6b719b3](6b719b3) | [6c0a252](6c0a252) | | 2026-07-14 | [226340c](226340c) | [67df419](67df419) | | 2026-07-11 | [710b3c4](710b3c4) | [da117f6](da117f6) | | 2026-06-18 | [880083f](880083f) | [84fcfba](84fcfba) | | 2026-06-16 | [2fb4a1b](2fb4a1b) | [07d9f34](07d9f34) | | 2026-06-03 | [13b526d](13b526d) | [7a70689](7a70689) | | 2026-05-25 | [0af3d42](0af3d42) | [bdd5fdf](bdd5fdf) | | 2026-05-16 | [0a0d31b](0a0d31b) | [f5273c7](f5273c7) | | 2026-05-13 | [436291e](436291e) | [f67a855](f67a855) | | 2026-05-08 | [bb72aef](bb72aef) | [e7ae20a](e7ae20a) | ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? I used this test script to confirm that `commit.cleanup=scissors` preserves Markdown headings and other lines that begin with `#` when there is a cherry pick conflict. [test-cherry-pick-commit-msg.sh](https://github.com/user-attachments/files/31342347/test-cherry-pick-commit-msg.sh) I also tried the merge script from this branch with `--dry-run` and it worked, including a conflicted cherry pick to `branch-4.x`. ### Was this patch authored or co-authored using generative AI tooling? I wrote this with assistance from GitHub Copilot. Closes #58214 from nchammas/merge-pr-cherry-pick-whitespace. Authored-by: Nicholas Chammas <nicholas.chammas@gmail.com> Signed-off-by: Nicholas Chammas <nicholas.chammas@gmail.com>
What changes were proposed in this pull request?
Refactor how we ignore file patterns when determining what modules to test. Use
pathlib.PurePathglob-style patterns instead of regexes.Add some doctests to
modules.pyso we can test the newis_ignored_filefunction directly. Ensure these doctests can be run by themselves and are also run as part ofrun-tests.py.Why are the changes needed?
#56312 captured ignored patterns as a
dev-toolsmodule that has special handling. The problem is that test module detection is additive, so a change topython/README.mdtriggersdev-toolsandpyspark-installandpyspark-core. You can see this in the CI run associated with 75ac74b.There is also a problem with using regexes for these ignore patterns because most of the patterns include extensions like
.shor.mdwithout escaping the.. This leads to the unlikely but nonetheless surprising case ofREADME1mdmatching theREADME.mdpattern.Does this PR introduce any user-facing change?
No.
How was this patch tested?
I ran the doctests on
modules.pyandutils.py.Was this patch authored or co-authored using generative AI tooling?
I wrote this with assistance from GitHub Copilot.