-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore(server): enable caching global session state #23600
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has me thinking... I wonder if we need to do anything with the server side cookie jar when it comes to preserving/restoring sessions... 🤔
const reporterEvents: ReporterEvent[] = [ | ||
] as const | ||
|
||
const reporterEvents = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we want to leverage freeze here instead to persist to JS files, or is that too aggressive? As I am typing this I think the cast to const
is probably enough 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a types expert 😬 We've done this in other places so I took it as a opportunity to remove some redundancies. I'll take all suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the main difference here is that one would prevent types being pushed in at runtime vs just a TS check. Honestly don't think it matters too much either way
Looks good, though it seems there a some CI failures that need addressing. Since the front-end of the this isn't implemented here, is there a way I can test this out? |
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
…/cypress into cache-sessions-server
# Conflicts: # packages/app/src/runner/event-manager.ts # packages/runner/src/studio/studio-recorder.js # packages/types/src/driver.ts
@@ -1162,26 +1164,26 @@ export default (Commands, Cypress, cy, state, config) => { | |||
// tell our backend we're changing origins | |||
// TODO: add in other things we want to preserve | |||
// state for like scrollTop | |||
let s: Record<string, any> = { | |||
let runState: RunState = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏🏻
const reporterEvents: ReporterEvent[] = [ | ||
] as const | ||
|
||
const reporterEvents = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the main difference here is that one would prevent types being pushed in at runtime vs just a TS check. Honestly don't think it matters too much either way
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Update server backend to allow persisting global sessions across specs. This break out the back-end work related to introducing this
cy.session()
behavior.User facing changelog
N/A this work is on the back-end and wont impact users at this point in time.
Have tests been added/updated?
[n/a] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
[n/a] Has a PR for user-facing changes been opened in
cypress-documentation
?[n/a] Have API changes been updated in the
type definitions
?