-
Notifications
You must be signed in to change notification settings - Fork 934
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
[KED-3058] Make CircleCI not run all the jobs when just documentation is edited #1225
Conversation
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
6014d85
to
5e0405c
Compare
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
.circleci/config.yml
Outdated
# <regex path-to-test> <parameter-to-set> <value-of-pipeline-parameter> | ||
mapping: | | ||
docs/.* build-docs true | ||
^((?!docs/).)*$ 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.
I know "anything but docs" might still be too generous, but it's equivalent to what we are currently doing and we can always further refine it in the future as we progress and learn more about / pay more attention to our pain points with this. I would still like changes in requirements.txt
for instance to still trigger the code build, but stuff like LICENSE.md
doesn't have to. I just didn't want to spend a whole lotta time on the perfect regex too early.
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.
Great PR! ⭐ Just a few minor comments/suggestions.
Some points to ponder, though:
- should we still run the
build_docs
andlink_check
jobs when we build code, since docstrings generates the API docs? These aren't such slow or unreliable jobs, so I don't mind so much if they run unnecessarily, and they might sometimes catch an error in the docs - the important thing with this ticket was cutting out the unnecessary jobs when only the docs are changed. - if this does sound like a good idea then we could simplify things a bit by just having one parameter
only-build-docs
- actually, even if we don't do make this change we could simplify things a bit because (at least currently) you have
build-docs = NOT build-code
. So technically we could remove one of these and just usenot
in thewhen
for the workflow
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
@AntonyMilneQB my first instinct is to prefer keeping the use of 2 parameters as I find it's more explicit and easier to read. I need to think a bit more about the docstrings build. Personally it was something I could live with, rather than have code changes be blocked on linkchecker when it's irrelevant. I also don't know how I would split the jobs if we did this, without running the docs jobs twice, once as part of |
I think you could do it by adding a |
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.
Great work, this is a huge improvement! 👏
I'm happy with this getting merged, but I do wonder whether we could end up in a situation where the docs aren't touched for a while and then suddenly someone makes a doc change and other things turn out to be broken because of code changes (e.g. through renaming of stuff) and this person has to clean up the mess (which could be an open source user, and they get sad by the mess we made 😿)
Signed-off-by: lorenabalan <lorena.balan@quantumblack.com>
That's fair enough, I've made the change so that we run always code & docs builds, and only docs when there's no code changes. |
… is edited (kedro-org#1225) Signed-off-by: lorenabalan <lorena.balan@quantumblack.com> Signed-off-by: Laurens Vijnck <laurens_vijnck@mckinsey.com>
Signed-off-by: lorenabalan lorena.balan@quantumblack.com
Description
It's annoying when a simple docs change is being held back by failing builds unrelated to the change, for instance because of a dependency upgrade that breaks the code build. This change should improve not only the wait time & costs, but also the developer experience overall.
Development notes
config.yml
intocontinue_config.yml
, with the following differences:build-docs
andbuild-code
to top-level parametersregular
workflow tobuild_code
and removed thebuild_docs
anddocs_linkcheck
from its jobs (as well as its mandatory checks)build_docs
workflow, where the jobs arebuild_docs
anddocs_linkcheck
when
instead of anunless
develop
.base-revision
needs to be modified to point todevelop
on that branch.pipeline.git.branch
parameter interesting but not sure if that's what we always want. It looks at changes within the branch, so if I committed a bunch of docs and code changes, then only docs changes, it will only run the docs build, not both. I believe this means that someone can have the tests failing, but if the last commit is docs and it all builds, they can still merge, which shouldn't be the case.Resources:
kedro-plugins
config thanks to @MerelTheisenQB : https://github.com/kedro-org/kedro-plugins/tree/main/.circleciTesting
CircleCI runs for a commit changing the docs:

Only code:

Both code and docs:

Checklist
RELEASE.md
file