Phabricator/FAQ: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Add new FAQ for arc --trace)
(FAQ about "arc patch --nobranch")
Line 84: Line 84:


Use the “--allow-untracked” option to arc diff.
Use the “--allow-untracked” option to arc diff.
=== How do I get "arc patch" to apply changes to local tip instead of branching an earlier commit? ===
Use "arc patch --nobranch [rest of command]".


=== The official docs on installing Arcanist on Windows are ... not great. Are there better ones somewhere? ===
=== The official docs on installing Arcanist on Windows are ... not great. Are there better ones somewhere? ===

Revision as of 22:14, 24 August 2018

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.

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 reply to an inline comment without leaving another comment that I have to mark as "Done"?

The "Done" checkbox always accompanies comments/replies. This is built into Phabricator.

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 Arcanist. 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 remove "Tags: #secure-revision" from my changeset’s commit message?

"#secure-revision" is a project tag attached to the revision at the time the commit message is auto-generated. The tag is removed slightly later once Bugzilla has had a chance to update the revisions security policies. After Bugzilla has done this update, you can use "arc amend" to update the commit message with the current state. We are currently working on a custom client that may omit the project tags from the commit message altogether.

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.

Closed revision actions

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 download the patch or a file from Phabricator and apply it locally?

  • Use the arc patch command to download and apply a diff:

Arc Patch

  • 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 'r?' and other review states to Bugzilla, why just 'r+'?

Keeping flags mirrored between two distributed systems that have different data models is hard.

r+ is simple enough and valuable enough to handle, however the other states are more complicated and there isn't a direct mapping force each of the states the two systems use.

See this dev-platform post for more information.

Can I use Phabricator for patches to security bugs?

Yes, unlike MozReview, commits for security bugs can be submitted to Phabricator as access to the reviews are connected with the BMO security groups.

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.

Note this means there may be a short delay after submission before the revision is visible to other users.

Can I block review requests in Phabricator like I can in BMO?

Unfortunately, BMO's system to block review requests isn't suitable for Phabricator because communication with BMO after a revision is created is asynchronous to make the system faster and more robust. We are, however, currently looking into ways we can implement this functionality within Phabricator itself.

Arcanist, the 'arc' command-line tool

How do I get “arc diff” to stop listing and asking about all my untracked build artifacts?

Use the “--allow-untracked” option to arc diff.

How do I get "arc patch" to apply changes to local tip instead of branching an earlier commit?

Use "arc patch --nobranch [rest of command]".

The official docs on installing Arcanist on Windows are ... not great. Are there better ones somewhere?

Yes! We recently published our own step-by-step guide that should be clearer than the official ones: https://moz-conduit.readthedocs.io/en/latest/arcanist-windows.html

arc dies when I do [X]! How do I get debug information out of arc?

Run "arc --trace [rest of command]". You will get a lot of diagnostic information.

If you've found a bug you can file it under the Phabricator component in BMO.

"arc diff" fails on Windows: Failed to passthru proc_open(): proc_open(): CreateProcess failed, error code - 2

 arc diff --trace
 ...
 EXCEPTION: (Exception) Failed to passthru proc_open(): proc_open(): CreateProcess failed, error code - 2 at [<phutil>\src\future\exec\PhutilExecPassthru.php:103]
 arcanist(head=master, ref.master=875d01836037), phutil(head=master, ref.master=1613e68f4740)
   #0 PhutilExecPassthru::execute() called at [<phutil>\src\future\exec\execx.php:50]
   #1 phutil_passthru(string, PhutilCommandString) called at [<phutil>\src\console\PhutilInteractiveEditor.php:122]
   #2 PhutilInteractiveEditor::invokeEditor(string, string, integer) called at [<phutil>\src\console\PhutilInteractiveEditor.php:77]
   #3 PhutilInteractiveEditor::editInteractively() called at [<arcanist>\src\workflow\ArcanistDiffWorkflow.php:1889]
   #4 ArcanistDiffWorkflow::getUpdateMessage(array, string) called at [<arcanist>\src\workflow\ArcanistDiffWorkflow.php:773]
   #5 ArcanistDiffWorkflow::buildRevisionFromCommitMessage(ArcanistDifferentialCommitMessage) called at [<arcanist>\src\workflow\ArcanistDiffWorkflow.php:478]
   #6 ArcanistDiffWorkflow::run() called at [<arcanist>\scripts\arcanist.php:394] 

arc needs to be configured with the full path to your editor (it doesn't check your PATH).

See Arcanist User Guide: Windows for instructions on how to set this correctly.

Lando

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 used "arc diff" to upload my patch. What's wrong?

This can happen if you have not set an author email in your .hgrc file. 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 arc diff so that the new commit+data is uploaded to Phabricator.

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. For mozilla-central, add the "checkin-needed" keyword to the associated bug.

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://prod.testrp.security.allizom.org/ and check that active_scm_level_3 is listed under HTTP_OIDC_CLAIM_USER_PROFILE_HTTPS://SSO_MOZILLA_COM/CLAIM/GROUPS

Contact the Service Desk if scl_level_3 is not present, as it indicates a misconfiguration with your account.