Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger Reserialization on Demand #19432

Closed
2 tasks done
collinmcnulty opened this issue Nov 5, 2021 · 2 comments · Fixed by #19471
Closed
2 tasks done

Trigger Reserialization on Demand #19432

collinmcnulty opened this issue Nov 5, 2021 · 2 comments · Fixed by #19471
Labels
area:CLI good first issue kind:feature Feature Requests priority:low Bug with a simple workaround that would not block a release

Comments

@collinmcnulty
Copy link
Contributor

collinmcnulty commented Nov 5, 2021

Description

Dag serialization is currently out of the hands of the user. Whenever dag reserialization is required, I run this python script.

from airflow.models.serialized_dag import SerializedDagModel
from airflow.settings import Session
session = Session()
session.query(SerializedDagModel).delete()
session.commit()

It would be great to have this available from the CLI and/or UI. Or even be able to do it for individual dags without having to delete the whole dag with the trash can button. Also would be worth considering triggering reserialization for any version upgrades that affect dag serialization as part of airflow db upgrade.

Use case/motivation

If your serialized dags get broken for any reason, like the incompatibilities with the changes made in 2.2 recently, reserializing will fix the issue, but it's fairly difficult to trigger reserializing.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@collinmcnulty collinmcnulty added the kind:feature Feature Requests label Nov 5, 2021
@potiuk
Copy link
Member

potiuk commented Nov 7, 2021

Maybe you would like to add such CLI command @collinmcnulty ? This is not dificult

@potiuk potiuk added area:CLI priority:low Bug with a simple workaround that would not block a release good first issue labels Nov 7, 2021
@collinmcnulty
Copy link
Contributor Author

Sure, I'll do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CLI good first issue kind:feature Feature Requests priority:low Bug with a simple workaround that would not block a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants