How about `airflow connections create-default` instead of putting it under `db` — that way the DB subcommand is now exclusively about migrations, but connection management is all under the `connections` sub-command
-ash > On 26 Jul 2023, at 07:51, Akash Sharma <[email protected]> wrote: > > Hello all, > > Currently, all the default provider connections are created as a part of > the Airflow core. This creates a limitation where providers have to wait > for a new Airflow core release to have the default connection created for > any new connections added in a provider's release, as > highlighted by @eladkal here > <https://github.com/apache/airflow/issues/32048>. > > This can be solved by allowing the providers to inject the default > connections that they want to be created in respective yaml config, and > then those connections can be created through a new command `airflow db > create-default-connections` with arguments like `--provider-filter`, > `--all`, `--only-installed-providers`, etc.... > > As a first step towards the above goal, have created this PR > <https://github.com/apache/airflow/issues/32420> where - > > - `db init` is deprecated since we wouldn't like to initialize all the > default connections out of the box. And the difference between `db upgrade` > and `db init` when db hasn't been initialized was primarily only the > connections creation part, making it redundant. > - `db upgrade` has been renamed to `db sync`, taking into consideration > the suggestion > <https://github.com/apache/airflow/issues/32420#issuecomment-1627473043> > by @Jarek Potiuk <[email protected]> > - A new command has been introduced, `db create-default-connections` > which currently creates all the default connections, but in subsequent PRs, > we will modify it to have the desired functionality > > Do let us know your take on this. > > Best regards, > Akash --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
