-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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
host/_javascript?modules=ModuleA&...- size: 676767
- analysis key: fb0995befcb079aa3d9e9e000fc54bc0
host/_javascript?modules=ModuleB&...&exclude=fb0995befcb079aa3d9e9e000fc54bc0- size: 12039
- analysis key: e6c99d5c231848e11a40cfb98563c057
login to web app
host/_javascript?modules=ModuleA&...(cache)host/_javascript?modules=ModuleB&...&exclude=fb0995befcb079aa3d9e9e000fc54bc0(cache)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.
host/_javascript?modules=ModuleA&...- size: _678045_
- analysis key: fb0995befcb079aa3d9e9e000fc54bc0
host/_javascript?modules=ModuleB&...&exclude=fb0995befcb079aa3d9e9e000fc54bc0(cache)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.