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

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   1. When we tried reading asset events using jinja template task stuck in 
running state with no error.
   
   
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   1. Run below DAG to create asset event.
   
   ```
   import datetime
   
   from airflow.datasets import Dataset
   from airflow.sdk import Metadata
   from airflow.decorators import task
   from airflow.sdk import DAG
   from airflow.providers.standard.operators.bash import BashOperator
   
   ds = Dataset("s3://output/1.txt")
   
   with DAG(
       dag_id="dataset_with_extra_by_yield",
       catchup=False,
       start_date=datetime.datetime.min,
       schedule="@daily",
       tags=["datasets"],
   ):
   
       @task(outlets=[ds])
       def dataset_with_extra_by_yield():
           yield Metadata(ds, {"hi": "bye"})
   
       dataset_with_extra_by_yield()
   ```
   
   2. Verify asset event is created
   3. Try to read that using jinja template with below DAG and notice task 
stuck in running state
   
   ```
   import datetime
   
   from airflow.datasets import Dataset
   from airflow.decorators import task
   from airflow.sdk import DAG
   from airflow.providers.standard.operators.bash import BashOperator
   
   ds = Dataset("s3://output/1.txt")
   
   with DAG(
       dag_id="read_dataset_event_from_classic",
       catchup=False,
       start_date=datetime.datetime.min,
       schedule="@daily",
       tags=["dataset"],
   ):
       BashOperator(
           task_id="read_dataset_event_from_classic",
           inlets=[ds],
           bash_command="echo {{ inlet_events['s3://output/1.txt'] }}",
       )
   
   ```
   
   
   ### Operating System
   
   linux
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### 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]

Reply via email to