potiuk commented on issue #32048:
URL: https://github.com/apache/airflow/issues/32048#issuecomment-1601571872

   > IMO we can just change the default value of 
database.load_default_connections to False, and we will stop loading them by 
default, and the users can still load them by setting this configuration to 
True. WDYT?
   
   That's - unfortunately - pretty breaking change. We can most likely 
deprecate init and raise warning and rename it to smth else, but changing it's 
behaviour would be a breaking change. There are a number of cases where people 
have the workflows where they depend on 'db init' behaviour and they rely  on 
'default_connections' being created. 
   
   This is unfortunate historical thing, but unfortunatley I see that there is 
quite high probability we will break someone's workflow - generally outside of 
the  "Hyrum's law" edge case.
   
   But my proposal above is that we do not have to "fix" its behaviour for 
providers - the connection will not be automatically created when we install 
new providers, and we do not have to care about back compatibility there, 
because it never worked this way. But we can deprecate it and discurage even 
more rather than break things that are broken even more (And clarify it in the 
docs). 
   
   And yes  - I think we do not HAVE to change the behaviour of having the 
connections in the core. While we might not like the fact that adding new 
provider means new "default" conneciton created in the core, we do not have to 
change it. One of the options (if we agree this should be treated as a 
"quick/test only" solution is to leave it in the core. We will have to anyway 
leave the list of extras in the core. There is no escape from the fact that we 
will have to list the providers we can install by having an extra - this is 
already one thing that is impossible to remove from the core. We need to have a 
list of providers in the core that we have extras for. currently it is done by 
generating (via pre-commit) 'generated/provider_dependencies.json') - and it 
used currently as the "source of the truth" for list of extras apache airflow.. 
   
   If we agree that "default connections" created in the db is a purely test 
setting and change the perception of that, we can leave them in the core - we 
can even change them to also be read and configured from a json core, or even 
add an entry in "generated/provider_dependencies.json" and create them based on 
it (as long as we make that file part of the airflow package). 
   
   That only reinforces my " let's clarify what "default_connections" are - are 
they test only? useful for prod? - what the 'db init' is for (and rename it if 
we agree 'db init' should not be used to initialize the db). 
   
   But I think we cannot (Without bumping Airflow 2 to Airflow 3) change the 
way "airflow db init" behaves by default (at most it can raise a warning)
   


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