Fix assets compile on raspberry pi 32bit
When enabling asset compile, the raspbian 32bit builds are failing.
This is because the upstream memory heap size has been hardset to 5GB, which is larger than the addressable memory for a 32bit OS.
gitlab!131578 (merged) will fix this upstream so that we an override the memory heap size for the PI in omnibus, but merging the change would break non 32bit OS omnibus and CNG builds because:
They have a NODE_OPTIONS environment set smaller than 5GB that is currently being ignored.
So we need a few staggered updates to get this fixed without further breaking things.
- Update max size setting in omnibus to 5GB
- Drop max size setting from CNG, rely on the upstream setting
- Merge gitlab!131578 (merged)
- Introduce a LONG_BIT check in omnibus (getconf LONG_BIT) to and set the size to 3.5GB when LONG_BIT=32 (the existing armhf check doesn't work because we are using a 32bit OS on a 64bit kernel when in docker on a arm64 host)
- We can probably set in omnibus just for 32bit OS, and let fall through to the upstream
A few followup related areas I saw while looking into this:
- We shouldn't need to call
rake gettext:compile
separately fromrake gitlab:assets:compile
, because it's already a part of it. - Once we are down to
rake gitlab:assets:compile
being the only nodejs command, we can also move the yarn install into thecompile_assets
condition so we only yarn install if we are going to compile assets.