-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
CI Builds: Conditional builds with path filtering #9787
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
Conversation
752a997
to
0dd38ab
Compare
readthedocs/.* build-code true | ||
pytest.* build-code true | ||
tox.* build-code true | ||
package.* build-code true |
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.
These are essential bits to adjust. We want to run this stuff whenever something essential is changed.
2 considerations that we might have for later:
- Breaking up checks and tests pipelines and give them separate path filters.
- Branch rules: I think we should also consider an alternative pipeline that always runs on the main branch and sets
build-code
totrue
regardless of the path. This requires adding a separate pipeline that runs onmain
(and configuring the other pipeline to NOT run onmain
), calling the continuation Orb.
I think this is pretty low priority, unless there is an obvious benefit of investing time here that I'm not seeing yet. That said, what are the exact cases where we want to avoid running the tests? I suppose the only one is when only modifying the |
That's what this is mostly about, yes 👍 There's 40 min+ test running time for no reason. |
…rrelevant to changeset
754fa28
to
c4a4084
Compare
- checks | ||
- tests | ||
- path-filtering/filter: | ||
base-revision: main |
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.
When we target branches different from main
, there might be some false positives. I've opened up a feature request: CircleCI-Public/path-filtering-orb#65
This is now ready for review 👍 I imagine the following issues, which IMO are interesting for further study (which can indeed inform our own build logic!):
Our safety nets are:
We can expand rules as we become more clever. |
I'm 👍🏼 by closing this PR and continue using the workflow we have. The documentation build is skipped now with the latest changes in our code. On the other hand, I prefer to not deal with edge cases for the test cases and always be sure they are running. That gives me confidence about merging the PR. Feel free to re-open if you consider it's important to continue with this work and you think there are some room for prioritization here. |
Seems good to close it, since it won't stay ready without a lot of heavy maintenance. It was pretty hard to maintain this PR because it refactored the Circle CI configuration that was constantly changing a while back (new Tox etc). I wanted this change because when working on documentation, I didn't need the whole platform CI to trigger and it became a huge distraction. Once others realize that the 1 hour build times also annoy them, you know where to find me 😄 |
Benefits of conditional builds:
Because of the many current documentation PRs, the timing for "conditional builds" will be really good.