cypress
cypress copied to clipboard
fix(proxy/prerequests): fix duplicate key behavior, fallthrough
- Closes
User facing changelog
- Fixed an issue introduced in 10.3.0 where network logs could be missing certain information or cause certain requests to be delayed by 500ms.
Additional details
- Performance fixes in https://github.com/cypress-io/cypress/pull/22462 caused a couple of unintended changes:
- Missing return statement on line 77 here causes a matched prerequest to be queued anyways: https://github.com/cypress-io/cypress/blob/8fb785a4664acf74ab9eacc243c09763e2730bf7/packages/proxy/lib/http/util/prerequests.ts#L69-L83
- More impactful, the
Record<string, ...>
data structure would clobber any duplicateurl+method
requests/pre-requests, which could manifest itself in incorrect pre-request data or unintended delays of requests by 500ms.- Replaced this with a
StackMap
which supports duplicate keys and.pop
by key.
- Replaced this with a
Steps to test
How has the user experience changed?
PR Tasks
- [x] Have tests been added/updated?
- [x] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
- [na] Has a PR for user-facing changes been opened in
cypress-documentation
? - [na] Have API changes been updated in the
type definitions
?
Thanks for taking the time to open a PR!
- Create a Draft Pull Request if your PR is not ready for review. Mark the PR as Ready for Review when you're ready for a Cypress team member to review the PR.
- Become familiar with the Code Review Checklist for guidelines on coding standards and what needs to be done before a PR can be merged.
Test summary
Run details
Project | cypress |
Status | Passed |
Commit | ba215e04d8 |
Started | Aug 10, 2022 3:52 PM |
Ended | Aug 10, 2022 4:13 PM |
Duration | 21:07 💡 |
OS | Linux Debian - 11.3 |
Browser | Multiple |
View run in Cypress Dashboard ➡️
Flakiness
cypress/proxy-logging.cy.ts | 2 | ||
---|---|---|---|
1 | Proxy Logging > request logging > xhr log has response body/status code when xhr response is logged second | ||
2 | Proxy Logging > request logging > xhr log has response body/status code when xhr response is logged second | ||
e2e/origin/commands/assertions.cy.ts | 1 | ||
1 | cy.origin assertions > #consoleProps > .should() and .and() | ||
next.cy.ts | 1 | ||
1 | Working with next-12.1.6 > should detect new spec |
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard
Released in 10.5.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.5.0, please open a new issue.