-
Our current CI job takes a relatively long time to complete (about 30 minutes). Historically, we've seen that time creep up to that level, and we've done cleanup/speedup passes to reduce it down. While this approach may work once again, we could also contemplate having a lightweight CI, which is always enabled, even on Drafts, and a more expensive CI, which is perhaps only run on PRs that are out for actual review. This would allow a quicker turnaround early on, less usage of executors, but retain complete checks before the merge to master. A possible implementation for this would be to query the status of the PR in the CI job: https://docs.github.com/en/rest/reference/pulls#get-a-pull-request exposes a draft attribute and could be used to decide how many configurations to build and test. A problem with this is that a status change on the PR would presumably not invalidate the check and trigger a new CI. Ideas are welcome. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
Maybe an easy hack could be to split the test suite in two parts to allow for more parallelism. If all agents are always busy during the day then an additional one could be added, but I have a feeling that there is quite a bit of room. |
Beta Was this translation helpful? Give feedback.
-
That wouldn't help with executor usage unfortunately. We've done this in the past, and we've found that the time it took to transfer artifacts from one executor to a new job running on another executor was very high (almost a minute). It's possible to lower it by transferring just what's needed for some tests, but makes the pipeline very brittle to test changes. |
Beta Was this translation helpful? Give feedback.
-
Having looked at this, there doesn't seem to a way to trigger on PR status change (draft true to false), so this isn't effectively possible. |
Beta Was this translation helpful? Give feedback.
-
I was looking at Mergify, because it supports the merge train behaviour we were discussing to minimise CI reruns. It also has options to trigger a pipeline based on some other checks, and I think we could get to multi-stage CI by fiddling with labels. Of course all of this comes at the cost of giving the Mergify bot write access, and letting it create and merge PRs. |
Beta Was this translation helpful? Give feedback.
-
@jumaffre had a look at bot-based solutions, but one unpleasant aspect was the need to give them write access to forks so as to be able to update them with latest commits. I'm not sure how mergify deals with that. |
Beta Was this translation helpful? Give feedback.
-
The consensus seems to have landed on making efforts to improve CI speed rather further split jobs. In particular, de-duplicating the suite and standalone tests, and enabling concurrency. |
Beta Was this translation helpful? Give feedback.
Maybe an easy hack could be to split the test suite in two parts to allow for more parallelism. If all agents are always busy during the day then an additional one could be added, but I have a feeling that there is quite a bit of room.