potiuk edited a comment on pull request #16577:
URL: https://github.com/apache/airflow/pull/16577#issuecomment-865979733


   The error we had when running the compile assets was from the sources of 
airlflow. When we build the image from sources, we also run the `compile` 
script after running `pip install .`. This is only when you install airflow 
from sources (which happens in CI image and in Prod image when you build 
locally in breeze).
   
   In CI, the images are build from packages generated using PR sources 
(because we want to run K8S tests using airflow production image build from PR 
sources AND we want to install prod image using packages similarly when we 
release the image). 
   
   So in CI those things happen:
   1) first I build airflow package (using sources from the incoming PR) - here 
assets are compiled during preparing the package
   2) then I build all provider packages (again using sources from the incoming 
PR)
   3) then PROD image is built using those locally built packages rather than 
PyPI ones (they are copied to docker-context-files and installed from there).
   
   The problem was that during step 3, there was an extra step run to compile 
the assets again (that was a mistake - fixed in this PR). This was done using 
compile_assets scripts from docker folder: 
`https://github.com/apache/airflow/blob/main/scripts/docker/compile_www_assets.sh`
 . The "scripts/docker" folder contains all the scripts that are used by the 
Dockerfile build. It is not part of the package, and should not be added. So 
possibly this folder is added there by mistake :D. I don't think any of the 
scripts are needed in sdist package. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to