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

   Hey @uranusjr (and others) - I think I found a very good way to add the 
warning. In short:
   
   1) I update the README.md of `apache-airlfow-breeze` with pre-commit to 
contain hash of setup.py + setup.cfg
   2) This README.md is used during installation so README.md with the hash is 
part of the installed package
   3) When I start Breeze, I verify the hash of setup.py/cfg from sources with 
the one stored in the readme of installed package (and print warning to upgrade 
if they are different)
   
   This is - I think - the best way of handling it. It has mutliple advantages:
   
   * pre-commit  updates the hash when there is a change in setup files - so 
whenever you install Breeze with `pipx install -e ./dev/breeze' you should get 
the "setup hash consistent with the instalallation time" in the package
   
   * Breeeze2 is always installed in --editable mode (we fail Breeze if it is 
not) and this means that we always can recalculate hashes of current 
setup.py/cfg and warn if they are different
   
   * there are no changes to setup scripts. in fact, even when we convert to 
pyproject.toml, the only change will be to check the hash of pyproject.toml. 
The nice thing is that there is no dynamic code execution at setup time - 
everything is static
   
   I cannot see disadvantages :) . The users gets nice feedback and 
instructions and slightly annoying delay when they should reinstall Breeze 
which I think is the best approach.
   
   Looking forward to merging that one - this is the one-but-last to switch to 
the new Breeze2 :)


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