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: Prepare for Chrome's update for immutable document.domain #20405

Merged
merged 6 commits into from
Mar 4, 2022

Conversation

tbiethman
Copy link
Contributor

@tbiethman tbiethman commented Feb 28, 2022

User facing changelog

  • Disabling Origin-Agent-Cluster header for proxied responses to ensure document.domain can continue to be set with Chrome v106 and up

Additional details

Chrome is planning to make document.domain immutable by default in a future release, currently targeted at v106. The will do so by interpreting the default value of the Origin-Agent-Cluster response header as true rather than false as it is today.

This PR sets the Origin-Agent-Cluster header explicitly to false on the top-level runner response, as well as the iframe response and proxied request responses that have a domain setter injected into them. This will allow tests that utilize subdomains to continue to execute appropriately.

Validation is a little tricky given that we're ahead of the game and no existing tests currently fail without this change. Unit tests/comments were added for the appropriate functions to ensure that these additions aren't inadvertently removed prior to the deprecation taking place. You can validate the current changes as well by starting the runner with Chromium 101 and verifying that no deprecation warnings are logged to the console during an e2e test run.

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • 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?
  • [n/a] Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 28, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Feb 28, 2022



Test summary

19278 0 218 0Flakiness 1


Run details

Project cypress
Status Passed
Commit 8341072
Started Mar 4, 2022 3:15 PM
Ended Mar 4, 2022 3:27 PM
Duration 11:44 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/settings_spec.js Flakiness
1 Settings > file preference panel > loads preferred editor, available editors and shows spinner

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

@tbiethman tbiethman marked this pull request as ready for review March 1, 2022 20:15
@tbiethman tbiethman requested a review from a team as a code owner March 1, 2022 20:15
@tbiethman tbiethman removed the request for review from a team March 1, 2022 20:44
Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

@tbiethman Looks good, but I think that this change is user-facing and should be categorized as a fix:, we are now sending a new header that fixes an issue (even tho it's with an unreleased browser version)

@tbiethman tbiethman changed the title chore: Prepare for Chrome's update for immutable document.domain fix: Prepare for Chrome's update for immutable document.domain Mar 2, 2022
Copy link
Contributor

@davidmunechika davidmunechika left a comment

Choose a reason for hiding this comment

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

looks good!

@ryanthemanuel ryanthemanuel merged commit 5a30e76 into develop Mar 4, 2022
@ryanthemanuel ryanthemanuel deleted the set-domain-deprecation branch March 4, 2022 16:46
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 14, 2022

Released in 9.5.2.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 14, 2022
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.

Handle future Chrome version making document.domain immutable
4 participants