Closed Bug 2006510 Opened 8 months ago Closed 6 months ago

error pushing patches to try with Lando

Categories

(Conduit :: Lando, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mjf, Unassigned)

References

Details

(Keywords: conduit-triaged)

Attachments

(2 files)

When running the libwebrtc update scripts on the Mozilla git repo, we generated a set of patches were pushing to try fails. I've been able to distill the patches down to 2 patches where we're adding and then modifying a patch file under third_party/libwebrtc/moz-patch-stack. The patch files that directory are generated by using the git format-patch command. It seems to be related to non-ASCII characters in the patch file.

For historical purposes, the try command I'm using to test this is ./mach try fuzzy --full -q '^source-test-mozlint-py-ruff', but the issue happens with other query strings.

The email I get from Lando states:

Your request to land try push with tip commit 'WIP: Vendor libwebrtc from 6cccb107b8' failed.

Reason:
Problem while applying patch in revision None:

hg error in cmd: hg import --no-commit -s 95 /tmp/tmpkiz3eoxx: applying /tmp/tmpkiz3eoxx

patching file third_party/libwebrtc/moz-patch-stack/p0003.patch
Hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file third_party/libwebrtc/moz-patch-stack/p0003.patch.rej
abort: patch failed to apply

Upstream commit: https://webrtc.googlesource.com/src/+/71fe86ca5d0644be2937513e3ffb6e0d362005eb
Roll chromium_revision 45ae1e7e50..70da7e7a8c (1512204:1512365)

Change log: https://chromium.googlesource.com/chromium/src/+log/45ae1e7e50..70da7e7a8c
Full diff: https://chromium.googlesource.com/chromium/src/+/45ae1e7e50..70da7e7a8c

Changed dependencies
* siso_version: git_revision:8863265a67843154872be2be1fc0c37339691405..git_revision:39f570f121d63078bca79de500f4f2a50cb37456
* src/ios: https://chromium.googlesource.com/chromium/src/ios/+log/ec0b81bb33..d96d57dcbe
* src/testing: https://chromium.googlesource.com/chromium/src/testing/+log/2936e399f8..b8aba99a05
* src/third_party: https://chromium.googlesource.com/chromium/src/third_party/+log/dbc1cf4080..eaf36bea6a
* src/third_party/grpc/src: https://chromium.googlesource.com/external/github.com/grpc/grpc.git/+log/aa663bc83e..b4cecfdea1
* src/third_party/perfetto: https://chromium.googlesource.com/external/github.com/google/perfetto.git/+log/93825934c1..ff1d1a816b
* src/third_party/siso/cipd: git_revision:8863265a67843154872be2be1fc0c37339691405..git_revision:39f570f121d63078bca79de500f4f2a50cb37456
* src/tools: https://chromium.googlesource.com/chromium/src/tools/+log/f9e73ef42a..d8e4e06811
DEPS diff: https://chromium.googlesource.com/chromium/src/+/45ae1e7e50..70da7e7a8c/DEPS

BUG=None

Change-Id: I8bec7b85c4af1094e749ebe91a4fb5c0da57010a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408760
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Bot-Commit: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#45592}

Essentially a no-op since we're going to see this change
reverted when we vendor in ef084b6cc6.

Upstream commit: https://webrtc.googlesource.com/src/+/6cccb107b808c6b55666a70cfd24c315e8255546
Avoid seeding Random with current time in packet_sequencer

Random default constructor now provides a non-deterministic random seed.

This CL was uploaded by an experimental version of git cl split
(https://crbug.com/389069356).

R=sprang@webrtc.org

Bug: webrtc:42223992, webrtc:441137274
Change-Id: I73041a621fe768fe60cb1a7db78f917f17571ff0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/408742
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45593}

Some testing:

Patches don't seem to be in a weird encoding (though noticeable UTF-8)

$ file *
D276752.1766019713.diff: unified diff output text, 1st line "diff --git a/third_party/libwebrtc/moz-patch-stack/p0003.patch b/third_party/libwebrtc/moz-patch-stack/p0003.patch", 2nd line "new file mode 100644", 3rd line "--- /dev/null", Unicode text, UTF-8 text
D276753.1766019692.diff: unified diff output text, 1st line "diff --git a/third_party/libwebrtc/moz-patch-stack/p0003.patch b/third_party/libwebrtc/moz-patch-stack/p0003.patch", 2nd line "--- a/third_party/libwebrtc/moz-patch-stack/p0003.patch", 3rd line "+++ b/third_party/libwebrtc/moz-patch-stack/p0003.patch", Unicode text, UTF-8 text

Importing the patches locally works without isuse

$ hg init
$ hg import D276752.1766019713.diff
$ hg import D276753.1766019692.diff

The first patch seems to introduce a unicode character, and the second one removes it

$ file third_party/libwebrtc/moz-patch-stack/p0003.patch
third_party/libwebrtc/moz-patch-stack/p0003.patch: unified diff output text, 1st line "From: Michael Froman <mfroman@mozilla.com>", 2nd line "Date: Tue, 16 Dec 2025 14:04:35 -0600", 3rd line "Subject: (tmp-cherry-pick) Revert "Use absl::BitGen to generate Random's seed"", ASCII text
$ hg up 0                                                                                                                                                                                                
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ file third_party/libwebrtc/moz-patch-stack/p0003.patch
third_party/libwebrtc/moz-patch-stack/p0003.patch: unified diff output text, 1st line "From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= <hbos@webrtc.org>", 2nd line "Date: Wed, 10 Sep 2025 12:47:04 +0200", 3rd line "Subject: (cherry-pick-branch-heads/7390) [M141] Do not hide inbound-rtp if", Unicode text, UTF-8 text

This looks like an encoding issue. We have fixed (some/most) in the new lando but try is still run by the old lando.

The fastest potential solution would be to see if you can use --push-to-vcs in the meantime. This will require git-cinnabar if you're using a git repo.

In the long run, we should benefit from the migration of Try to new lando.

Depends on: try-new-lando
Severity: -- → S3
Keywords: conduit-triaged

Hey :mjf,

I have landed and deploy try support in new lando (bug 1979247). If you still have this branch around (or are able to recreate it easily), would you mind testing this out?

You'll need to cherry-pick this commit https://github.com/mozilla-firefox/firefox/commit/f6c5447e80bbd91c3b05a4db803318c1d1fae916

Then export LANDO_TRY_CONFIG=lando-prod-new before running ./mach try ....

No problem if that's not something you can do, but it would be useful to confirm the encoding issues are indeed gone with the new deployment.

Flags: needinfo?(mfroman)

Oh, actually, I was able to moz-phab patch from the revisions here.

Good news is: it could apply to Try via new lando correctly https://lando.moz.tools/landings/29611/ https://treeherder.mozilla.org/jobs?revision=939edb681c20c7e246e6a62a247c8e17572b0bc6&repo=try (just an empty).

I'm gonna close this bug as fixed.

Thanks for the report and repo revisions :mjf!

Status: NEW → RESOLVED
Closed: 6 months ago
Flags: needinfo?(mfroman)
Resolution: --- → FIXED
Depends on: 1979247
No longer depends on: try-new-lando
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: