jason810496 commented on PR #46484:
URL: https://github.com/apache/airflow/pull/46484#issuecomment-2667919187
Hi @pierrejeambrun,
Do I need to configure `DagBundlesManager` explicitly to set
`("dag_processor", "dag_bundle_config_list")`?
I'm encountering the following error when running the `test_dag_run` test:
```
| File
"/opt/airflow/airflow/api_fastapi/core_api/datamodels/dag_versions.py", line
43, in bundle_url
| return DagBundlesManager().view_url(self.bundle_name,
self.bundle_version)
| File "/opt/airflow/airflow/dag_processing/bundles/manager.py", line
144, in view_url
| bundle = self.get_bundle(name, version)
| File "/opt/airflow/airflow/dag_processing/bundles/manager.py", line
130, in get_bundle
| raise ValueError(f"Requested bundle '{name}' is not configured.")
| ValueError: Requested bundle 'dag_maker' is not configured.
```
I checked `test_dag_versions.py` but didn’t find any additional
configurations for `DagBundlesManager`. However, in `test_dag_versions`,
`DagBundlesManager._bundle_config` does contain the `dag_maker` key, whereas in
`test_dag_run`, it does not.
Comparing `conf.getjson("dag_processor", "dag_bundle_config_list")` in both
tests:
**`test_versions` output:**
```
bundle_name: another_bundle_name, bundle_version: some_commit_hash
backends
[{'classpath': 'airflow.dag_processing.bundles.git.GitDagBundle',
'kwargs': {'refresh_interval': 0, 'subdir': 'dags', 'tracking_ref':
'main'},
'name': 'dag_maker'},
{'classpath': 'airflow.dag_processing.bundles.git.GitDagBundle',
'kwargs': {'refresh_interval': 0, 'subdir': 'dags', 'tracking_ref':
'main'},
'name': 'another_bundle_name'}]
```
**`test_dag_run` output:**
```
bundle_name: dag_maker, bundle_version: None
backends
[{'classpath': 'airflow.dag_processing.bundles.local.LocalDagBundle',
'kwargs': {},
'name': 'dags-folder'}]
[2025-02-19T08:25:53.289+0000] {manager.py:101} INFO - DAG bundles loaded:
dags-folder, example_dags
_bundle_config
{'dags-folder': (<class
'airflow.dag_processing.bundles.local.LocalDagBundle'>,
{}),
'example_dags': (<class
'airflow.dag_processing.bundles.local.LocalDagBundle'>,
{'path': '/opt/airflow/airflow/example_dags'})}
FAILED
```
I even tried explicitly setting `("dag_processor",
"dag_bundle_config_list")` using `conf_vars`, but the configuration still does
not include `dag_maker` for `bundle_name`.
Would appreciate any guidance on this—thanks!
--
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]