Closed Bug 1802405 Opened 1 year ago Closed 1 year ago

Using mach via powershell, push-to-try uses wrong SSH

Categories

(Firefox Build System :: General, defect, P3)

defect

Tracking

(firefox-esr102 unaffected, firefox107 unaffected, firefox108 unaffected, firefox109 fixed)

RESOLVED FIXED
109 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox107 --- unaffected
firefox108 --- unaffected
firefox109 --- fixed

People

(Reporter: barret, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Bug 1801826 made it so that we prepend the MSYS2 paths for mozilla-build onto the PATH. However, the MSYS2 bin dir in mozilla-build contains an ssh binary, which hg will find when trying to push to try.

If you are using Windows SSH, this will break and attempt to use the msys2 ssh, which cannot talk to the Windows SSH ssh-agent.

As a workaround, you can add this to your .hg/hgrc:

[ui]
ssh = C:\WINDOWS\System32\OpenSSH\ssh.exe

Set release status flags based on info from the regressing bug 1801826

:emilio, since you are the author of the regressor, bug 1801826, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Severity: -- → S3
Priority: -- → P3
Flags: needinfo?(emilio)

This reverts bug 1801826 and instead prepends the msys2 path only for
the build, which is a bit more sensible.

This allows us to remove the existing warning from old_configure, since
that can't happen now.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/738ee02dfc2a
Prepend mozillabuild msys2 to path only for the build. r=glandium

Backed out changeset 738ee02dfc2a (Bug 1802405) for causing build bustages.
Backout link
Push with failures
Failure Log

Flags: needinfo?(emilio)
Attached file Fixup?

Ugh, sorry. So this is due to the when=host_is_windows change, which makes the MOZILLABUILD stuff not be defined on non-windows hosts.

Mike, I guess I can fix it in a couple ways:

  • Remove it
  • Do something like:
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index 73ed10edab10c..c308130c561a1 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -1146,7 +1146,7 @@ def mozillabuild_bin_paths(mozillabuild, shell):
 @depends(mozillabuild_bin_paths)
 @imports("os")
 def prefer_mozillabuild_path(mozillabuild_bin_paths):
-    return mozillabuild_bin_paths + os.environ["PATH"].split(os.pathsep)
+    return (mozillabuild_bin_paths or []) + os.environ["PATH"].split(os.pathsep)
 
 
 # A template providing a shorthand for setting a variable. The created
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
index f81465df0d780..0547b7e2e3f2c 100755
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -659,7 +659,7 @@ def rust_search_path(rust_path, search_order, original_path):
 @depends(mozillabuild_bin_paths, vc_toolchain_search_path)
 @imports("os")
 def altered_path(mozillabuild_bin_paths, vc_toolchain_search_path):
-    altered_path = mozillabuild_bin_paths + list(vc_toolchain_search_path)
+    altered_path = (mozillabuild_bin_paths or []) + list(vc_toolchain_search_path)
     for p in os.environ["PATH"].split(os.pathsep):
         if p not in altered_path:
             altered_path.append(p)
  • Do something like the attached patch.

What's your preference?

Flags: needinfo?(emilio) → needinfo?(mh+mozilla)

Option 4: change the when to a straight dependency.

@depends("MOZILLABUILD", shell, host_is_windows)
@imports(_from="pathlib", _import="Path")
def mozillabuild_bin_paths(mozillabuild, shell, host_is_windows):
    paths = []
    if not mozillabuild or not host_is_windows:
        return paths
    paths.append(os.path.dirname(shell))
    paths.append(str(Path(mozillabuild[0]) / "bin"))
    return paths
Flags: needinfo?(mh+mozilla)

Sweet, thanks!

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bfc4b3e6f15c
Prepend mozillabuild msys2 to path only for the build. r=glandium
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: