Closed Bug 1554987 Opened 5 months ago Closed 4 months ago

`Invalid remote name: "hg::ssh://hg.mozilla.org/try"` error running ./mach try (fuzzy|chooser) on a git repo

Categories

(Firefox Build System :: Try, defect)

defect
Not set

Tracking

(firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: anatal, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When I try to run ./mach try (fuzzy|chooser) on a m-c git repo, I get the following error:

Invalid remote name "hg::ssh://hg.mozilla.org/try": Invalid remote name: "hg::ssh://hg.mozilla.org/try"
error: failed to push some refs to 'hg::ssh://hg.mozilla.org/try'
Error running mach:

['try', 'fuzzy']

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| 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:

CalledProcessError: Command '(u'/usr/local/bin/git', u'push', u'hg::ssh://hg.mozilla.org/try', u'+HEAD:refs/heads/branches/default/tip')' returned non-zero exit status 1

File "/Users/anatal/projects/mozilla/gecko-dev/tools/tryselect/mach_commands.py", line 276, in try_fuzzy
return self.run(**kwargs)
File "/Users/anatal/projects/mozilla/gecko-dev/tools/tryselect/mach_commands.py", line 180, in run
return mod.run(**kwargs)
File "/Users/anatal/projects/mozilla/gecko-dev/tools/tryselect/selectors/fuzzy.py", line 298, in run
closed_tree=closed_tree)
File "/Users/anatal/projects/mozilla/gecko-dev/tools/tryselect/push.py", line 131, in push_to_try
vcs.push_to_try(commit_message)
File "/Users/anatal/projects/mozilla/gecko-dev/python/mozversioncontrol/mozversioncontrol/init.py", line 460, in push_to_try
'+HEAD:refs/heads/branches/default/tip'), cwd=self.path)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)

Product: Firefox Build System → Testing

git-cinnabar is required to push to try - see https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build/Linux_and_MacOS_build_preparation#Getting_Started. and https://github.com/glandium/git-cinnabar/wiki/Mozilla:-A-git-workflow-for-Gecko-development

python bootstrap.py --vcs=git should ensure you have git-cinnabar installed.

We should probably check that the cinnabar command is installed with git --list-cmds=others and throw a better error message prior to interacting with hg::ssh:// repositories if it isn't.

Summary: Issue running ./mach try (fuzzy|chooser) on a git repo → `Invalid remote name: "hg::ssh://hg.mozilla.org/try"` error running ./mach try (fuzzy|chooser) on a git repo

That check should already exist:
https://searchfox.org/mozilla-central/source/python/mozversioncontrol/mozversioncontrol/__init__.py#454

So somehow git cinnabar --version isn't failing, but we don't recognize the path. I'm not sure how this could have happened. Maybe try uninstalling/re-installing cinnabar?

Component: General → Try
Product: Testing → Firefox Build System

Btw I think this issue is local to your environment, so not sure it should block mach-busted. But maybe I don't understand how that's supposed to work.

(In reply to Byron Jones ‹:glob› 🎈 from comment #1)

We should probably check that the cinnabar command is installed with git --list-cmds=others

There are valid setups where cinnabar and remote-hg don't appear in that list, but in git --list-cmds=main.

The git version shipped in some versions of OSX is patched by apple in a
way such that doing git push hg::ssh://... fails with an error message
like Invalid remote name "hg::ssh://....

So instead, we define a named remote via inline configuration, and use
that remote's name for the push.

Assignee: nobody → mh+mozilla
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/21826fb830de
Invoke git push with a remote name for mach try. r=ahal
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/2f565c4f68f7
Invoke git push with a remote name for mach try. r=ahal
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Regressions: 1561632
You need to log in before you can comment on or make changes to this bug.