Bug 1702030 - Add mitm 6.0.2 to mozproxy r=perftest-reviewers,davehunt
authorFlorin Strugariu <fstrugariu@mozilla.com>
Wed, 31 Mar 2021 08:59:09 +0000
changeset 573850 2428c0ac807db1b075e51d8c3ee55165c250a963
parent 573849 ab57f439bce388a517c986f44057f08e5c2e794f
child 573851 dd781a9ee853ba378230c27a5d5b981628431842
push id38336
push userapavel@mozilla.com
push dateWed, 31 Mar 2021 16:42:15 +0000
treeherdermozilla-central@88275f615ea5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersperftest-reviewers, davehunt
bugs1702030
milestone89.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1702030 - Add mitm 6.0.2 to mozproxy r=perftest-reviewers,davehunt Differential Revision: https://phabricator.services.mozilla.com/D110299
testing/mozbase/mozproxy/mozproxy/backends/mitm/manifests/mitmproxy-rel-bin-6.0.2-linux64.manifest
testing/mozbase/mozproxy/mozproxy/backends/mitm/manifests/mitmproxy-rel-bin-6.0.2-osx.manifest
testing/mozbase/mozproxy/mozproxy/backends/mitm/manifests/mitmproxy-rel-bin-6.0.2-win.manifest
testing/mozbase/mozproxy/mozproxy/backends/mitm/mitm.py
testing/mozbase/mozproxy/mozproxy/backends/mitm/scripts/alternate-server-replay.py
new file mode 100644
--- /dev/null
+++ b/testing/mozbase/mozproxy/mozproxy/backends/mitm/manifests/mitmproxy-rel-bin-6.0.2-linux64.manifest
@@ -0,0 +1,10 @@
+[
+    {
+    "filename": "mitmproxy-6.0.2-linux.tar.gz",
+    "size": 73691215,
+    "algorithm": "sha512",
+    "digest": "e7cbcdee1eda9f7c9ea9b6c811930a7b21403f52b24a1f14030a69a4ee62dd6bf9fa5a0a9f8acc44830803da27b856f0900a09fd560b32384ab2c0e78a1d08ad",
+    "visibility": "public",
+    "unpack": true
+    }
+]
new file mode 100644
--- /dev/null
+++ b/testing/mozbase/mozproxy/mozproxy/backends/mitm/manifests/mitmproxy-rel-bin-6.0.2-osx.manifest
@@ -0,0 +1,10 @@
+[
+  {
+    "filename": "mitmproxy-6.0.2-osx.tar.gz",
+    "size": 40867811,
+    "algorithm": "sha512",
+    "digest": "f162e89073eb73f7cfe458d54157e31e9e6bb7ae42c262e4070d23949888630015c896de8870958e83ad9360fce6758f01813ce581cb1a3c1a8b436109d2f28d",
+    "visibility": "public",
+    "unpack": true
+  }
+]
new file mode 100644
--- /dev/null
+++ b/testing/mozbase/mozproxy/mozproxy/backends/mitm/manifests/mitmproxy-rel-bin-6.0.2-win.manifest
@@ -0,0 +1,10 @@
+[
+  {
+    "filename": "mitmproxy-6.0.2-windows.zip",
+    "size": 36482912,
+    "algorithm": "sha512",
+    "digest": "242701b5090fe71526ac887843ca08a674a5b1261c21f9f8cb86d143b16b4bc50fca80b016b140a4c0fd2c6ec5819aee1e145a57b000a293fe290ba1b21bac9f",
+    "visibility": "public",
+    "unpack": true
+  }
+]
--- a/testing/mozbase/mozproxy/mozproxy/backends/mitm/mitm.py
+++ b/testing/mozbase/mozproxy/mozproxy/backends/mitm/mitm.py
@@ -305,17 +305,17 @@ class Mitmproxy(Playback):
             # playback mode
             if len(self.playback_files) > 0:
                 script = os.path.join(
                     mitm_folder,
                     "scripts",
                     "alternate-server-replay.py",
                 )
 
-                if self.config["playback_version"] in ["4.0.4", "5.1.1"]:
+                if self.config["playback_version"] in ["4.0.4", "5.1.1", "6.0.2"]:
                     args = [
                         "-v",  # Verbose mode
                         "--set",
                         "upstream_cert=false",
                         "--set",
                         "upload_dir=" + normalize_path(self.upload_dir),
                         "--set",
                         "websocket=false",
--- a/testing/mozbase/mozproxy/mozproxy/backends/mitm/scripts/alternate-server-replay.py
+++ b/testing/mozbase/mozproxy/mozproxy/backends/mitm/scripts/alternate-server-replay.py
@@ -121,17 +121,22 @@ class AlternateServerPlayback:
         """
         for i in flows:
             if i.type == "websocket":
                 # Mitmproxy can't replay WebSocket packages.
                 ctx.log.info(
                     "Recorded response is a WebSocketFlow. Removing from recording list as"
                     "  WebSockets are disabled"
                 )
-            elif i.response and self.mitm_version in ("4.0.2", "4.0.4", "5.1.1"):
+            elif i.response and self.mitm_version in (
+                "4.0.2",
+                "4.0.4",
+                "5.1.1",
+                "6.0.2",
+            ):
                 # see: https://github.com/mitmproxy/mitmproxy/issues/3856
                 f = self.flowmap.setdefault(
                     self._hash(i), {"flow": None, "reply_count": 0}
                 )
                 # overwrite with new flow if already hashed
                 f["flow"] = i
             else:
                 ctx.log.info(