atul-astronomer opened a new issue, #48393:
URL: https://github.com/apache/airflow/issues/48393
### Apache Airflow version
main (development)
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
airflow dags show-dependencies -v
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 10, in <module>
sys.exit(main())
File "/opt/airflow/airflow-core/src/airflow/__main__.py", line 58, in main
args.func(args)
File "/opt/airflow/airflow-core/src/airflow/cli/cli_config.py", line 49,
in command
return func(*args, **kwargs)
File
"/opt/airflow/airflow-core/src/airflow/utils/providers_configuration_loader.py",
line 55, in wrapped_function
return func(*args, **kwargs)
File
"/opt/airflow/airflow-core/src/airflow/cli/commands/remote_commands/dag_command.py",
line 226, in dag_dependencies_show
for dag_id, dag_dependencies in
SerializedDagModel.get_dag_dependencies().items()
File "/opt/airflow/airflow-core/src/airflow/utils/session.py", line 101,
in wrapper
return func(*args, session=session, **kwargs)
File "/opt/airflow/airflow-core/src/airflow/models/serialized_dag.py",
line 680, in get_dag_dependencies
dag_depdendencies_by_dag = resolver.resolve()
File "/opt/airflow/airflow-core/src/airflow/models/serialized_dag.py",
line 94, in resolve
dag_deps.extend(self.resolve_asset_name_ref_dag_dep(dep_data))
File "/opt/airflow/airflow-core/src/airflow/models/serialized_dag.py",
line 180, in resolve_asset_name_ref_dag_dep
asset_id, asset_name = self.asset_ref_name_to_asset_id_name[dep_id]
KeyError: 'asset11_producer'
### What you think should happen instead?
_No response_
### How to reproduce
Have the below dag file and run the CLI command 'airflow dags
show-dependencies'
```python
from __future__ import annotations
from airflow.decorators import dag, task
from airflow.sdk import Asset
from airflow.sdk.definitions.asset.decorators import asset
@asset(uri="s3://bucket/asset11_producer", schedule=None)
def producer1():
pass
@asset(uri="s3://bucket/asset2_producer", schedule=None)
def producer2():
pass
@asset(uri="abc", schedule=None)
def producer3():
pass
@dag(
schedule=Asset.ref(name="asset11_producer") &
Asset.ref(name="asset2_producer"),
catchup=False,
tags=["asset"],
)
def consumer():
@task()
def process_nothing(triggering_asset_events):
for a, events in triggering_asset_events.items():
print(a.name, events)
consumer()
```
### Operating System
Linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other
### 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]