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

   > Throwing the cat among the pigeons, if we are to have this compatibility 
layer indefinitely should we then maybe just stick with the initial 
implementation?
   
   I personally am in favour of continuously improving and standardizing things 
even if it means slight back-compatibility maintenance effort. 
   
   If it is really just few lines of back-compatibility that cost us none or 
little, I see no problem with keeping it if we have a chance to apply it accros 
all the future codebase and make it cleaner, more straightforward and easier to 
read. 
   
   We have a precendent, and datapoints that we can use so this is not an 
academic discussion.
   
   We already did that for Provider's Hook class discovery. At one point in 
time we started to support new way of discovering Hook classes (the main reason 
there was performance of discovery, we do not have to import and istantiate 
Hook classes to find out what connection types they support.
   
   What happened:
   
   * original code was implement 29 Nov 2020
   
   * new way of discovering Hook classes was implementd 19 Aug 2021 (7 months 
later) 
   
   * Original method here: 
https://github.com/apache/airflow/blob/main/airflow/providers_manager.py#L751
   * New method here: 
https://github.com/apache/airflow/blob/main/airflow/providers_manager.py#L705
   
   * we paid virtually no maintenance cost - it's virtually that one method and 
the only changes to it were bulk changes applied and errors suppression:   The 
only "real" change was 
https://github.com/apache/airflow/commit/b5a786b38148295c492da8ab731d5e2f6f86ccf7
  by Daniel which was small refactor applied to both methods and error 
suppression.
   
   * it's covered by test cases so it still works.
   
   * we have a code that we had been barely touched for ~ 2 years
   
   * all our providers have nicer, more performant and cleaner interface
    
   * I actually completely forgot about this part of code - this discussion 
made me remember it and look at that code for first time for maybe 1.5 year
   
   This is a complete list of changes to that code:
   
   <img width="1285" alt="Screenshot 2024-01-04 at 22 08 13" 
src="https://github.com/apache/airflow/assets/595491/674166e5-18ad-4907-9fd1-07a2783dff7c";>
   
   I personally see no reason why this case would be different.
   
   We probably already spent more time on discussing consequences of it than we 
will ever spend on maintaining it.
   


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to