canonical / test_observer

Flutter based dashboard for visualising SRU regression test results
3 stars 3 forks source link

Improve frontend caching situation #216

Closed omar-selo closed 2 months ago

omar-selo commented 2 months ago

Description

Cache bust JavaScript files so that users don't need to hard refresh their browser when we push updates.

Additionally, adds build directory to .dockerignore. Turns out if you run flutter build web before running docker build on front-end then the image produced is bugged. Namely, the index.html file inside it is not the one produced by flutter, but the default index.html of nginx. Digging deeper into why this is. I found that our docker image copies the contents of the frontend directory into the image which includes index.html if flutter build web was already run. Then when flutter build runs it removes index.html for some reason. So we end up with no index.html whatsoever. So when we copy the web build directory into nginx's directory, it doesn't overwrite nginx's index.html. This is a very annoying issue to debug locally. So adding build to .dockerignore will solve it in the future.

Resolved issues

https://warthogs.atlassian.net/browse/RTW-359

Documentation

Web service API changes

Tests

Ran it locally and everything seemed fine.