Summary
TVM has had several breakages on main
lately that affect developers. When main is broken it is difficult or impossible to get signal on PRs, blocking everyone’s development until a fix is merged. So it is a high priority that fixes, both reverts and forward fixes, are merged as fast as possible. Right now TVM requires the Jenkins tvm-ci/pr-merge
job to finish, which can take several hours. This proposes a flag, [skip ci]
, that can be added to commit messages to shortcut CI, enabling a quicker turnaround for fixes.
Proposal
If a PR contains the text [skip ci]
in the commit subject (the first line of the commit), detect this in Jenkins and skip all steps after the lint / sanity check. This shortens CI runtime from hours down to under 10 minutes. GitHub Actions implements something similar, so this only covers Jenkins.
This would ideally avoid situations like with this PR and the fix, which was not landed until 8 hours later. Developers in the meantime had to deal with CI erroring out in the lint stage and not testing anything.
This flag should mark the corresponding PR with a label to indicate that CI was skipped without making reviewers click through to Jenkins.
Skipping CI is dangerous and can lead to further breakages, so the flag should only be used for fixes and if the forward fix is trivial or it’s a revert. The final call over these things should rest with committers, so they should be the only ones using this flag.
Implementation
As implemented in #9554, Jenkins doesn’t query the PR at all so adding [skip ci]
to the PR title does nothing. Developers have to know to include [skip ci]
in their commit messages. The behavior can be toggled with empty commits:
# Developer pushes a fix
git commit --message "some fix"
git push
# Shortcut CI
git commit --allow-empty --message "[skip ci] Trigger skipped CI"
git push
# Run full CI
git commit --allow-empty --message "Run full CI"
git push
The Jenkins SCM Skip plugin implements something similar, but the complexity is about the same (i.e. it still needs to be integrated at every usage point and is more difficult to extend).
Open Questions
There are some questions around when the [skip ci]
flag should be applied:
- What tests should be run locally for a CI fix?
- Who should submit those PRs?
- What verification should committers do?