Closed nvn01234 closed 2 years ago
Interesting, thanks for reporting.
@nvn01234 I experienced the same thing.
In my case, the error occurred if it disappeared from UI due to git-sync but remained in the DB
you solve this error just delete dag from DB. Use airflow cli airflow dags delete <dag_id> -y
I had a similar problem. In my case the exception message was like "airflow.exception.SerializedDagNoFound: DAG 'None' not found in serialized_dag table". Fixed with following query in airflow database:
DELETE FROM dag_run WHERE dag_id IS NULL;
Hi, everyone!
If anyone would have time to create a PR that fixes it, I would be grateful. Fix should not be too complex.
@elephantum How should I fix it?
just fix it to ignore airflow.exceptions.SerializedDagNotFound
?
I would suggest altering sqlalchemy query for this case, most probably simple join with dag table would be enough.
I.e. filter out such tasks and dags that do not have corresponding dag in DB.
@elephantum #105 I create PR Thank you for the opportunity.😁😁
Experienced it as well.
Same issue here, with airflow-exporter 1.5.1,
and airflow 1.10.15, (where for some very old dags we do not have serialized_dag
entries, as we only enabled that option few weeks ago in preparation for the Airflow 2.x update), but it will be an issue when I upgrade to 2.x, because we will be preserving full history.
I have a single dag in dag
table, that is no longer available. Looking at postgresql database it has is_paused false, is_subdag false, is_active false.
Fixed in v1.5.2
Excellent, it works. Thanks @sawaca96 and @elephantum
Step by step to reproduce the bug:
Currently I have to run a CLI command:
airflow dags delete <dag_id>
to completely remove all records related to a deleted dagThe solution can be: Ignore the deleted dags (don't show them in metrics)
/label ~bug