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

Merge upstream #5

Draft
wants to merge 75 commits into
base: master
Choose a base branch
from
Draft

Merge upstream #5

wants to merge 75 commits into from

Conversation

ferdonline
Copy link

No description provided.

aidanhs and others added 30 commits September 21, 2017 19:38
retry if 422 Update is not a fast forward

As @kennytm suggested in rust-lang/rust#43535 This is a quick fix to try and suppress the [intermittent 422 errors.](#24)

<!-- 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/134)
<!-- Reviewable:end -->
remove bare excepts for flake8

Bandaid for the bug which was hit in #133

<!-- 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/138)
<!-- Reviewable:end -->
More logging in debug mode

This is probably excessively verbose (the `{!r}` prints out a lot of irrelevant info), but it's an improvement on the extreme lack at the moment.

<!-- 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/133)
<!-- Reviewable:end -->
This allows the timeout be configured to values less than 1 hour.
Allow TEST_TIMEOUT be configured.

Homu currently hard codes the test timeout to 10 hours. This is unnecessarily long for many projects, including Rust. Recently, there is  bug in AppVeyor or GitHub causing the status notification not delivered, and thus the queue can be stuck for 10 hours when unattended.

This PR introduced a fix to allow the timeout be configured for each repository.

```toml
[repo.NAME]
# timeout after 3 hr 20 min
timeout = 12000
```

When the timeout is less than 1 hour, the current `check_timeout` loop will be too coarse. Therefore, I've also refactored and removed the loop in favor of a [`Timer`](https://docs.python.org/3/library/threading.html#timer-objects) object for each pending PR.

<!-- 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/142)
<!-- Reviewable:end -->
Support relabeling when some event happens

Let Homu automatically relabel the issue when some predefined events happened. The labels can be configured through `cfg.toml` via the `[repo.NAME.labels.EVENT]` key, e.g.

```toml
# when a merge conflict is detected...
[repo.rust.labels.conflict]
# remove the `S-waiting-on-bors` and `S-waiting-on-review` labels...
remove = ['S-waiting-on-bors', 'S-waiting-on-review']
# add the `S-waiting-on-author` label...
add = ['S-waiting-on-author']
# but don't do anything if the PR is already labeled with `S-blocked`,
# `S-waiting-on-crater` or `S-waiting-on-team`.
except = ['S-blocked', 'S-waiting-on-crater', 'S-waiting-on-team']
```

See `cfg.sample.toml` for a list of supported events.

<!-- 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/141)
<!-- Reviewable:end -->
Refactor parse_commands to add tests.

This PR address #143. This is a first step in making Homu testable.

A small refactor has been done, extracting the logic in `parse_commands` to its own functions, to be able to mock the state and add tests.

<!-- 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/149)
<!-- Reviewable:end -->
Fix auth in parse_commands

As discussed in #150, the auth shouldn't' be done at the beginning of `parse_commands`, but when some action is going to be executed. This PR reintroduces `functools.partial` to fix the issue.

<!-- 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/151)
<!-- Reviewable:end -->
Refactor parse_commands to add tests.

This PR tests `parse_commands` and extracts most of the actions (`force` and `hooks` can't be extracted yet) to a new class called `Actions`.
It also removes `global_cfg`. Now, `cfg` is passed to the server thread, and from there, is passed to the methods that require the configuration in `main.py`.

<!-- 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/152)
<!-- Reviewable:end -->
bors-servo and others added 30 commits August 14, 2018 10:30
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 -->
Return content for missing build results.

Fixes #185.

<!-- 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/188)
<!-- Reviewable:end -->
Add support for github checks

Rebased from rust-lang/homu#10.

<!-- 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/186)
<!-- Reviewable:end -->
Remove travis webhook

We use the status API on this repo

<!-- 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/192)
<!-- Reviewable:end -->
Don't expect non-status builders when there are none.

<!-- 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/196)
<!-- Reviewable:end -->
This PR adds support for pull_request_review events to listen for commands in
the main PR review comment. GitHub sends these separately from the line level
comments as part of a review. The logic is almost identical to the other cases
except for the specific event and action and location of some metadata which
changes.
Make homu listen to commands in PR review comments

This PR adds support for pull_request_review events to listen for commands in
the main PR review comment. GitHub sends these separately from the line level
comments as part of a review. The logic is almost identical to the other cases
except for the specific event and action and location of some metadata which
changes.

<!-- 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/197)
<!-- Reviewable:end -->
Don't fall back to a full try if an nonexistent trychooser is requested.

It's frustrating when I use the wrong name when trying to perform a limited try run in Servo and end up starting a full run instead.

<!-- 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/199)
<!-- Reviewable:end -->
Credit the original artist of Hommando

Closes #200
Support try choosers without Buildbot
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.