Giter Site home page Giter Site logo

Parallel Builds about marge-bot HOT 4 CLOSED

deckar01 avatar deckar01 commented on July 1, 2024
Parallel Builds

from marge-bot.

Comments (4)

jcpetruzza avatar jcpetruzza commented on July 1, 2024

Would definitely be nice!

There are at least two challenges I can see:

  1. Dynamically adjusting to the available build capacity: you don't want to optimistically rebase 100 merge requests if there is only CI runner available for the project.
  2. Making it robust

For 1. I imagine that the high-level logic could be something along the lines of: as long as you don't have one merge request with CI pipeline in pending state, try to optimistically rebase another merge request.

With 2. we have to be careful. At the moment, the bot is essentially stateless, so that if it crashes, it can just restart and continue from where it left. The problem with speculative rebasing is that your merge request may have ended up with commits that now need to be removed, but after a crash (having lost the bot's internal state), it is not obvious which commits to drop.

One thing that we could do, though, is to use a fresh branch for running the speculative build, instead of the merge request branch. Then, we only force-push to the merge-request's branch when we know that all the previous requests in the queue passed. Also, this way the commit log would not be polluted with commits that don't make it in the end.

Does this make sense? The only problem I can see is that GitLab will probably rerun the CI pipeline once we pushed to the merge request, even though there is a successful run for the very same head, which is a waste of resources. I don't think we can control this.

from marge-bot.

deckar01 avatar deckar01 commented on July 1, 2024

A second branch to maintain statelessness is interesting. You can skip CI by including [skip ci] in a commit message. I don't see any down side to this other than generating an empty commit in the history.

https://docs.gitlab.com/ce/ci/yaml/README.html#skipping-jobs

from marge-bot.

Jellby avatar Jellby commented on July 1, 2024

In the future it may be possible to skip CI with push options. See https://gitlab.com/gitlab-org/gitlab-ce/issues/18667

from marge-bot.

JaimeLennox avatar JaimeLennox commented on July 1, 2024

Added in #84.

from marge-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.