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

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   In the case of asset aliases, if there are no DAG runs, the dependencies are 
not displayed in the graph. Once a DAG run occurs, the DAG dependencies become 
visible.
   
   
   Before DAG RUN:
   
   
![Image](https://github.com/user-attachments/assets/81ca0987-71df-4636-86ba-c2dd7726c100)
   
   After DAG RUN:
   
   
![Image](https://github.com/user-attachments/assets/7adcf63f-d4fa-4fba-988c-fcd80ec32960)
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   1. Check graph of below DAG without a DAGRUN no dependencies are shown
   2. Make a DAGRUN and check again
   
   
   
   ```
   from __future__ import annotations
   
   import pendulum
   
   from airflow.sdk import DAG, Asset, AssetAlias, task
   
   with DAG(
       dag_id="asset_s3_bucket_producer",
       start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
       schedule=None,
       catchup=False,
       tags=["producer", "asset"],
   ):
   
       @task(outlets=[Asset("s3://bucket/my-task")])
       def produce_asset_events():
           pass
   
       produce_asset_events()
   
   with DAG(
       dag_id="asset_alias_example_alias_producer",
       start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
       schedule=None,
       catchup=False,
       tags=["producer", "asset-alias"],
   ):
   
       @task(outlets=[AssetAlias("example-alias")])
       def produce_asset_events_through_asset_alias(*, outlet_events=None):
           bucket_name = "bucket"
           object_path = "my-task"
           
outlet_events[AssetAlias("example-alias")].add(Asset(f"s3://{bucket_name}/{object_path}"))
   
       produce_asset_events_through_asset_alias()
   
   with DAG(
       dag_id="asset_s3_bucket_consumer",
       start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
       schedule=[Asset("s3://bucket/my-task")],
       catchup=False,
       tags=["consumer", "asset"],
   ):
   
       @task
       def consume_asset_event():
           pass
   
       consume_asset_event()
   
   with DAG(
       dag_id="asset_alias_example_alias_consumer",
       start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
       schedule=[AssetAlias("example-alias")],
       catchup=False,
       tags=["consumer", "asset-alias"],
   ):
   
       @task(inlets=[AssetAlias("example-alias")])
       def consume_asset_event_from_asset_alias(*, inlet_events=None):
           for event in inlet_events[AssetAlias("example-alias")]:
               print(event)
   
       consume_asset_event_from_asset_alias()
   ```
   
   
   ### 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