Bug 1559117 Disable web-socket support in mitm-proxy until we can add support for replaying these packages r=tarek
authorFlorin Strugariu <fstrugariu@mozilla.com>
Sun, 16 Jun 2019 09:15:20 +0000
changeset 479102 284652a195a7a706a64c59be19a02a617a454fd1
parent 479101 aa5fe350630acc60fb40ce0d617851bf61c9633d
child 479103 24771a8702c2a47e89a57ed813a77dafc7b9ac32
push id36168
push usercsabou@mozilla.com
push dateTue, 18 Jun 2019 15:56:50 +0000
treeherdermozilla-central@2af46ed2e59b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstarek
bugs1559117
milestone69.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 1559117 Disable web-socket support in mitm-proxy until we can add support for replaying these packages r=tarek Differential Revision: https://phabricator.services.mozilla.com/D35003
testing/raptor/raptor/playback/alternate-server-replay-4.0.4.py
testing/raptor/raptor/raptor.py
--- a/testing/raptor/raptor/playback/alternate-server-replay-4.0.4.py
+++ b/testing/raptor/raptor/playback/alternate-server-replay-4.0.4.py
@@ -94,17 +94,22 @@ class AlternateServerPlayback:
         )
 
     def load_flows(self, flows):
         """
             Replay server responses from flows.
         """
         self.flowmap = {}
         for i in flows:
-            if i.response:
+            if i.type == 'websocket':
+                ctx.log.info(
+                    "Request is a WebSocketFlow. Removing from request list as WebSockets"
+                    " are dissabled "
+                )
+            elif i.response:
                 l = self.flowmap.setdefault(self._hash(i), [])
                 l.append(i)
             else:
                 ctx.log.info(
                     "Request %s has no response. Removing from request list"
                     % i.request.url
                 )
         ctx.master.addons.trigger("update", [])
--- a/testing/raptor/raptor/raptor.py
+++ b/testing/raptor/raptor/raptor.py
@@ -345,21 +345,23 @@ class Raptor(object):
             ]
 
             if not self.config["playback_upstream_cert"]:
                 LOG.info("No upstream certificate sniffing")
                 args.insert(0, "--no-upstream-cert")
             self.playback.config["playback_tool_args"] = args
         elif version == "4.0.4":
             args = [
+                "-v",
+                "--set",
+                "websocket=false",
+                "--set",
+                "server_replay_files={}".format(" ".join(recording_paths)),
                 "--scripts",
                 script,
-                "-v",
-                "--set",
-                "server_replay_files={}".format(" ".join(recording_paths)),
             ]
             if not self.config["playback_upstream_cert"]:
                 LOG.info("No upstream certificate sniffing")
                 args = ["--set", "upstream_cert=false"] + args
             self.playback.config["playback_tool_args"] = args
         else:
             raise Exception("Mitmproxy version is unknown!")