Skip to content

E2E test cache busting on playground.wordpress.net #855

Closed
@adamziel

Description

@adamziel

Occasionally, people report errors caused by loading outdated versions of Playground assets on playground.wordpress.net. For example, this report:

I ran into an error when I select “Browser” in the storage option:
Fatal error: Uncaught Error: Call to undefined function wp_check_php_mysql_versions() in /wordpress/wp-settings.php:2
One way this could have happened, is if the browser loaded mismatched versions of the WordPress wp.data file and the wp.js file. The wp.js contains a map of where each file starts and ends in wp.data and, given a wrong wp.data input, it would produce the correct directory structure, but each file would have the wrong contents.

Let's solve that.

Done is

  1. We start by building a failing E2E test for the following asset types. It should setup the browser and the playground to load a page, then update the asset files, then load the page again in a way that still uses the cached version of some of the assets.
    • php.js and php.wasm
    • wp.js and wp.data
    • service worker
    • web worker
  2. We write a patch that makes the test pass
  3. We keep the test to prevent regressions

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Aspect] Browser[Type] BugAn existing feature does not function as intended[Type] ReliabilityPlayground uptime, reliability, not crashing

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions