Skip to content

Stale analysis keys lead to infinite reload loop #3

@jhpedemonte

Description

@jhpedemonte

After upgrading server, Zazl kept returning the same analysis keys for code which had changed, resulting in the browser using cached pages and sending invalid "exclude" key to Zazl. Zazl then returned "location.reload(true)", repeating the process and leading to infinite reload loop.

Here's a breakdown of the requests:


old app

  1. host/_javascript?modules=ModuleA&...
    • size: 676767
    • analysis key: fb0995befcb079aa3d9e9e000fc54bc0
  2. host/_javascript?modules=ModuleB&...&exclude=fb0995befcb079aa3d9e9e000fc54bc0
    • size: 12039
    • analysis key: e6c99d5c231848e11a40cfb98563c057

login to web app

  1. host/_javascript?modules=ModuleA&... (cache)
  2. host/_javascript?modules=ModuleB&...&exclude=fb0995befcb079aa3d9e9e000fc54bc0 (cache)
  3. host/_javascript?modules=ModuleC&...&exclude=fb0995befcb079aa3d9e9e000fc54bc0,e6c99d5c231848e11a40cfb98563c057
    • size: 553734
    • analysis key: 30958c95b80d4286189baade86e4954

updated app

Running new web app on browser with cached files. Since server was restarted, Zazl has an empty server-side cache.

  1. host/_javascript?modules=ModuleA&...
    • size: _678045_
    • analysis key: fb0995befcb079aa3d9e9e000fc54bc0
  2. host/_javascript?modules=ModuleB&...&exclude=fb0995befcb079aa3d9e9e000fc54bc0 (cache)
  3. host/_javascript?modules=ModuleC&...&exclude=fb0995befcb079aa3d9e9e000fc54bc0,e6c99d5c231848e11a40cfb98563c057
    • _content: "location.reload(true);"_

With the updated app, the first module returned a different artifact (due to changes in the code) but with the same analysis key. The URL for the 2nd module, then, contained the same exclude string and matched the previously cached URL, so the cached content was returned.

Then, when loading the 3rd module, Zazl failed because the key e6c99d5c231848e11a40cfb98563c057 was not known to it. The failure fallback in this case is for Zazl to try to force the browser to reload the page. However, this just results in the exact same sequence of events, leading to an infinite loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions