-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prune workflows based on changed files #16642
Prune workflows based on changed files #16642
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes:
- I think
pandas-test-diff
will be safely skipped if its dependency onpandas-tests
is skipped. That's the only case where we have added anif changed
condition 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
cudf
ordask-cudf
shouldn't triggercudf-polars
tests, and changes incudf-polars
shouldn't triggercudf
orpandas
tests. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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