You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2025/02/28 14:44:39 UTC

(airflow) branch main updated: Avoid old www geenrated assets and node_modules to be part of context (#47214)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new dce416dc9a5 Avoid old www geenrated assets and node_modules to be part of context (#47214)
dce416dc9a5 is described below

commit dce416dc9a5b0c370b646f770c1376441d3de0ed
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Fri Feb 28 15:44:32 2025 +0100

    Avoid old www geenrated assets and node_modules to be part of context (#47214)
    
    We need to keep old deleted generated files in .dockerignore even
    if we do not have them now.
    
    When Docker builds an image it transfer everything not excluded in
    .gitignore to Docker builder before it attempts to build an image.
    
    If you had locally built assets and node_modules and assets from www,
    they were excluded in .gitignore, but it also means they were not
    deleted when www folder was cleaned - and you might stil have them.
    
    Since they were removed from .dockerignore and included now, they
    might cause 1.5 GB extra transfer of context before image is built.
    
    That also helps in the situation when you switch to airflow 2
    branch and build assets. When you switch back to main, those assets
    and node_modules in www will still be there.
---
 .dockerignore | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.dockerignore b/.dockerignore
index ab7451f2be8..dd90a925818 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -84,7 +84,12 @@ airflow/ui/node_modules
 airflow/auth/managers/simple/ui/node_modules
 
 # Exclude link to docs
+airflow/ui/static/docs
+
+# Legacy www exclusions (just to exclude things in case you switch to old branches and generate assets)
 airflow/www/static/docs
+airflow/www/static/dist
+airflow/www/node_modules
 
 # Exclude python generated files
 **/__pycache__/