Open Bug 1720940 Opened 4 years ago Updated 3 years ago

mach try / hg push-to-try should handle auth failures more gracefully

Categories

(Developer Infrastructure :: Try, defect, P3)

Desktop
Windows 10

Tracking

(Not tracked)

People

(Reporter: Gijs, Unassigned)

Details

I forgot to ssh-add my key on my new machine, and got the following output:

estimates: Runs 64 tasks (32 selected, 32 dependencies)
estimates: Total task duration 13:50:35
estimates: In the 49% percentile
estimates: Should take about 1:50:19 (Finished around 2021-07-16 22:10)
Creating temporary commit for remote...
A try_task_config.json
pushing to ssh://hg.mozilla.org/try
remote: Permission denied (publickey).
temporary commit removed, repository restored
abort: no suitable response from remote hg!
Error running mach:

    ['try', 'fuzzy', 'toolkit/content/tests/browser/', '--artifact']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file try| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '('mozilla-build\\python\\Scripts\\hg.EXE', 'push-to-try', '-m', "Fuzzy query='verify !wpt !gpu !android&paths=toolkit/content/tests/browser/\n\nPushed via `mach try fuzzy`")' returned non-zero exit status 255.

  File "mozilla-unified\tools/tryselect/mach_commands.py", line 334, in try_fuzzy
    return self.run(**kwargs)
  File "mozilla-unified\tools/tryselect/mach_commands.py", line 194, in run
    return mod.run(**kwargs)
  File "mozilla-unified\tools\tryselect\selectors\fuzzy.py", line 453, in run
    closed_tree=closed_tree,
  File "mozilla-unified\tools\tryselect\push.py", line 217, in push_to_try
    vcs.push_to_try(commit_message)
  File "mozilla-unified\python/mozversioncontrol\mozversioncontrol\__init__.py", line 516, in push_to_try
    env=ensure_subprocess_env(self._env),
  File "mozilla-build\python3\lib\subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)

Sentry event ID: d6097da6af9e42a48023ee90dfce0b22
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit

Note that the relevant bit is:

remote: Permission denied (publickey).
temporary commit removed, repository restored
abort: no suitable response from remote hg!
Error running mach:

But python exceptions are yucky and this should give a more user-friendly response.

Severity: -- → S4
Priority: -- → P3
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.