Run check-commits dispatcher only if PR branch has compile-commit job#15210
Conversation
|
Tested with MiguelWeezardo#12 |
140e7ed to
7c3dc6e
Compare
|
During my investigation I have found a bug in the commit selection pipeline which I intend to fix here as well. |
abae95a to
cebaac0
Compare
A bug was discovered in the pipeline responsible for selecting commits to be compiled. The `rev-list` query returned the list of commit hashes in **reverse** chronological order. The last `rev-list` entry removed by the jq pipeline expression was the oldest PR commit, not the newest one. This commit fixes the problem by using the `rev-list` expression instead of `jq` pipeline to filter out PR HEAD
cebaac0 to
30065f4
Compare
Before running check-commits dispatcher it's important to check that the PR branch contains the definition of the `compile-commit` composite job.
compile-commit job
|
@hashhar Could you take a look at this and merge if it looks OK? |
|
will we actually have this problem now? This only affects PRs whose base commit is older than when the job was added? I'm ok with adding this but I think at some point in future this will be redundant? |
There are still open PRs which are based on older commits. Once these get updated with whatever review comments they had, their authors are in for a surprise when this check fails on them. This will lead to a lot of CI churn, since they will have to discover they need to rebase, and rerun the full CI pipeline after rebase. I'd like to avoid that if possible. There's also another issue - while working on this I discovered and fixed a bug related to the order in which commits to compile were chosen. My intention was to compile all PR commits except the newest (HEAD), but It turned out that I was compiling every PR commit except the oldest one. |
|
Let's create an issue to "re-simplify" this at some point in future. |
Description
#15157 introduced a composite job for compiling every commit of a PR.
Before running check-commits dispatcher it's important to check that the PR branch contains the definition of the
compile-commitcomposite job.A bug was also discovered in the job responsible for selecting commits to be compiled.
The
rev-listquery by default returns the list of commit hashes in reverse chronological order.The last
rev-listentry removed by thejqpipeline expression was the oldest PR commit, not the newest one.This commit fixes the problem by using the
rev-listexpression instead ofjqpipeline to filter out PR HEAD.Additional context and related issues
Release notes
(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: