Project

General

Profile

Bug #43152

Updated by Nathan Cutler over 4 years ago

When running "make-dist" to build the dashboard frontend, there is a variable "MAX_DASHBOARD_PARALLEL_BUILDS" which defaults to "2". This means that, by default, two languages are built in parallel to speed up the build. 

 (Normally, of course, only the English dashboard frontend is built, so the default parallelism doesn't actually "kick in" - the race condition only happens, potentially, happens when (1) building more than one language, and (2) MAX_DASHBOARD_PARALLEL_BUILDS > 1) language.) 

 When the race condition is triggered, we see: 

 <pre> 
 [build:en-US -- -- --prod] > ceph-dashboard@0.0.0 env_build /tmp/tmp.GEfFNXVA8g/src/pybind/mgr/dashboard/frontend 
 [build:en-US -- -- --prod] > cp src/environments/environment.tpl.ts src/environments/environment.prod.ts && cp src/environments/environment.tpl.ts src/environments/environment.ts    && node ./environment.build.js 
 [build:en-US -- -- --prod] 
 [build:de-DE -- -- --prod] 
 [build:de-DE -- -- --prod] > ceph-dashboard@0.0.0 env_build /tmp/tmp.GEfFNXVA8g/src/pybind/mgr/dashboard/frontend 
 [build:de-DE -- -- --prod] > cp src/environments/environment.tpl.ts src/environments/environment.prod.ts && cp src/environments/environment.tpl.ts src/environments/environment.ts    && node ./environment.build.js 
 [build:de-DE -- -- --prod] 
 [build:de-DE -- -- --prod] cp: cannot create regular file 'src/environments/environment.prod.ts': File exists 
 [build:de-DE -- -- --prod] npm ERR! code ELIFECYCLE 
 [build:de-DE -- -- --prod] npm ERR! errno 1 
 </pre> 

 The workaround is to set MAX_DASHBOARD_PARALLEL_BUILDS="1" but it would be nice if the race condition itself were fixed.

Back