Closed Bug 1740101 Opened 2 years ago Closed 2 years ago

[mozproxy] add server playback script for mitm7

Categories

(Testing :: Performance, task, P1)

Default
task

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: kimberlythegeek, Assigned: kimberlythegeek)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Mitmproxy 7 introduced updates that breaks the functionality of our server playback script used in mitm 4, 5, and 6: https://searchfox.org/mozilla-central/source/testing/mozbase/mozproxy/mozproxy/backends/mitm/scripts/alternate-server-replay.py

I copied the server playback file from mitm 7 (https://github.com/mitmproxy/mitmproxy/blob/main/mitmproxy/addons/serverplayback.py) and made some small modifications to fit our purposes

Attachment #9249844 - Attachment description: WIP: Bug 1740101: [mozproxy] add server playback script for mitm7 → Bug 1740101: [mozproxy] add server playback script for mitm7
Pushed by ksereduck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ca369725c4ca
[mozproxy] add server playback script for mitm7 r=sparky
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

Specifically, the changes that were made were

  1. added an option to reverse the flow order when playing back a recording, so that the most recent request+response is used. this is so that, when testing pages requiring log in, the logged in page is shown, rather than the first page, the log in screen
  2. set the alt_server_replay_nopop option, which enables us to replay the same request+response multiple times
  3. if alt_server_replay_kill_extra the request method returns a 404 when extra requests (those not in the recording) are made, instead of killing the flow, which sometimes caused tests to fail in the path
  4. removed the http_protocol_extractor script when recording. this was used to enable HTTP/1 to HTTP/2 functionality. this is now supported by mitmprox7 and no longer needed
You need to log in before you can comment on or make changes to this bug.