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

continuous build: merge to master on green #745

Closed
andychu opened this issue May 10, 2020 · 11 comments
Closed

continuous build: merge to master on green #745

andychu opened this issue May 10, 2020 · 11 comments

Comments

@andychu
Copy link
Contributor

andychu commented May 10, 2020

Now that we have reliable continuous build, it would be nice to keep master green.

#742 exposed this.

Knowing the build is broken after the fact is good, but there's an obvious hole ...


I don't know how to do this myself, but if anyone has ideas please chime in :-)

@jyn514
Copy link
Contributor

jyn514 commented Jul 22, 2020

It sounds like you want @bors: https://github.com/rust-lang/homu

@andychu
Copy link
Contributor Author

andychu commented Jul 22, 2020

Hm interesting. It looks like bors and homu are separate projects.

Do you know what the difference is? I guess Rust migrated to / created homu because bors wasn't cutting it in some way?

@andychu
Copy link
Contributor Author

andychu commented Jul 22, 2020

Oh I guess homu is because bors is written for buildbot and they don't use buildbot anymore?

I remember that Mozilla was using buildbot a long time ago, so it sorta makes sense ....

@jyn514
Copy link
Contributor

jyn514 commented Jul 22, 2020

There's a long history and I'm not sure of all of it ... If you're interested I'll ask around some more, I think bors-ng is the one that's currently recommended, the rust fork has a lot of peculiarities IIRC.

@jyn514
Copy link
Contributor

jyn514 commented Jul 22, 2020

Yeah this looks much better documented: https://github.com/bors-ng/bors-ng. There is also a bors-rs but it's very experimental.

@andychu
Copy link
Contributor Author

andychu commented Jul 22, 2020

Hm it all looks kinda complex. I'm inclined to to defer it for awhile (or I would accept a PR if it "just worked")

We should definitely do this eventually, but I think there aren't enough contributors at the moment to justify the work.

(Also these are famous last words, but I don't understand why the whole thing isn't a shell script? We should just push to master2 and then have Travis job with credentials to do the merge to master? We already have some Nix credentials in Travis.)

What started this is that I did indeed leave the master branch broken for a day, which I regret. That is mostly because I didn't think anyone else was pulling at the moment :) But I have learned my lesson and the master branch is much more frequently green now.

(What I would fix is that the one red failure here for Nix is actually OK http://travis-ci.oilshell.org/jobs/

However it doesn't affect the badge on the README.md, so I'm not super concerned.)

@andychu
Copy link
Contributor Author

andychu commented Jul 22, 2020

After looking a bit more at bors, I can see that one reason it might not be a simple shell script is if you have "concurrent" merges, e.g. lots of PRs open at once, some of which may not be green. But you don't want to "block" the pipeline on one bad commit.

But I think we could get by with a "linear model". e.g. master lags behind may-not-be-green-master.

If there's a broken commit, then the whole thing is held up, which is OK for us, but not for a huge project with tons of committers

@andychu
Copy link
Contributor Author

andychu commented Jul 22, 2020

Very relevant thread: https://news.ycombinator.com/item?id=21584144

in Chrome they had a "try bot". But again I think that was heavily concurrent, which we don't need now

@andychu
Copy link
Contributor Author

andychu commented Jul 22, 2020

Actually I now think this is higher priority, because the oil-native translation via mycpp now runs in the continuous build. And I kind of lean on that to test it.

So there is a non-neglible chance that someone will clone when the oil-native build is broken, even if the Python build is mostly what's necessary to change Oil. (Eventually I would like help in translation)

from the HN thread: https://forum.bors.tech/t/other-apps-that-implement-the-nrsrose/51

andychu pushed a commit that referenced this issue Jun 20, 2022
- Use 'needs' from github actions
- publish to new /status-api/

This works.  Now we just need to check that all statuses are 0, and
merge.

Highly related to Hay (#951).  Our all-builds.yml can use some
metaprogramming.

This is part of #745.
andychu pushed a commit that referenced this issue Jun 21, 2022
This is #745.

Right now it's gated on just two tasks: dummy and dev-minimal.

Notes:

1. I figured out the Github API to fast forward.
2. I generated an API token from the web interface
3. Put that token into Github Actions
andychu pushed a commit that referenced this issue Jun 21, 2022
This is most of #745.

Right now it's gated on just two fast jobs: dummy and pea.

Notes:

1. I figured out the Github API to fast forward.
2. I generated an API token from the web interface
3. Put that token into Github Actions

Right now there is an error about "update is not a fast-forward".  Not
sure why.
@andychu
Copy link
Contributor Author

andychu commented Jun 21, 2022

Merge bot is done with a simple shell script! I don't see any reason this won't work even for a high number of contributors / high concurrency ?

https://github.com/oilshell/oil/blob/master/soil/maybe-merge.sh

https://oilshell.zulipchat.com/#narrow/stream/121539-oil-dev/topic/Creating.20Merge.20Bot

@andychu
Copy link
Contributor Author

andychu commented Jul 28, 2022

@andychu andychu closed this as completed Jul 28, 2022
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

2 participants