You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Akash Sharma <2a...@gmail.com> on 2023/07/26 06:51:00 UTC

Allowing providers to load the respective default connections

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 <ja...@potiuk.com>
   - 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

Re: Allowing providers to load the respective default connections

Posted by Amogh Desai <am...@gmail.com>.
I agree with migrate as well!

On Thu, Jul 27, 2023, 22:37 Jed Cunningham <je...@apache.org> wrote:

> I like migrate as well.
>

Re: Allowing providers to load the respective default connections

Posted by Jed Cunningham <je...@apache.org>.
I like migrate as well.

Re: Allowing providers to load the respective default connections

Posted by Jarek Potiuk <ja...@potiuk.com>.
migrate is cool for me.

On Thu, Jul 27, 2023 at 1:17 PM Pankaj Koti
<pa...@astronomer.io.invalid> wrote:
>
> I like `db migrate` and would like to vote for it.
>
> It implies to apply all migrations including the initial (init) migrations
> similar to how projects like Django do.
>
> Regards,
>
>
>
> Pankaj Koti
>
> *Senior Software Engineer, *OSS Engineering Team.
> Location: Pune, India
>
> Timezone: Indian Standard Time (IST)
>
> Email: pankaj.koti@astronomer.io
>
> Mobile: +91 9730079985
>
>
> On Thu, Jul 27, 2023 at 1:03 PM Ash Berlin-Taylor <as...@apache.org> wrote:
>
> > I'm for changing it. How about `db migrate` as the only (non-deprecated)
> > command we keep?
> >
> > On 27 July 2023 08:01:32 BST, Jarek Potiuk <ja...@potiuk.com> wrote:
> > >Also one comment here:  the whole point here is to remove confusion to
> > >the users. If we leave `upgrade` in place, the confusion will remain.
> > >So I think we **SHOULD** change it. This also means we will have to
> > >also re-learn the new command (I know we are all used to 'upgrade").
> > >So for me, the question is not whether we should change "upgrade" -
> > >but what is the name that will be least confusing to the users :).
> > >
> > >I know it's easiest to "keep things as we are used to" but we. should
> > >rather look at the future users of ours. Maybe we should gather some
> > >options (constructive ideas are welcome) and vote on them ?
> > >
> > >J.
> > >
> > >On Thu, Jul 27, 2023 at 8:55 AM Jarek Potiuk <ja...@potiuk.com> wrote:
> > >>
> > >> We can also name it `create-or-ugrade` - a bit awkward but way better
> > >> than upgrade.
> > >>
> > >> On Thu, Jul 27, 2023 at 8:24 AM Akash Sharma <2a...@gmail.com>
> > wrote:
> > >> >
> > >> > Upgrade gives an idea that existing instance will be upgraded to
> > desired
> > >> > version. The existing instance is spun up by db init ( in the
> > beginning of
> > >> > the process). With init getting deprecated, it would be good to have
> > a
> > >> > command that suggests that db can be created (if doesn't exist) or
> > upgraded
> > >> > (if it does) in the command name itself.
> > >> >
> > >> > Anyway its not a blocker for the above goal. It can be renamed
> > whenever
> > >> > needed.
> > >> >
> > >> > On Thu, 27 Jul 2023, 11:33 Amogh Desai, <am...@gmail.com>
> > wrote:
> > >> >
> > >> > > Good idea overall.
> > >> > > I am also aligned towards moving it out of `db` subcommand.  I am
> > not very
> > >> > > much aligned towards using the keyword/action word - `upgrade`. It
> > sets a
> > >> > > different context.
> > >> > >
> > >> > > Thanks,
> > >> > > Amogh Desai
> > >> > >
> > >> > > On Thu, Jul 27, 2023 at 1:02 AM Jarek Potiuk <ja...@potiuk.com>
> > wrote:
> > >> > >
> > >> > > > +1 for moving it under "connections" - good idea.
> > >> > > >
> > >> > > > I think "upgrade" is confusing for the first time because upgrade
> > >> > > > implies "upgrade FROM something".  The "sync" is not set-in-stone.
> > >> > > > Maybe there are other ideas?
> > >> > > >
> > >> > > > The inspiration is Terraform - where we describe the "target"
> > state we
> > >> > > > want to reach, so maybe "airflow db apply" is a better one?
> > >> > > >
> > >> > > > J.
> > >> > > >
> > >> > > > On Wed, Jul 26, 2023 at 8:51 PM Jed Cunningham <
> > jedcunningham@apache.org
> > >> > > >
> > >> > > > wrote:
> > >> > > > >
> > >> > > > > I'm not sure I like sync over upgrade, personally. Everything
> > else
> > >> > > > > discussed sounds good though.
> > >> > > >
> > >> > > >
> > ---------------------------------------------------------------------
> > >> > > > To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
> > >> > > > For additional commands, e-mail: dev-help@airflow.apache.org
> > >> > > >
> > >> > > >
> > >> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
> > >For additional commands, e-mail: dev-help@airflow.apache.org
> > >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
For additional commands, e-mail: dev-help@airflow.apache.org


Re: Allowing providers to load the respective default connections

Posted by Pankaj Koti <pa...@astronomer.io.INVALID>.
I like `db migrate` and would like to vote for it.

It implies to apply all migrations including the initial (init) migrations
similar to how projects like Django do.

Regards,



Pankaj Koti

*Senior Software Engineer, *OSS Engineering Team.
Location: Pune, India

Timezone: Indian Standard Time (IST)

Email: pankaj.koti@astronomer.io

Mobile: +91 9730079985


On Thu, Jul 27, 2023 at 1:03 PM Ash Berlin-Taylor <as...@apache.org> wrote:

> I'm for changing it. How about `db migrate` as the only (non-deprecated)
> command we keep?
>
> On 27 July 2023 08:01:32 BST, Jarek Potiuk <ja...@potiuk.com> wrote:
> >Also one comment here:  the whole point here is to remove confusion to
> >the users. If we leave `upgrade` in place, the confusion will remain.
> >So I think we **SHOULD** change it. This also means we will have to
> >also re-learn the new command (I know we are all used to 'upgrade").
> >So for me, the question is not whether we should change "upgrade" -
> >but what is the name that will be least confusing to the users :).
> >
> >I know it's easiest to "keep things as we are used to" but we. should
> >rather look at the future users of ours. Maybe we should gather some
> >options (constructive ideas are welcome) and vote on them ?
> >
> >J.
> >
> >On Thu, Jul 27, 2023 at 8:55 AM Jarek Potiuk <ja...@potiuk.com> wrote:
> >>
> >> We can also name it `create-or-ugrade` - a bit awkward but way better
> >> than upgrade.
> >>
> >> On Thu, Jul 27, 2023 at 8:24 AM Akash Sharma <2a...@gmail.com>
> wrote:
> >> >
> >> > Upgrade gives an idea that existing instance will be upgraded to
> desired
> >> > version. The existing instance is spun up by db init ( in the
> beginning of
> >> > the process). With init getting deprecated, it would be good to have
> a
> >> > command that suggests that db can be created (if doesn't exist) or
> upgraded
> >> > (if it does) in the command name itself.
> >> >
> >> > Anyway its not a blocker for the above goal. It can be renamed
> whenever
> >> > needed.
> >> >
> >> > On Thu, 27 Jul 2023, 11:33 Amogh Desai, <am...@gmail.com>
> wrote:
> >> >
> >> > > Good idea overall.
> >> > > I am also aligned towards moving it out of `db` subcommand.  I am
> not very
> >> > > much aligned towards using the keyword/action word - `upgrade`. It
> sets a
> >> > > different context.
> >> > >
> >> > > Thanks,
> >> > > Amogh Desai
> >> > >
> >> > > On Thu, Jul 27, 2023 at 1:02 AM Jarek Potiuk <ja...@potiuk.com>
> wrote:
> >> > >
> >> > > > +1 for moving it under "connections" - good idea.
> >> > > >
> >> > > > I think "upgrade" is confusing for the first time because upgrade
> >> > > > implies "upgrade FROM something".  The "sync" is not set-in-stone.
> >> > > > Maybe there are other ideas?
> >> > > >
> >> > > > The inspiration is Terraform - where we describe the "target"
> state we
> >> > > > want to reach, so maybe "airflow db apply" is a better one?
> >> > > >
> >> > > > J.
> >> > > >
> >> > > > On Wed, Jul 26, 2023 at 8:51 PM Jed Cunningham <
> jedcunningham@apache.org
> >> > > >
> >> > > > wrote:
> >> > > > >
> >> > > > > I'm not sure I like sync over upgrade, personally. Everything
> else
> >> > > > > discussed sounds good though.
> >> > > >
> >> > > >
> ---------------------------------------------------------------------
> >> > > > To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
> >> > > > For additional commands, e-mail: dev-help@airflow.apache.org
> >> > > >
> >> > > >
> >> > >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
> >For additional commands, e-mail: dev-help@airflow.apache.org
> >
>

Re: Allowing providers to load the respective default connections

Posted by Ash Berlin-Taylor <as...@apache.org>.
I'm for changing it. How about `db migrate` as the only (non-deprecated) command we keep?

On 27 July 2023 08:01:32 BST, Jarek Potiuk <ja...@potiuk.com> wrote:
>Also one comment here:  the whole point here is to remove confusion to
>the users. If we leave `upgrade` in place, the confusion will remain.
>So I think we **SHOULD** change it. This also means we will have to
>also re-learn the new command (I know we are all used to 'upgrade").
>So for me, the question is not whether we should change "upgrade" -
>but what is the name that will be least confusing to the users :).
>
>I know it's easiest to "keep things as we are used to" but we. should
>rather look at the future users of ours. Maybe we should gather some
>options (constructive ideas are welcome) and vote on them ?
>
>J.
>
>On Thu, Jul 27, 2023 at 8:55 AM Jarek Potiuk <ja...@potiuk.com> wrote:
>>
>> We can also name it `create-or-ugrade` - a bit awkward but way better
>> than upgrade.
>>
>> On Thu, Jul 27, 2023 at 8:24 AM Akash Sharma <2a...@gmail.com> wrote:
>> >
>> > Upgrade gives an idea that existing instance will be upgraded to desired
>> > version. The existing instance is spun up by db init ( in the beginning of
>> > the process). With init getting deprecated, it would be good to have  a
>> > command that suggests that db can be created (if doesn't exist) or upgraded
>> > (if it does) in the command name itself.
>> >
>> > Anyway its not a blocker for the above goal. It can be renamed whenever
>> > needed.
>> >
>> > On Thu, 27 Jul 2023, 11:33 Amogh Desai, <am...@gmail.com> wrote:
>> >
>> > > Good idea overall.
>> > > I am also aligned towards moving it out of `db` subcommand.  I am not very
>> > > much aligned towards using the keyword/action word - `upgrade`. It sets a
>> > > different context.
>> > >
>> > > Thanks,
>> > > Amogh Desai
>> > >
>> > > On Thu, Jul 27, 2023 at 1:02 AM Jarek Potiuk <ja...@potiuk.com> wrote:
>> > >
>> > > > +1 for moving it under "connections" - good idea.
>> > > >
>> > > > I think "upgrade" is confusing for the first time because upgrade
>> > > > implies "upgrade FROM something".  The "sync" is not set-in-stone.
>> > > > Maybe there are other ideas?
>> > > >
>> > > > The inspiration is Terraform - where we describe the "target" state we
>> > > > want to reach, so maybe "airflow db apply" is a better one?
>> > > >
>> > > > J.
>> > > >
>> > > > On Wed, Jul 26, 2023 at 8:51 PM Jed Cunningham <jedcunningham@apache.org
>> > > >
>> > > > wrote:
>> > > > >
>> > > > > I'm not sure I like sync over upgrade, personally. Everything else
>> > > > > discussed sounds good though.
>> > > >
>> > > > ---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
>> > > > For additional commands, e-mail: dev-help@airflow.apache.org
>> > > >
>> > > >
>> > >
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
>For additional commands, e-mail: dev-help@airflow.apache.org
>

Re: Allowing providers to load the respective default connections

Posted by Jarek Potiuk <ja...@potiuk.com>.
Also one comment here:  the whole point here is to remove confusion to
the users. If we leave `upgrade` in place, the confusion will remain.
So I think we **SHOULD** change it. This also means we will have to
also re-learn the new command (I know we are all used to 'upgrade").
So for me, the question is not whether we should change "upgrade" -
but what is the name that will be least confusing to the users :).

I know it's easiest to "keep things as we are used to" but we. should
rather look at the future users of ours. Maybe we should gather some
options (constructive ideas are welcome) and vote on them ?

J.

On Thu, Jul 27, 2023 at 8:55 AM Jarek Potiuk <ja...@potiuk.com> wrote:
>
> We can also name it `create-or-ugrade` - a bit awkward but way better
> than upgrade.
>
> On Thu, Jul 27, 2023 at 8:24 AM Akash Sharma <2a...@gmail.com> wrote:
> >
> > Upgrade gives an idea that existing instance will be upgraded to desired
> > version. The existing instance is spun up by db init ( in the beginning of
> > the process). With init getting deprecated, it would be good to have  a
> > command that suggests that db can be created (if doesn't exist) or upgraded
> > (if it does) in the command name itself.
> >
> > Anyway its not a blocker for the above goal. It can be renamed whenever
> > needed.
> >
> > On Thu, 27 Jul 2023, 11:33 Amogh Desai, <am...@gmail.com> wrote:
> >
> > > Good idea overall.
> > > I am also aligned towards moving it out of `db` subcommand.  I am not very
> > > much aligned towards using the keyword/action word - `upgrade`. It sets a
> > > different context.
> > >
> > > Thanks,
> > > Amogh Desai
> > >
> > > On Thu, Jul 27, 2023 at 1:02 AM Jarek Potiuk <ja...@potiuk.com> wrote:
> > >
> > > > +1 for moving it under "connections" - good idea.
> > > >
> > > > I think "upgrade" is confusing for the first time because upgrade
> > > > implies "upgrade FROM something".  The "sync" is not set-in-stone.
> > > > Maybe there are other ideas?
> > > >
> > > > The inspiration is Terraform - where we describe the "target" state we
> > > > want to reach, so maybe "airflow db apply" is a better one?
> > > >
> > > > J.
> > > >
> > > > On Wed, Jul 26, 2023 at 8:51 PM Jed Cunningham <jedcunningham@apache.org
> > > >
> > > > wrote:
> > > > >
> > > > > I'm not sure I like sync over upgrade, personally. Everything else
> > > > > discussed sounds good though.
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
> > > > For additional commands, e-mail: dev-help@airflow.apache.org
> > > >
> > > >
> > >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
For additional commands, e-mail: dev-help@airflow.apache.org


Re: Allowing providers to load the respective default connections

Posted by Jarek Potiuk <ja...@potiuk.com>.
We can also name it `create-or-ugrade` - a bit awkward but way better
than upgrade.

On Thu, Jul 27, 2023 at 8:24 AM Akash Sharma <2a...@gmail.com> wrote:
>
> Upgrade gives an idea that existing instance will be upgraded to desired
> version. The existing instance is spun up by db init ( in the beginning of
> the process). With init getting deprecated, it would be good to have  a
> command that suggests that db can be created (if doesn't exist) or upgraded
> (if it does) in the command name itself.
>
> Anyway its not a blocker for the above goal. It can be renamed whenever
> needed.
>
> On Thu, 27 Jul 2023, 11:33 Amogh Desai, <am...@gmail.com> wrote:
>
> > Good idea overall.
> > I am also aligned towards moving it out of `db` subcommand.  I am not very
> > much aligned towards using the keyword/action word - `upgrade`. It sets a
> > different context.
> >
> > Thanks,
> > Amogh Desai
> >
> > On Thu, Jul 27, 2023 at 1:02 AM Jarek Potiuk <ja...@potiuk.com> wrote:
> >
> > > +1 for moving it under "connections" - good idea.
> > >
> > > I think "upgrade" is confusing for the first time because upgrade
> > > implies "upgrade FROM something".  The "sync" is not set-in-stone.
> > > Maybe there are other ideas?
> > >
> > > The inspiration is Terraform - where we describe the "target" state we
> > > want to reach, so maybe "airflow db apply" is a better one?
> > >
> > > J.
> > >
> > > On Wed, Jul 26, 2023 at 8:51 PM Jed Cunningham <jedcunningham@apache.org
> > >
> > > wrote:
> > > >
> > > > I'm not sure I like sync over upgrade, personally. Everything else
> > > > discussed sounds good though.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
> > > For additional commands, e-mail: dev-help@airflow.apache.org
> > >
> > >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
For additional commands, e-mail: dev-help@airflow.apache.org


Re: Allowing providers to load the respective default connections

Posted by Akash Sharma <2a...@gmail.com>.
Upgrade gives an idea that existing instance will be upgraded to desired
version. The existing instance is spun up by db init ( in the beginning of
the process). With init getting deprecated, it would be good to have  a
command that suggests that db can be created (if doesn't exist) or upgraded
(if it does) in the command name itself.

Anyway its not a blocker for the above goal. It can be renamed whenever
needed.

On Thu, 27 Jul 2023, 11:33 Amogh Desai, <am...@gmail.com> wrote:

> Good idea overall.
> I am also aligned towards moving it out of `db` subcommand.  I am not very
> much aligned towards using the keyword/action word - `upgrade`. It sets a
> different context.
>
> Thanks,
> Amogh Desai
>
> On Thu, Jul 27, 2023 at 1:02 AM Jarek Potiuk <ja...@potiuk.com> wrote:
>
> > +1 for moving it under "connections" - good idea.
> >
> > I think "upgrade" is confusing for the first time because upgrade
> > implies "upgrade FROM something".  The "sync" is not set-in-stone.
> > Maybe there are other ideas?
> >
> > The inspiration is Terraform - where we describe the "target" state we
> > want to reach, so maybe "airflow db apply" is a better one?
> >
> > J.
> >
> > On Wed, Jul 26, 2023 at 8:51 PM Jed Cunningham <jedcunningham@apache.org
> >
> > wrote:
> > >
> > > I'm not sure I like sync over upgrade, personally. Everything else
> > > discussed sounds good though.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
> > For additional commands, e-mail: dev-help@airflow.apache.org
> >
> >
>

Re: Allowing providers to load the respective default connections

Posted by Amogh Desai <am...@gmail.com>.
Good idea overall.
I am also aligned towards moving it out of `db` subcommand.  I am not very
much aligned towards using the keyword/action word - `upgrade`. It sets a
different context.

Thanks,
Amogh Desai

On Thu, Jul 27, 2023 at 1:02 AM Jarek Potiuk <ja...@potiuk.com> wrote:

> +1 for moving it under "connections" - good idea.
>
> I think "upgrade" is confusing for the first time because upgrade
> implies "upgrade FROM something".  The "sync" is not set-in-stone.
> Maybe there are other ideas?
>
> The inspiration is Terraform - where we describe the "target" state we
> want to reach, so maybe "airflow db apply" is a better one?
>
> J.
>
> On Wed, Jul 26, 2023 at 8:51 PM Jed Cunningham <je...@apache.org>
> wrote:
> >
> > I'm not sure I like sync over upgrade, personally. Everything else
> > discussed sounds good though.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
> For additional commands, e-mail: dev-help@airflow.apache.org
>
>

Re: Allowing providers to load the respective default connections

Posted by Jarek Potiuk <ja...@potiuk.com>.
+1 for moving it under "connections" - good idea.

I think "upgrade" is confusing for the first time because upgrade
implies "upgrade FROM something".  The "sync" is not set-in-stone.
Maybe there are other ideas?

The inspiration is Terraform - where we describe the "target" state we
want to reach, so maybe "airflow db apply" is a better one?

J.

On Wed, Jul 26, 2023 at 8:51 PM Jed Cunningham <je...@apache.org> wrote:
>
> I'm not sure I like sync over upgrade, personally. Everything else
> discussed sounds good though.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
For additional commands, e-mail: dev-help@airflow.apache.org


Re: Allowing providers to load the respective default connections

Posted by Jed Cunningham <je...@apache.org>.
I'm not sure I like sync over upgrade, personally. Everything else
discussed sounds good though.

Re: Allowing providers to load the respective default connections

Posted by Akash Sharma <2a...@gmail.com>.
Yes, putting it under "connections" subcommand seems natural. +1 to this.

Best regards,
Akash

On Wed, Jul 26, 2023 at 2:50 PM Ash Berlin-Taylor <as...@apache.org> wrote:

> 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 <2a...@gmail.com> 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 <ja...@potiuk.com>
> >   - 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: dev-unsubscribe@airflow.apache.org
> For additional commands, e-mail: dev-help@airflow.apache.org
>
>

Re: Allowing providers to load the respective default connections

Posted by Ash Berlin-Taylor <as...@apache.org>.
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 <2a...@gmail.com> 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 <ja...@potiuk.com>
>   - 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: dev-unsubscribe@airflow.apache.org
For additional commands, e-mail: dev-help@airflow.apache.org