Airflow / Cloud Composer log entry to indicate if a DAG was disabled or enabled

47 views Asked by At

We had an issue with our Cloud Composer / Airflow environment last week and we're trying to work out whether or not a given DAG was enabled or not at the time of the issue.

However, diving into the logs, we can't find a single log entry to indicate when a DAG changed state from enabled to disabled or vice versa.

Does a log entry like this exist?

Our initial investigation revealed this table to us:

INFO 2024-02-02T14:59:30.232189763Z File Path  PID  Runtime  # DAGs  # Errors  Last Runtime  Last Run
INFO 2024-02-02T14:59:30.232195879Z -------------------------------------------- ----- --------- -------- ---------- 
INFO 2024-02-02T14:59:30.232200778Z /home/airflow/gcs/dags/dag_1.py 1 0 4.81s 2024-02-02T14:59:20
INFO 2024-02-02T14:59:30.232205994Z /home/airflow/gcs/dags/dag_2.py 1 0 2.85s 2024-02-02T14:59:17
INFO 2024-02-02T14:59:30.232211488Z /home/airflow/gcs/dags/dag_3.py 1 0 6.49s 2024-02-02T14:59:00
INFO 2024-02-02T14:59:30.232217260Z /home/airflow/gcs/dags/airflow_monitoring.py 1 0 1.30s 2024-02-02T14:59:06
INFO 2024-02-02T14:59:30.232222575Z ================================================================================

This table suggests that all of DAGs 1 to 3 were enabled at the time of the issue, however, we were hoping for more concrete evidence than this as it doesn't give DAG state.

Edit

The instance is in a corrupted state currently, so the UI is no longer available to us. We have the logs in the logs bucket, but no UI to work with.

1

There are 1 answers

1
Yusuf Quazi On

I'm certain that info, should be available in the airflow UI > audit_logs. Hope this helps.