Phabricator/FAQ

From MozillaWiki
Jump to: navigation, search

Contents

Phabricator and Lando FAQs

This FAQ is a collection of questions from users that have come up in IRC, Slack, and elsewhere. Please feel free to add more if you hear other questions coming up frequently. Note that you can always ask questions of both the development team and other users in #phabricator and #lando on IRC and Slack.

The documentation is available on how to use it in the readthedocs Mozilla instance: https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html

See https://wiki.mozilla.org/Phabricator/Bugzilla_Equivalents for how to perform common Bugzilla tasks in Phabricator.

Phabricator

Why is my Phabricator revision showing up as "secure" or "in draft"?

All revisions on Phabricator are initially non-public; when Bugzilla sees a new revision it checks the visibility of the bug and will update the revision to match: revisions referencing public bugs will be made public, and non-public bugs result in the BMO security group and CC list being mapped to the revision's policies. These are kept in sync as the bug changes.

There may be a short delay after submission before the revision is visible to other users.

Can I use Phabricator for patches to security bugs?

Yes. Only people who can see the Bugzilla bug will be able to see your revision.

The visibility of the Phabricator revision is kept in sync with visibility changes to the bug. For example CC'ing someone to the bug will allow them to view the revision in Phabricator.

When I clicking the Phabricator “Log In or Register” button, why is a new tab is opened with the exception ‘Unhandled Exception(“AphrontMalformedRequestException”) Your browser did not submit a “phcid” cookie with client state information in the request’

This can happen to users who are using containers for Bugzilla. Instead of clicking on the “Log In or Register” button, copy Phabricator the login page URL into the same container as Bugzilla. You may want to consider adding Phabricator and/or Lando to the same container as Bugzilla.

How do I require a review from all reviewers before landing?

Add all reviewers as "blocking" reviewers, either from the UI or by appending a “!” to their name when specifying them in MozPhab: Bug 123456 - Example commit description; r=someone!

With MozPhab you can alternatively use the --blocker switch: moz-phab submit --blocker someone

To set a reviewer as blocking in the UI, edit the revision and use the reviewer autocomplete; each result will have a normal and a "blocking" entry.

Selecting blocking vs nonblocking reviewers

Can I close multiple revisions with one commit message? (by including multiple “Differential Revision:” lines?)

No. Each commit is associated with a single revision.

Why do I get the following error during patch submission: "Error parsing field "Reviewers": The objects you have listed include objects which do not exist (name)."?

The specified name either does not have a Phabricator account, or is using a different nick on Phabricator than the one you specified.

How do I reopen an existing revision to submit more updates for review (e.g. following a backout)?

Use the action drop down, just above the comment box at the bottom of the page and make sure you hit "Submit".

Closed revision actions

Note that you will need to run moz-phab submit again to update the patch even if you don't need to change it (e.g. the bustage was in an earlier commit). This is because Phabricator updates the revision after it lands but does not provide the necessary metadata that Lando needs. See bug 1489126.

See also https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html#other-revision-actions for descriptions of other non-review-related actions you might want to take on a revision.

How do I keep the original commit author when commandeering someone else's revision?

Use hg commit --amend --user "Other Person <person@mozilla.com>" or git commit --amend --author="Other Person <person@mozilla.com>" when amending the original commit.

How do I download the patch or a file from Phabricator and apply it locally?

  • Use the moz-phab patch command to download an apply a diff (recommended)
  • Manually download just the diff from the menu on the right side of the page:

Download Raw Diff

To download an individual file from within the page, use the "Show Raw File" options under "View Options":

View Options Menu

How do I hide inline comments?

Controls for this will appear when scrolling over a diff. You'll get a bar that sticks to the top of the viewport and lets you hide/show in a number of ways.

Full Hide Comments Menu

TIP: Like most actions there's a keyboard shortcut for this - "Shift + A". Pro tip: pressing "?" will show all the keyboard shortcuts.

Why don't we mirror review flags to Bugzilla?

Keeping flags mirrored between two distributed systems that have different data models is hard and can be misleading. There are no direct equivalents between Differential's review actions and state and Bugzilla's flags. Furthermore, the full state of a review is not exposed by Phabricator's Conduit API. See this dev.platform post for more information.

We will be including some revision metadata in associated bugs at some point; see bug 1489706.

How do I mark myself 'Out Of Office' to stop review requests?

You can use Phabricator's calendar feature to set your availability. This will result in a warning at submission time.

Can I filter Phabricator mails in gmail?

Yes, if you enable stamps in e-mail bodies. There's some examples in the upstream documentation.

Why does logging into Phabricator require 2FA/MFA?

Anyone using Phabricator is authoring patches, reviewing patches, and/or accessing confidential patches.

MFA is a reasonable burden for these people given the importance of maintaining secure processes in the development of Firefox and other Mozilla applications. Given that Bugzilla is coupled to Phabricator, and a lot of important discussion around bugs and solutions also happens in Bugzilla, including confidential discussions, anyone involved in the above activities on Phabricator should also have equal protections when accessing Bugzilla.

Users who use GitHub to log into Bugzilla will need to switch their login method to username+password by logging out, then following the "Forgot Password" workflow.

If you don't have access to a smartphone or hardware security token, there are desktop TOTP applications available. While we do not generally recommend these this SuperUser answer lists various clients across different operating systems.

My patch is too large for Phabricator; what are my options?

Phabricator has a limit of 32MB on patches. If your patch exceed this size you should seriously consider splitting the patch into multiple commits (e.g. bumping versions of vendored rust crates one at a time rather an in a single commit). Your reviewers will thank you for this - massive patches are harder to review. Note if you use Lando to land your stack, each commit will land as part of the same push - you won't end up in a partially landed stack.

If your patch makes small changes to multiple files, try submitting with the --less-context switch. Phabricator works by submitting the complete contents of each file modified; when touching many files it can be easy to exceed the 32MB limit. Note --less-context disables the ability to show more context when viewing a patch on Phabricator.

How do I change my Phabricator email address?

Instructions are here.

Why am I getting You do not have permission to edit this object. when trying to review a revision?

This likely means your Bugzilla account does not have editbugs rights.

You can request editbugs by following the directions on how to upgrade permissions.

How do I request a new reviewers group in Phabricator?

Requests for new review groups are handled via Bugzilla. Please file a bug under `Conduit :: Administration` outlining the name of the group and the Phabricator usernames of the initial group members.

See bug 1812153 as an example.

Command-line tool: moz-phab

How do I fetch and apply changes to a local repository?

Use moz-phab patch D<NNNNN> command to download and apply stacks of Phabricator revisions.

Execute moz-phab patch --help for information on how to change patch's behaviour.

What does the "contains arc fields" error mean?

The "contains arc fields" error means that revision was previously pushed to Phabricator with arc directly.

moz-phab doesn't support all the fields that arc itself does, including the "test plan" field. If moz-phab were to rewrite the commit description that information would be lost. Currently moz-phab takes a conservative approach and will stop with the "contains arc fields" error message.

You can work around that by rewriting the commit description yourself to only include the description and the 'Differential Revision:' line.

There are plans to both support the "test plan" field and parse an arc formatted commit description with moz-phab.

Does moz-phab work with mq (Mercurial Queues)

No. mq was deprecated 5+ years ago; please use evolve instead.

See https://gregoryszorc.com/blog/2014/06/23/please-stop-using-mq/ and https://www.mercurial-scm.org/doc/evolution/from-mq.html

Why moz-phab is submiting stack in reverse order?

You might be using the bookbinder extension. Please run moz-phab in a safe mode, by using --safe-mode option. See https://bugzilla.mozilla.org/show_bug.cgi?id=1539412 for more detailed explanation and a different solution.

moz-phab is not working after self-update

Some shells cache called executables location. The last Python2 release removes itself after a successful installation of the package from PyPI. Since the original file has been removed a non-existing location might be called. In bash one rebuilds the cache by calling hash -r.

It might also happen that moz-phab script was installed into a directory which is not mentioned in `PATH` variable. To check the directory run pip3 show MozPhab -f

How do I update a patch opened with moz-phab?

When you push a patch with moz-phab, it will append an identifying string to the commit that looks something like Differential Revision: https://phabricator.services.mozilla.com/D79722. As long as this string is not modified, executing moz-phab again will ask if you want to push to that patch.

Lando

Lando says "You have insufficient permissions to land. Level 3 Commit Access is required." What do I do?

If you don't have Level 3, follow the guidelines for the repository you're trying to land code in.

If you have Level 3 and are still getting this error, try:

  • logging out of auth0 and logging in again
  • ssh to hg.mozilla.org and verify that scm_level_3 is reported there
  • log into https://sso.mozilla.com/info and check that active_scm_level_3 is listed under https://sso.mozilla.com/claim/groups

If you used to be a volunteer and are now an employee, you likely have two LDAP accounts, and you may not have your commit access associated with the account you used to log into Lando. See the next FAQ entry.

Otherwise, contact Service Desk, as it indicates a misconfiguration with your account.

My SCM level is bound to a different LDAP account from my Mozilla one. How do I log into Lando to land changes?

You will need to log into the account that is associated with your SCM permissions. If you have only ever accessed that account by ssh key, that is, to push up commits, you will likely need to request a password change to be able to use Auth0.

To request a password file a bug requesting a password reset while logged in to your account with SCM permissions.

Note the SSO login system only allows you to be logged into one account at a time; when you log in with your community account any existing Mozilla Corporation sessions will be invalidated. You can work around this by pinning Lando to a different Firefox container, use a private browsing window, using a different Firefox profile, or using a different browser.

Lando says "This diff does not have the proper author information uploaded to Phabricator", but I see an author on Phabricator. What's wrong?

There are a few reasons this could happen:

  • The revision was created via the Phabricator Web UI or via an unsupported client.
  • The revision was created via moz-phab, but the error still appears.
    • This can happen if you have not set an author email in your .hgrc file (or git config). Set your author email in your .hgrc to your username, Firstname Lastname <yourldapemail@mozilla.com>. Update your commit so it contains the new author data. Re-run moz-phab submit so that the new commit+data is uploaded to Phabricator.

What are these red dots to the left of my commits?

These show the shape of the commit stack, which is important when commits are non-linear:

Lando-stack-shape.png