kacpermuda opened a new issue, #58303: URL: https://github.com/apache/airflow/issues/58303
### Apache Airflow version 3.1.2 ### If "Other Airflow 2/3 version" selected, which one? Happens since 3.0 ### What happened? When running DAG ([this](https://github.com/apache/airflow/blob/main/providers/openlineage/tests/system/openlineage/example_openlineage_base_complex_dag.py#L109)) that has tasks with inlets and outlets that are not consumed anywhere the AirflowInactiveAssetInInletOrOutletException is raised, but only sometimes, every few days. <img width="764" height="90" alt="Image" src="https://github.com/user-attachments/assets/8ed52ab9-a9f4-4c2b-b7f2-f1c10dcf779f" /> These are my tests that run daily, and you can see that these failures look rather random (task2 is the one with "inactive" inlets). Also, whenever a failure happens and I create a new DagRun straight away, it passes without error. <img width="1815" height="121" alt="Image" src="https://github.com/user-attachments/assets/7a822b5f-f238-4908-887c-6597a7f4c913" /> Inlets/outlets are not consumed - it means that inlets to a single task are not outlets of any other task in my entire Airflow, the same for outlets - they are not inlets to any other task in my entire Airflow. I thought it's not a requirement, a task should be able to emit Asset regardless. These inlets and outlets are used in tasks so that I can check how the OpenLineage is serializing them into OL events, so I can't simply remove them. ### What you think should happen instead? I think no error should be raised and I should be able to define inlets/outlets to my tasks that are not defined anywhere else. If, however, It's considered a wrong behavior, errors should always be raised so it's consistent. ### How to reproduce That's a hard one to reproduce quickly. I could say: run a DAG with inlet that has some non-existing uri, every day for a week, and see if it raises an error. I assume maybe it's "flakiness" comes from some internal process that clears `AssetActive` table or something similar? Really hard to say, I tried to follow the code, ended up [here](https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py#L1019) in API's `validate_inlets_and_outlets`, but I still can't figure out why my inlet is not in the AssetActive table. ### Operating System linux ### Versions of Apache Airflow Providers _No response_ ### Deployment Astronomer ### Deployment details Running on Airflow 3.0 and 3.1, it has been happening since the release of AF3 really, so I'm not sure if any recent change is the cause of it. ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
