application-*.css changes content when regenerated with assets:precompile
Summary
application-*.css changes content when regenerated with assets:precompile
Steps to reproduce
We are experiencing 404 file not found error in an HA deployment when 2 or more servers are running. It turns out that the application-[hash].css
file is not the same on every server. In fact, it changes when regenerating the assets. I attached a diff with the changes between asset compilation. It seems that keyframes and animation names are randomized. Therefore, the resulting hash is different causing 404 error.
Expected behavior
Each server generates the same files when compiling assets
Actual behavior
The application-*.css file has a different filename on each server caused by the different content.
Relevant logs and/or screenshots
Diff of application-*.css files across servers
Possible fixes
revert https://gitlab.com/gitlab-org/gitlab-ce/commit/12784559316fc2c3860641bee9c6f8e2bc12c4ba or don't use unique-id in sass
This might also be related to https://gitlab.com/gitlab-org/gitlab-ce/issues/22528