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

Airflow task instances disappearing, unable to restart #34082

Closed
1 of 2 tasks
lihan opened this issue Sep 4, 2023 · 4 comments
Closed
1 of 2 tasks

Airflow task instances disappearing, unable to restart #34082

lihan opened this issue Sep 4, 2023 · 4 comments
Labels
area:core duplicate Issue that is duplicated kind:bug This is a clearly a bug

Comments

@lihan
Copy link
Contributor

lihan commented Sep 4, 2023

Apache Airflow version

Other Airflow 2 version (please specify below)

What happened

This happens on v2.6.2, but likely also on other earlier versions.

Following are the bug observations:

  • Task instances from already successful dag runs went disappearing (Refer to below screenshot). The dag run itself stays successful (green block), but there was no task instances exist in the meta database.

  • Attempt to click "Clear existing tasks" dag run to retry the dag, but there was again no task instances created, and the dag run state transitioned from queued to succeed immediately

  • Same thing happens if click "Queue up new tasks" button, the dag run immediately went back to normal state
    image

  • This issue happened after Airflow tasks went disappear after airflow db clean #32596

Also see a video recording.

airflow-bug-short.mov

What you think should happen instead

No response

How to reproduce

I cannot easily reproduce this locally, but it happens on production env.

Operating System

Docker python 3.9

Versions of Apache Airflow Providers

No response

Deployment

Other Docker-based deployment

Deployment details

Unlikely relate to the deployment.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@lihan lihan added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Sep 4, 2023
@potiuk
Copy link
Member

potiuk commented Sep 4, 2023

Can you please check if the DagRun in question has no Task Instance entries? That would confirm that the root cause is #32684

@lihan
Copy link
Contributor Author

lihan commented Sep 4, 2023

Yes, dag_run object exists in the meta DB, but no associated task instances.

@hussein-awala
Copy link
Member

You can check my comment, you can edit the query I provided to clean your history, you just need to detect the empty dag runs, delete them, then recreate them using the backfill command.

@potiuk
Copy link
Member

potiuk commented Sep 4, 2023

Closing as duplicate. Good we have it as it will serve as a guide for others who will have similar issue.

@potiuk potiuk closed this as completed Sep 4, 2023
@potiuk potiuk added duplicate Issue that is duplicated and removed needs-triage label for new issues that we didn't triage yet labels Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core duplicate Issue that is duplicated kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

3 participants
  翻译: