potiuk commented on PR #37322:
URL: https://github.com/apache/airflow/pull/37322#issuecomment-1937396102

   > If so, can we try to actually pass `--upgrade-to-newer-dependencies` 
argument to the breeze directly in the pre-commit? If there are package 
upgrades, they will upgrade.
   
   No - we do not want to do it automatically, because running it takes a long 
time and it takes a lot of time and networking, so you should not really run it 
automatically when provider.yaml changes, because the fact that it changes, 
does not mean that you HAVE TO do it. In many situations, running pre-commits 
will be fine even if you don't run it, and it's fine, because when you have 
slow network, develop while in a plane etc, you don't want to pull 700 MB of 
data. 
   
   The whole image rebuilding is designed around it - it should be "eventually 
consistent" - you are gently guided to rebuild the image,  but you should not 
be forced to run the rebuild, but not forced, because you might not want to do 
it **just now**. 
   
   And adding new providers/modifying dependencies is generallly very rare 
event that we should not optimize for. What you experience might seam common,  
but there is a very low percentage of PRs that add or modify dependencies or 
change provider.yaml file (and even less that result in absolute need or 
rebuilding the image). 
   
   This is explained in  detail in the two ADRs (Architecture Decision 
Records): 
[ADR4](https://github.com/apache/airflow/blob/main/dev/breeze/doc/adr/0004-using-docker-images-as-test-environment.md)
 where it is explained why we chose docker container as "common" environment 
and 
[ADR12](https://github.com/apache/airflow/blob/main/dev/breeze/doc/adr/0012-asking-user-for-confirmation.md)
 - where the mechanism of eventual consistency and asking the user for 
confirmation is explained.
   
    
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to