You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run make up in dev mode, and previously had a compressed production asset from a previous commit, the bundled asset will take precedence in nginx file serving and you can have a broken FE.
create a file test.txt in ./static add "foo" to the file
run make up DOCKER_TARGET=production
Expect that the file is copied to ./site-static
Change the contents of the file "banana"
Run make down && make up DOCKER_TARGET=development
request the file from http://olympia.test/static/test.txt
BUG: the file will have "foo"
What did you expect to happen?
The file should return "bar" in dev mode because we should not be serving/prioritizing production assets in dev as in dev we are not managing those files. They will not be updated or removed because this takes time and slows down make up.
So in order to prevent errors, we need to ensure that in dev mode nginx does not try to serve production assets.
What happened?
Here be dragons.. jk but this is tricky.
If you run
make up
in dev mode, and previously had a compressed production asset from a previous commit, the bundled asset will take precedence in nginx file serving and you can have a broken FE.test.txt
in./static
add "foo" to the filemake up DOCKER_TARGET=production
./site-static
make down && make up DOCKER_TARGET=development
http://olympia.test/static/test.txt
What did you expect to happen?
The file should return "bar" in dev mode because we should not be serving/prioritizing production assets in dev as in dev we are not managing those files. They will not be updated or removed because this takes time and slows down make up.
So in order to prevent errors, we need to ensure that in dev mode nginx does not try to serve production assets.
Is there an existing issue for this?
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: