ninowalker opened a new issue, #37463:
URL: https://github.com/apache/airflow/issues/37463

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   2.8.0
   
   ### What happened?
   
   A task with an outlet should convey it's outlets as inlets to a `@task` 
decorated function, when instantiated with `inlets=AUTO`. Instead, the string 
"auto" (the value of `airflow.lineage.AUTO`) is passed as the value, rather 
than the resolved outlets.
   
   Consider a minimal test case:
   
   ```python
   from airflow import DAG
   from airflow.decorators import task
   from airflow.lineage import AUTO
   from datetime import datetime, timedelta
   
   from airflow.operators.empty import EmptyOperator
   
   DAG_ID = "test_lineage"
   
   with DAG(
       dag_id=DAG_ID,
       schedule=None,
       start_date=datetime(2021, 1, 1),
       dagrun_timeout=timedelta(minutes=5),
       catchup=False,
   ) as dag:
       f = "filename"
       op1 = EmptyOperator(
           task_id="leave1",
           outlets=[f],
       )
   
       @task
       def test_inlets(inlets):
           assert inlets == [f], f"{inlets} != {[f]}"
           return True
   
       op1 >> test_inlets(inlets=AUTO)
   ```
   
   ### What you think should happen instead?
   
   `inlets` should resolve to the `outlets` of the upstream task, instead of 
being unresolved.
   
   Instead:
   ```
   AssertionError: ['auto'] != ['filename']'
   ```
   
   ### How to reproduce
   
   1. Create the DAG, given the test code above.
   2. Run the DAG.
   3. Be sad :(
   
   ### Operating System
   
   OSX
   
   ### Versions of Apache Airflow Providers
   
   ```
   apache-airflow-providers-amazon==8.13.0
   apache-airflow-providers-common-sql==1.9.0
   apache-airflow-providers-discord==3.5.0
   apache-airflow-providers-ftp @ 
file:///home/conda/feedstock_root/build_artifacts/apache-airflow-providers-ftp_1702441975571/work
   apache-airflow-providers-google==10.12.0
   apache-airflow-providers-http @ 
file:///home/conda/feedstock_root/build_artifacts/apache-airflow-providers-http_1706649884002/work
   apache-airflow-providers-imap @ 
file:///home/conda/feedstock_root/build_artifacts/apache-airflow-providers-imap_1702443030927/work
   apache-airflow-providers-papermill==3.6.0
   apache-airflow-providers-postgres==5.9.0
   apache-airflow-providers-sqlite==3.6.0
   ```
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   Running standalone.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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: commits-unsubscr...@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to