potiuk commented on code in PR #56456:
URL: https://github.com/apache/airflow/pull/56456#discussion_r2645389051


##########
providers/edge3/hatch_build.py:
##########
@@ -0,0 +1,118 @@
+# Licensed to the Apache Software Foundation (ASF) under one

Review Comment:
   The `hatch_build.py` should IMHO be generated from another template - same 
as pyproject.toml README etc. It - of course - will add some coupling between 
providers that will use hatch, but it has also some benefits - we could easily 
diverge and have different variants in different providers - which I think is 
not too future-proof - the more providers we have, the more we should care that 
their build system do not drift apart too much. It is of course more difficult 
to modify it in the way that will be generic, but I have deep feeling that 
having common conventions and code to keep them is important to be able to 
manage hundreds of providers. 
   
   The "edge" specific parts in this hatch_build could be rather easily 
generalised I think. We only need (for now) hatch backend to do asset 
compilation, and this part can be easily generalized.
   
   Also we might give up that "common" part for now, but when we add `fab` we 
could actually attempt to make an `apache-airflow-hatch-plugin` and publish it 
in PyPI.
   
   The only reason why we are using `hatch_build.py` is that it is the way how 
to "embed" hatch plugin in your application code, but generally speaking, hatch 
is designed to install those plugins as build dependencies and then they are 
even more flexible - you can configure them via pyproject.tom entries for 
example.
   
   Hatch uses (same as we do) pluggy - to discover such plugins 
https://hatch.pypa.io/1.9/plugins/about/. We could even have such 
"apache-airflow-hatch-plugin` added as part of our monorepo, and then we will 
even be able to modify it and test locally without having to relase it.
   
   So maybe good idea is to leave it now and as a next step extract such plugin 
and use it in both - providers and airflow as build dependency and publish it 
in PyPI ? 



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