Sheriffing/How To/Landing patches

From MozillaWiki
Jump to: navigation, search

Manually landing a patch

A patch can be landed manually if

  • the repository in which it shall land is not supported by Lando or
  • the repository is closed for landing patches with Lando and the patch needs to land now.

Apply the patch from Phabricator:

moz-phab patch D<number> --apply-to . --skip-dependencies

--skip-dependencies ensures only the selected patch gets applied. This prevents accidentally applying more patches in the patch stack (the ones between the revision used as base for development and the one mentioned in the command). If a patch stack shall land, drop this argument but still check only the intended patches get applied.

The commit message has to be updated to add the granted reviews:

hg commit --amend

In case the commit messages of a patch stack shall be edited:

hg histedit

Select m for mess and save to get prompted for the commit message for each commit.

Phabricator queries for revisions requiring check-in

People only get the permission to land changes after repeated contributions. Until they can land them, the reviewers are expected to land their changes. Sheriffs should not land such patches. The documentation for the workflow below is kept for potential future use.

  • There is a saved Phabricator differential query that may be used to find revisions requiring check-in.

Location of the menu link for #Check-in Needed Query

How to land #Check-in Needed revisions

The only supported method for landing check-in needed patches from Phabricator is Lando.

Landing revisions via Lando (to integration/autoland)


  • Access the revision and click View Stack in Lando at the top right of the page:

Location of the View Stack in Lando link

  • Verify that the reviewers who have accepted the revision have proper authority.
    • Look at the reviewers column in the table showing the stack of revisions and identify the reviewers who have accepted each revision.
    • Verify these reviewers are Module Owners/Peers and have the authority to review code for Firefox.

Location of reviewers in Lando

  • Click the Preview Landing button in the bottom right corner of the page.

Location of the Preview Landing button

  • Quickly look over each commit message’s first line in the landing preview to ensure it is formatted correctly. Note that the preview pane scrolls vertically to list all of the commits.

Location of each commit message's first line.

  • Check the landing warnings.
    • The bottom of the landing preview might contain a list of warnings that block landing unless acknowledged.
    • Warnings should not be acknowledged without consideration.
    • Warning signWarning: Only the "Has Previously landed" warning is acceptable to acknowledge and continue landing. If there are any other warnings present landing should halt.

A list of warnings in the Landing Preview

If you cannot land the patch from the GUI:

  • Remove the #Check-in Needed project tag.
    • To do this access the revision and click Edit Revision at the top right of the page.

Location of the Edit Revision link

  • Comment on the revision that it could not be checked-in, providing the reason.