Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correlate prerequests in order instead of reverse order #27892

Merged
merged 16 commits into from
Sep 27, 2023

Conversation

ryanthemanuel
Copy link
Collaborator

Additional details

Historically, the proxy correlation logic used a stack for requests that matched exactly. This was because there were several cases where items were not going through the proxy. We have since learned of the reasons these items don't go through the proxy (e.g. failed requests, cached requests, etc.). Since we can now reasonably rely on everything going through the proxy that needs to, we want to actually store the requests in a queue so that requests get matched in the order they were received. This fixes an issue we have seen in Test Replay where requests were correlated in mismatched order.

How has the user experience changed?

n/a

PR Tasks

@cypress
Copy link

cypress bot commented Sep 25, 2023

4 flaky tests on run #51326 ↗︎

0 479 6 0 Flakiness 4

Details:

Update CHANGELOG.md
Project: cypress Commit: 6bb7125f12
Status: Passed Duration: 12:06 💡
Started: Sep 27, 2023 9:12 PM Ended: Sep 27, 2023 9:24 PM
Flakiness  runs.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
... > displays each run with correct information Test Replay Output Screenshots
Flakiness  specs_list_e2e.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
... > saves the filter when navigating to a spec and back Test Replay Output Screenshots
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Output Screenshots
Flakiness  debug.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App - Debug Page > shows information about a failed spec Test Replay Output Screenshots

Review all test suite changes for PR #27892 ↗︎

@@ -331,12 +331,14 @@ export class Http {

const onError = (error: Error): Promise<void> => {
ctx.error = error
if (ctx.req.browserPreRequest) {
if (ctx.req.browserPreRequest && !ctx.req.browserPreRequest.errorHandled) {
ctx.req.browserPreRequest.errorHandled = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a test for the errorHandled logic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryanthemanuel ryanthemanuel merged commit 8da1e5c into develop Sep 27, 2023
5 checks passed
@ryanthemanuel ryanthemanuel deleted the ryanm/fix/issue-with-out-of-order-requests branch September 27, 2023 21:37
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 11, 2023

Released in 13.3.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.3.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Oct 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants