Closed Bowrna closed 1 year ago
I believe this is because previously you had "query_snowflake" task in your DAG that has been renamed to "snowflake_query" (notice that the UI si "snowflake_query" and in the API response you have "query_snowflake".
Airflow does not currently support renaming of tasks and generally versioning (this might get implemented with https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-36+DAG+Versioning) at some point of time and the effect of renaming tasks is exactly what you see:
You can verify that by adding a new tasl "query_snowflake" to your DAG or renaming it back - then the tasks executed in the past for "query_snowflake" will start showin up.
The current recomendation when you remove tasks from DAG or change the structure significantly is to also change DAG_ID (effectively creating a new DAG) because we have currently not even a good way of showing history for such DAG (until AIP-36 gets implemented).
@potiuk thanks for clarifying this part to me. yes it makes sense to me now. i have wrongly assumed that the api response is incorrect.
Apache Airflow version
Other Airflow 2 version (please specify below)
What happened
airflow version: 2.4.2
As seen in the above screenshot, I have highlighted a specific dag run and in that case I have not added the task_id
snowflake_query
and it has no status in the web UIFor that same dag run I tried to retrieve the list of task instances for specific dagrun via API. The API response is below:
The response contains 3 entries while the UI shows only the 2 task instance executed. The task_id
query_snowflake
is not added to DAG at this point of time.What you think should happen instead
It should return only the 2 task instances that got executed in the dag run
How to reproduce
By invoking the Airflow API "List task instances"
Operating System
Linux
Versions of Apache Airflow Providers
apache-airflow==2.4.2 apache-airflow-providers-celery==3.1.0 apache-airflow-providers-common-sql==1.3.3 apache-airflow-providers-ftp==3.2.0 apache-airflow-providers-http==4.1.0 apache-airflow-providers-imap==3.1.0 apache-airflow-providers-snowflake==4.0.2 apache-airflow-providers-sqlite==3.3.0
Deployment
Virtualenv installation
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct