Prune workflows based on changed files#16642
Prune workflows based on changed files#16642rapids-bot[bot] merged 86 commits intorapidsai:branch-24.10from
Conversation
Only run tests based on things that have actually changed. For example, if only Python files have changed, we don't need to run the C++ tests. Contributes to rapidsai/build-planning#94
|
@KyleFromNVIDIA do you want to make this a draft until you're done editing? I assume you have some more iterating to do. |
There was a problem hiding this comment.
Almost any of the other directories (.devcontainer, .github, ci, conda, notebooks) or top-level files (codecov.yml, dependencies.yaml, pyproject.toml) can affect the behavior of C++ and/or Python tests. We also have a lot of possible cases where new files could affect the behavior of C++/Python tests.
I would propose a different strategy that is based on skipping tests when we know things are safe rather than allowing tests to run on only certain changes.
I'd propose this:
- Run Python tests always unless changes were confined to the following paths (conjuction is OR):
docs/java/
- Run C++ tests always unless changes were confined to the following paths (conjunction is OR):
docs/java/notebooks/python/
bdice
left a comment
There was a problem hiding this comment.
A few notes:
- I think
pandas-test-diffwill be safely skipped if its dependency onpandas-testsis skipped. That's the only case where we have added anif changedcondition to a job that has downstream dependencies, so just wanted to make sure that seems safe to you too. - We could be more aggressive in the future with Python job dependencies. For example, changes in
cudfordask-cudfshouldn't triggercudf-polarstests, and changes incudf-polarsshouldn't triggercudforpandastests. However I think we are doing enough in this PR to make a dent in CI usage and I don't want to add significantly more complication at once.
|
https://github.com/rapidsai/cudf/actions/runs/10527602668?pr=16642 has passed with all of the tests jobs being skipped. |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
The notebook test didn't fail because I happened to pick the one notebook that wasn't actually being run. However, devcontainers happened to fail due to the recent merge of rapidsai/devcontainers#271 (and this PR not having #15483), so we were able to get a failed I'm happy with the state of this PR. I'll remove the temporary modifications and test it one more time. |
vyasr
left a comment
There was a problem hiding this comment.
This looks great. I agree with using negative rather than positive filtering. We should be conservative to make sure we don't lose test coverage. We can always filter more aggressively over time.
|
/merge |
Description
Only run tests based on things that have actually changed. For example, if only Python files have changed, we don't need to run the C++ tests.
Contributes to rapidsai/build-planning#94
Checklist