The GitHub Actions job "Tests" on airflow.git has failed.
Run started by GitHub user kaxil (triggered by kaxil).

Head commit for run:
3df3eba50d0f08672bda1dc8e8a9b9b68980a17d / Kaxil Naik <[email protected]>
Allow raising error if ``DagRun`` fails when running ``dag test``

**Motivation**:

Currently, when using `airflow dags test`, there is no easy way to know 
programmatically if a DagRun fails since the state is not stored in DB. The way 
to do know relies on log lines as below:

```bash
state=$(airflow dags test exception_dag | grep "DagRun Finished" | awk -F, 
'{for(i=1;i<=NF;i++) if ($i ~ / state=/) print $i}' | awk -F= '{print $2}') if 
[[ $state == "failed" ]]; then exit 1 else exit 0 fi
```

This PR adds `--fail-on-dagrun-failure` flag to `airflow dags test` command 
which will return an exit code of 1 if DagRun fails and makes it easy to 
integrate in CI for testing.

Report URL: https://github.com/apache/airflow/actions/runs/7371727744

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to