Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion: investigate a commit-queue solution #705

Closed
refack opened this issue Apr 29, 2017 · 17 comments
Closed

suggestion: investigate a commit-queue solution #705

refack opened this issue Apr 29, 2017 · 17 comments
Assignees

Comments

@refack
Copy link
Contributor

refack commented Apr 29, 2017

Instead of landing directly on master, contributors push to a commit-queue that validates commit message, code-review meta-data, and possibly runs a CI, only then actually lands on master.
Ref: http://dev.chromium.org/developers/testing/commit-queue

@gibfahn
Copy link
Member

gibfahn commented Apr 30, 2017

Interesting idea, and I know other projects do this (e.g. Rust, which has rollup commits).

What would the advantages be? I find the process of landing commits pretty straightforward today. A CI job to verify commit metadata already exists, it just needs reviving. I think other projects have CI runs that take a lot longer, so it probably makes more sense for them, but it also adds complexity to the landing process.

@refack
Copy link
Contributor Author

refack commented Apr 30, 2017

Mainly taking out human error out of the straight forward but manual steps.

  • reject on fail of validation of commit message structure & metadata
  • reject on CI fail
  • Automatic close of PR

If the PR has a good message and could be just squashed:

  • automate adding metadata
  • automate squash

i.e. turn these cases to a one-click merge

@gibfahn
Copy link
Member

gibfahn commented Apr 30, 2017

What do you mean by commit queue then?

Those are reasons to have a CI flow that runs the commit validation, adds metadata, runs CI, squashes, and lands (although it'd only work for cases where you want to squash), but why do you need a queue?

@refack
Copy link
Contributor Author

refack commented Apr 30, 2017

A CQ is in essence a different git remote that colabs can push to, and will either automate the land to master or reject.
one-click-merge is a bonus feature: collab tell CQ to pick up a PR, and CQ does everything.
The design doc by Chromium is quite good http://dev.chromium.org/developers/testing/commit-queue/design

@refack
Copy link
Contributor Author

refack commented Apr 30, 2017

P.S. queue is a borrowed term from "mercurial patch queues", the main metaphor is a side storage that can accept or reject without changing master beforehand, and allows for temporary storage of manually rebased commits.

@mhdawson
Copy link
Member

mhdawson commented May 1, 2017

This was in place for a short period (basically a job which did the test and if tests passed, landed the PR) but it was backed out because at the time the tests were not stable enough and it would take multiple attempts due to flakes even when nothing was wrong with the PR.

I think we still have a number of flakes on the arm fanned builds and to a less extend the fanned windows builds. I know that I've often add the "arm failures seem infra related so CI is ok". I think we'd need those to be more solid before proposing this again.

@refack
Copy link
Contributor Author

refack commented May 1, 2017

Sounds legit.
Thanks.

@thomasuster
Copy link

thomasuster commented Aug 11, 2017

@refack Has anyone built a generic solution for this? Like a github integration?

@refack
Copy link
Contributor Author

refack commented Sep 18, 2017

@refack Has anyone built a generic solution for this? Like a github integration?

I have no experience with GitHub integrations, but there are gerrit (maybe as http://gerrithub.io/) and rietveld

@refack
Copy link
Contributor Author

refack commented Oct 24, 2017

With the inauguration of the Automation SIG IMHO it's a good time to revive this concept.

@rvagg
Copy link
Member

rvagg commented Oct 24, 2017

For reference, prior art is still here I believe: https://ci.nodejs.org/view/All/job/node-merge-commit/

we can drop in the Jenkins scripts here if that's interesting at all

@maclover7
Copy link
Contributor

Been playing around with Jenkins locally on my machine, and I think I have a job working now where if you provide a PR identifier, like nodejs/node#14998 for example, it will land the commit with PR metadata into the master branch of the repo.

@gibfahn
Copy link
Member

gibfahn commented Dec 4, 2017

Been playing around with Jenkins locally on my machine, and I think I have a job working now where if you provide a PR identifier, like nodejs/node#14998 for example, it will land the commit with PR metadata into the master branch of the repo.

Does it squash commits?

@maclover7
Copy link
Contributor

Does it squash commits?

@gibfahn Kinda sorta -- before figuring out if this is something we want to actually use, we'd probably have to take a look at our contributor policy around commits. Since Jenkins is doing the landing, you'd wouldn't be able to manually amend/squash commits, so puts more of an emphasis on making sure the contributor has the PR commits ready to land -- but I think that's a little premature.

@mhdawson
Copy link
Member

mhdawson commented Feb 6, 2018

No current action item, removing from build agenda based on discussion in last meeting.

@maclover7
Copy link
Contributor

Moving this to nodejs/commit-queue#1, since there is a whole separate team for this now

@refack refack reopened this Jun 10, 2018
@sam-github
Copy link
Contributor

Closing as stale, but if anyone wants to take this up feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants