One thing with MetaClass - I already mentioned that in the PR. I love the
idea, but since we are planning to backport current "providers" to 1.10, we
have to figure out how to apply the MetaClass approach to backported
operators for 1.10. It's not impossible and we have few options for that.

On Wed, Feb 19, 2020 at 7:47 PM Shaw, Damian P. <
[email protected]> wrote:

> I saw that PR today and it made me realize I've not been using
> apply_defaults in much of my code!
>
> Look forward to this being an automaic operation via a MetaClass, great
> work :) ! In general I wish Airflow would more heavily leverage MetaClasses
> and __init_subclass__ for stuff like this, having to pollute the global
> namespace with DAG objects still irks me.
>
> Damian
>
>
> -----Original Message-----
> From: Kamil Breguła <[email protected]>
> Sent: Wednesday, February 19, 2020 13:34
> To: [email protected]
> Subject: Re: How is DAG's default_arg parameter forwarded to operators ?
>
> Hello,
>
> You may also be interested in this PR:
> https://github.com/apache/airflow/pull/7450
>
> Best regards,
> Kamil
>
> On Wed, Feb 19, 2020 at 4:57 PM Shaw, Damian P.
> <[email protected]> wrote:
> >
> > I'm not an expert of the Airflow code, but in 1.10.2 I notice the
> decorator on the __init__ of the BaseOperator named "apply_defaults":
> > https://github.com/apache/airflow/blob/1.10.2/airflow/models.py#L2472
> >
> > Which is located here:
> > https://github.com/apache/airflow/blob/1.10.2/airflow/utils/decorators
> > .py#L37
> >
> > Which has the docstring:
> >     Function decorator that Looks for an argument named "default_args",
> and
> >     fills the unspecified arguments from it.
> >
> > Damian
> >
> >
> > -----Original Message-----
> > From: Massy Bourennani <[email protected]>
> > Sent: Wednesday, February 19, 2020 10:49
> > To: [email protected]
> > Subject: How is DAG's default_arg parameter forwarded to operators ?
> >
> > Hello all,
> >
> > I'm searching through the Git repo but I couldn't find the code
> responsible for forwardings DAG's default_args to DAG's operators.
> > I'm using Airflow 1.10.2
> >
> > Many thanks,
> > Massy
> >
> >
> >
> > ======================================================================
> > ========= Please access the attached hyperlink for an important
> > electronic communications disclaimer:
> > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> > ======================================================================
> > =========
>
>
>
> ===============================================================================
>
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ===============================================================================
>
>


-- 

Jarek Potiuk
Polidea <https://www.polidea.com/> | Principal Software Engineer

M: +48 660 796 129 <+48660796129>
[image: Polidea] <https://www.polidea.com/>

Reply via email to