Personal tools

ReleaseEngineering:Autoland

From MozillaWiki

(Redirected from Build:Autoland)
Jump to: navigation, search

Autoland is a system of tools running on a virtual machine that polls bugzilla for a whiteboard tag requesting autolanding. Upon finding the whiteboard tag, the module will pull either all the non-obsolete patches attached to the bug or any attachment ids (must be attached to the current autoland-specified bug) you request in the whiteboard tag and then it applies those patches to the tip of mozilla-central and pushes to try on your behalf. The results are tracked in the bug where autolanding has been requested.

Contents

What does it do?

Polls individual bugs for a custom whiteboard tag and when finding valid tags, makes an automated landing to try for you. It will report details in the bug about the try push and the build results when complete. Jobs are pushed with default try syntax "-b do -p all -u none -t none". If you want more than this, you will be required to specify it in the autoland tag.

How does it work?

Insert a whiteboard tag so the scripts will pick up that this bug has patches you'd like landed (we can only work with one bug at a time right now). Our automation will pull tip of mozilla-central, import your patch(es), then push to try on your behalf. You will not receive an email about your try push, your revision will be posted back to the bug when the push completes.

Tag syntax

Our system looks for three separate components in your whiteboard tag: branch name, patch list, and try syntax.

If you put nothing other than 'autoland-$branch', the automation will grab all non-obsolete patches attached to the bug and import them to tip of mozilla-central and push the changes to try.

To provide more customization the whiteboard tag can include two other sections, one for try syntax and one for a specific list of attachmentIDs (patches) to import.

Note: for attachment id you need to grab the ID from the link on the bug, just the digit, the scripts build the url
Future improvements to this system include getting a BMO extension that will allow for selecting 
which patches with a better UI (checkboxes next to each patch) and a submit button
that will populate the whiteboard tag for you

Sample Valid tags

[autoland-$branch]  # autoland (whiteboard tag version) splits on '-' to find the branch (repo) name
[autoland-$branch:$attachmentID(,$attachmentID)]  # several attachmentIDs should be comma-separated   
[autoland-$branch:-p linux -u none]  # try syntax will get put in the commit comments to control what builds your push gets
[autoland-$branch:$attachmentID:-p win32 -b o] # specifying both attachmentID(s) and try syntax (use : to separate)

What about repo permissions?

One of the following must be true for a patch to be autolanded:

  • The author of the patch has the appropriate level of permissions for the intended repo the patch will be landed on (currently we only land to try so L1 permissions)
  • If a patch has r+, the reviewer has the appropriate level of permissions (eg: approving a contributor's patch who does not have L1 will allow the patch to still be autolanded)

Remember that if you only want to try certain patches, you can list the attachment id #'s in the tag:

[autoland-$branch:24535,23524]

Can I still use try syntax to customize my builds?

Yes! In your whiteboard tag you can include the try syntax (note you do not need the 'try:' part). Default try syntax is "-b do -p all -u none -t none"

Examples:

# no attachmentIDs listed
[autoland-$branch:-p linux -u none]
# with attachmentIDs listed
[autoland-$branch:409589:-p all -u mochitests]

Can I specify the order in which to apply patches?

Yes! When you don't specify attachmentIDs, all non-obsolete patches will be imported in descending order by creation date (oldest to newest). If you would like your patches applied in a different order then you can list them in the whiteboard tag as:

[autoland:1,2,3]

and they will be applied in that order because the logic of import uses

for patch in patches where patches is '1,2,3'.split(',')

Can I land to a branch other than try?

Not yet, but that feature will be coming soon

Can I land automatically through an API instead of through bugzilla?

Not yet, but that feature will be coming soon

How can I report a bug with Autoland?

File a bug in bugzilla against product "mozilla.org", component "Release Engineering: Developer Tools", and place the tag [autoland] into the whiteboard. Or, you can simply use this Bug Template.