Comments (4)
Would definitely be nice!
There are at least two challenges I can see:
- 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.
- 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.
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.
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.
Added in #84.
from marge-bot.
Related Issues (20)
- Marge-bot logs "Someone skipped the queue! Will have to try again..." even though she merged an MR
- Guarantee final pipeline when assigned to marge-bot
- Bot cannot receive pipeline status with no-ff-merge HOT 10
- feature request: rebase without pushing
- Feature request: let marge bot leave a comment when she notices that an MR was assigned to her
- SSO User Support
- Bug: `--guarantee-final-pipeline` does not work with Gitlab CI
- "Branch cannot be merged" still happening HOT 1
- Source branches are not deleted when using batch mode HOT 4
- LetsEncrypt cert from the included CA Bundle is expired
- Marge Bot is logging PAT while fetching the repository
- Document group access tokens HOT 2
- Marge uses SSH even if I configure it to use HTTPS
- Marge ignores /etc/hosts
- Hard-to-interpret messages when discussions are unresolved
- Feature Request: Configure who to assign if merge doesn't work HOT 1
- Marge-bot container keeps restarting
- A holistic approach to versioning, CICD and audit reporting HOT 1
- Fix merging action when last source commit is not last target commit (gitlab_rebase) HOT 1
- Wait for CI to pass checks happen too fast for Jenkins plugin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marge-bot.