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

Add support for github checks #161

Closed
wants to merge 175 commits into from
Closed

Add support for github checks #161

wants to merge 175 commits into from

Conversation

jdm
Copy link

@jdm jdm commented Jan 5, 2019

Rebased from rust-lang/homu#10.

Alexis Beingessner and others added 30 commits May 20, 2015 13:52
Incorporate 'flake8' linting via Travis CI
Register Travis webhooks with Homu
Allow multiple types of builders
Fix for repos not using status
Particularly in fast forward situations, we can have just one comment
that includes the successful test result and note that we're preparing
to merge, including a link to the merged checksum.

It's just nicer to see all of the state in one comment.
Instead of throwing a trace the exception is caught and logged. If the
call happens at an HTTP endpoint the proper abort() occurs.
Adds try/except around requests calls
This is an alternate implementation of PR #8. If the user is looking at the special "all" queue page no link will be shown.
There is a race condition on all of our CI systems when there is a build queue
and multiple builds (e.g., try and auto) pushing to the same brach. If one
build is pushed, a CI is queued but not started, and then another build is
pushed to the same branch, when the queued CI job begins executing, it will
fail to find the git commit hash since it is no longer in the branch.
Try builds should be able to use a different branch than auto
It seems that
7fa3965
regressed things when using status only.

The format seems to have changed at one point to a dictionary, but
this code was treating it as a list (using `[0]`).

Since we were already iterating over the statuses, move the special
casing for "status-only-travis" up to there, and slay the massive
conditional.

Conflicts:
	homu/main.py
Fix travis exemption code again for status-only context
One of my projects (projectatomic/rpm-ostree) has a protected master
branch.  I was rather horrified to realize that homu force-pushes to
master by default.  This ended up leaving the "temporary" commit on
master.  Admittedly, I understand this is the only way to make github
think the PR was merged (as opposed to just closed).

Force pushing to master is IMO a *terrible* idea becuase it means
clients doing pulls might see the transient commit, etc.

What we really want is a github API to say that we did a merge,
but until that exists, I think using the `Closes` tag is good enough.
We also tweak the PR title to include `[merged]` which helps a lot.

This is a rework of a prior commit which made this behavior an option,
but I think force pushing is a bad enough idea that we should just
replace the old code.  If anyone complains, we can discuss options.
Add a `linear_fake_merge` option (defaulting to True)
alexrs and others added 28 commits March 27, 2018 11:15
Add cfg to parse_commands calls in server.py
Replaced slicing text from set_treeclosed method to its caller #153

This pull request is for issue #153

Replaced the slicing with strip by using `word.lstrip()`

The occurrences are been replaced up to my knowledge. @jdm let me know in case if I missed anything.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/158)
<!-- Reviewable:end -->
1.0.0+ does not work the same way. We should eventually upgrade, but for
now, pinning the dependency.

For some reason the less-than syntax isn't enough.
pin github3.py version

1.0.0+ does not work the same way. We should eventually upgrade, but for
now, pinning the dependency.

For some reason the less-than syntax isn't enough.

r? @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/164)
<!-- Reviewable:end -->
Mention how to make it update

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/165)
<!-- Reviewable:end -->
max_priority should be toplevel

r? @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/168)
<!-- Reviewable:end -->
SQLite migration notes: Either start from a fresh db, or run `ALTER
TABLE pull ADD try_choose text`
Add support for try=chooser syntax

Adds support for try choosers in the configuration.

SQLite migration notes: Either start from a fresh db, or run `ALTER TABLE pull ADD try_choose text`

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/167)
<!-- Reviewable:end -->
Fix link

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/170)
<!-- Reviewable:end -->
Add support for build results page

Currently we get this by going to the buildbot grid, but if you're not on the latest five builds, you have to scroll through the waterfall, which is annoying.

Whipped this together as I was waiting for buildbot. Completely untested.

cc @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/169)
<!-- Reviewable:end -->
Quick fix for homu timeout on try (fixes #903)

Homu unconditionally waits on non-buildbot builders on a try build, which is fine except on a try_choose build it shouldn't.

The proper fix is to break `try` support out of the buildbot code here so that try choosers can be status builders too, which I'll do sometime later.

r? @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/174)
<!-- Reviewable:end -->
Fix TravisCI errors

Fixes #178.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/179)
<!-- Reviewable:end -->
Use None, not False, for try_choose default value

False gets stored as 0

fixes #176

I also ran `update table pull set try_choose=null where try_choose=0;`
on the database to clean up things affected by this.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/177)
<!-- Reviewable:end -->
This reverts commit 755c02c.

The reverted commit was a fix for servo/saltfs#903,
but that issue is also fixed by servo/servo#22426:
if `.taskcluster.yml` is configured with at least one task,
then taskcluster-github will set the status that Homu is waiting for.
Revert "Quick fix for homu timeout on try (fixes #903)"

This reverts commit 755c02c.

The reverted commit was a fix for servo/saltfs#903, but that issue is also fixed by servo/servo#22426: if `.taskcluster.yml` is configured with at least one task, then taskcluster-github will set the status that Homu is waiting for.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/homu/184)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet