Look into using the autolander tool to auto-create Bugzilla attachments for GitHub PRs

RESOLVED FIXED

Status

Tree Management
Treeherder: Docs & Development
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: emorley, Assigned: kgrandon)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
See:
https://github.com/mozilla/autolander

I haven't looked yet to see if it can currently be used without also using the Taskcluster parts - if not, we'll need to request that feature be added/open a PR first.
(Reporter)

Comment 1

3 years ago
Hi Kevin! Is it possible to use autolander's automatic bugzilla attachment creation feature, even though we don't need the taskcluster testing functionality? If so, how do we go about getting the treeherder repo (https://github.com/mozilla/treeherder) set up for this? Thanks :-)
Flags: needinfo?(kevin+bugzilla)
Summary: Looking into using the autolander tool to auto-create Bugzilla attachments for GitHub PRs → Look into using the autolander tool to auto-create Bugzilla attachments for GitHub PRs
(Assignee)

Comment 2

3 years ago
Yup, this is totally possible! Instead of typing this twice, I've updated the readme a bit:

Using autolander without treeherder tests: https://github.com/mozilla/autolander#basic-repository-integration

Enabling a new repo to use autolander: https://github.com/mozilla/autolander#enabling-autolander-for-additional-repositories

I need to check if I still have access to heroku to perform these actions so will leave the needinfo for follow-up. If not I'll be in Orlando this week as a contributor and can meet with you to get this all working.
(Assignee)

Updated

3 years ago
Depends on: 1230824
(Assignee)

Comment 3

2 years ago
I've set this up and it should be working now.

We should be able to automatically attach bugs to tickets, and I'll submit a test pull request against this bug to verify.
Assignee: nobody → kevin+bugzilla
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(kevin+bugzilla)
Resolution: --- → FIXED
Created attachment 8700409 [details] [review]
[treeherder] KevinGrandon:bug_1230822_autolander_readme > mozilla:master
(Assignee)

Comment 5

2 years ago
Comment on attachment 8700409 [details] [review]
[treeherder] KevinGrandon:bug_1230822_autolander_readme > mozilla:master

Ed, Will - Autolander seems to work for treeherder as well, it was quite easy actually.

I've opened a pull request to test this along with an updated readme. Let me know if I should adjust the content. 

Also please let me know if you have any trouble with autolander, or need to me to change anything. Thanks!
Attachment #8700409 - Flags: review?(wlachance)
Attachment #8700409 - Flags: review?(emorley)
Comment on attachment 8700409 [details] [review]
[treeherder] KevinGrandon:bug_1230822_autolander_readme > mozilla:master

Wow, this is awesome! Thanks Kevin. However, I don't think the README is the right place for this information. We maintain most of the info related to contributing to treeherder on the wiki page (https://wiki.mozilla.org/Auto-tools/Projects/Treeherder), so we should put it there.

I'm going to cancel this review and file another patch using autolander before the end of the day. :)
Attachment #8700409 - Flags: review?(wlachance)
Attachment #8700409 - Flags: review?(emorley)
Autolander landed bug 1234302 earlier today, worked great!

I updated the treeherder wiki page with a link to autolander: https://wiki.mozilla.org/EngineeringProductivity/Projects/Treeherder#Contributing

Thanks again Kevin, this will save a lot of time and hassle.
(Reporter)

Comment 8

2 years ago
Thank you for sorting this :-)

The attachment creation is really useful. Re automatically merging, when someone gives an r+ it can often be with review comments that need to be addressed first, so I don't think automatically merging is the right workflow for us. I've removed the autolander user from push permissions on the repo to prevent this (the hooks are still there for it to be notified about new PRs etc).

I don't know if that's going to cause errors on autolanders side (and so whether the autolander config needs to be adjusted on not), so thought I'd mention here in case :-)
(Assignee)

Comment 9

2 years ago
(In reply to Ed Morley [:emorley] from comment #8)
> Thank you for sorting this :-)
> 
> The attachment creation is really useful. Re automatically merging, when
> someone gives an r+ it can often be with review comments that need to be
> addressed first, so I don't think automatically merging is the right
> workflow for us. I've removed the autolander user from push permissions on
> the repo to prevent this (the hooks are still there for it to be notified
> about new PRs etc).
> 
> I don't know if that's going to cause errors on autolanders side (and so
> whether the autolander config needs to be adjusted on not), so thought I'd
> mention here in case :-)

Autolander supports this case by not auto-merging until the `autoland` keyword is added, it's very similar  to checkin-needed. I think it would save you time, but totally fine if you don't want to use that part.
(Reporter)

Comment 10

2 years ago
Ah I forgot about needing the keyword, that makes sense & alleviates that problem :-)

For me personally I prefer to rebase my commits to make the commit history cleaner rather than using the green button (and have a bash alias that does it all in one command, including deleting the PR branches after merging) so will probably continue to use that. I'll bring up the topic at the next meeting and see what people think.
You need to log in before you can comment on or make changes to this bug.