airflow-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Palmer <ch...@crpalmer.com>
Subject Re: Testing DAG parsing/Airflow CLI exit codes
Date Fri, 01 May 2020 16:43:49 GMT
Thanks Kamil,

That makes a lot of sense. Looks like that documentation section doesn't
exist in 1.10.6 (or earlier) so I hadn't seen it.

Chris

On Fri, May 1, 2020 at 11:27 AM Kamil BreguĊ‚a <kamil.bregula@polidea.com>
wrote:

> Hello,
>
> It is best to write unit tests that will check that the files are correct.
>
> https://airflow.readthedocs.io/en/latest/best-practices.html?highlight=testing#unit-tests
>
> https://github.com/apache/airflow/blob/4421f011eeec2d1022a39933e27f530fb9f9c1b1/tests/test_example_dags.py#L34
>
> Best regards,
> Kamil
>
> On Fri, May 1, 2020 at 5:09 PM Chris Palmer <chris@crpalmer.com> wrote:
> >
> > Hi all,
> >
> > I'm wondering if others have experience with testing of DAG parsing. We
> use CircleCI to automate deployment of DAGs to our environments, and I'd
> like to add some simple test steps to check things like can Airflow parse
> all the DAGs without errors, i.e. running `airflow list_dags` without
> errors.
> >
> > I'm working with Airflow 1.10.6 at the moment. I was hoping that the CLI
> would exit with useful return codes but that doesn't appear to be the case.
> >
> > Does that mean I'm stuck capturing the output of the command and looking
> for strings like 'failed to import'?
> >
> > Anyone have experience with this?
> >
> > Thanks
> > Chris
> >
> >
>

Mime
View raw message