Closed Bug 1574145 Opened 5 months ago Closed 4 months ago

Cannot push binary file with moz-phab.

Categories

(Conduit :: moz-phab, defect, P3)

Production
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: arpit73, Assigned: zalun, NeedInfo)

Details

(Keywords: conduit-triaged)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

I am trying to push two revisions to phabricator with moz-phab, one of the revisions includes a binary file.

Running moz-phab gives the following prompt

Invalid Content Encoding (Non-UTF8)
This diff includes a file which is not valid UTF-8 (it has invalid byte
sequences). You can either stop this workflow and fix it, or continue. If you
continue, this file will be marked as binary.

You can learn more about how Phabricator handles character encodings (and how
to configure encoding settings and detect and correct encoding problems) by
reading 'User Guide: UTF-8 and Character Encoding' in the Phabricator
documentation.

    AFFECTED FILE
    netwerk/dns/tests/unit/data/dafsa_xpcShellTest.bin
    Do you want to mark this file as binary and continue? Yes

Actual results:

Pressing «enter» or typing yes/Yes does not do anything and the program doesn't respond to any user actions.

Expected results:

The file should be marked as binary after pressing enter and revision should be pushed to phabricator.

Assignee: nobody → pzalewa
Keywords: conduit-triaged
Priority: -- → P1

could you please show me the result of
grep mozPhabConfirm --context=1 ~/.mozbuild/moz-phab/arcanist/src/workflow/ArcanistDiffWorkflow.php?

Flags: needinfo?(arpitbharti73)
➜  mozilla-central grep mozPhabConfirm --context=1 ~/.mozbuild/moz-phab/arcanist/src/workflow/ArcanistDiffWorkflow.php

      if (!$this->mozPhabConfirm($confirm) && !phutil_console_confirm($confirm, $default_no = false)) {
        throw new ArcanistUsageException(pht('Aborted workflow to fix UTF-8.'));
--
            $confirm = pht('Continue even though reviewers are unavailable?');
            if (!$this->mozPhabConfirm($confirm) && !phutil_console_confirm($confirm)) {
              throw new ArcanistUsageException(
--
    $ok = (
      $this->mozPhabConfirm($prompt)
      || phutil_console_confirm($prompt, $default_no = true)
--

  private function mozPhabConfirm($message) {
    // When called from moz-phab just display the confirmation message and

Flags: needinfo?(arpitbharti73)

Actually, there should be no prompt. We're using a modified Arcanist and this prompt is bypassed to always agree with uploading a binary file.
I was expecting that you're using an old version of Arcanist, but it seems fine.
Can you please run also moz-phab self-update and check again? It might be there are two versions of mozphab installed.

Flags: needinfo?(arpitbharti73)
Priority: P1 → P2

Lowered priority as it I can't replicate

I ran moz-phab self-update yesterday before opening this ticket, tried it again and it says

Updating libphutil...
Update of libphutil not required
Updating arcanist...
Update of arcanist not required
Update of `moz-phab` not required
Flags: needinfo?(arpitbharti73)

Is this still a problem?
It seems like moz-phab is using a version of Arcanist which is not modified by Mozilla.
I think the issue is somehow related to your configuration.

Flags: needinfo?(arpitbharti73)
Priority: P2 → P3
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.