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

   ### Apache Airflow Provider(s)
   
   git
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==9.14.0
   apache-airflow-providers-common-compat==1.7.4
   apache-airflow-providers-common-io==1.6.3
   apache-airflow-providers-common-sql==1.28.1
   apache-airflow-providers-elasticsearch==6.3.3
   apache-airflow-providers-fab==2.4.3
   apache-airflow-providers-git==0.0.8
   apache-airflow-providers-http==5.3.4
   apache-airflow-providers-postgres==6.3.0
   apache-airflow-providers-samba==4.11.0
   apache-airflow-providers-smtp==2.3.0
   apache-airflow-providers-ssh==4.1.4
   apache-airflow-providers-standard==1.8.0
   
   ### Apache Airflow version
   
   3.1.0
   
   ### Operating System
   
   Debian 12.12
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   After upgrading to Airflow **3.1.0** and the Git provider **0.8.0**, I 
started seeing errors in the logs when DAG bundles are refreshed.
   
   The error message is:
   
   ```
   Sep 27 07:37:21 fondor airflow[1695637]: Traceback (most recent call last):
     File 
"/opt/airflow/venv/lib/python3.11/site-packages/airflow/dag_processing/manager.py",
 line 508, in _refresh_dag_bundles
       bundle.initialize()
     File 
"/opt/airflow/venv/lib/python3.11/site-packages/airflow/providers/git/bundles/git.py",
 line 112, in initialize
       raise AirflowException(f"Connection {self.git_conn_id} doesn't have a 
host url")
   airflow.exceptions.AirflowException: Connection git_dags_bundle doesn't have 
a host url
   Sep 27 07:37:26 fondor airflow[1695637]: [2025-09-27T11:37:26.687021Z] 
{manager.py:536} INFO - Not time to refresh bundle dags-folder
   Sep 27 07:37:26 fondor airflow[1695637]: [2025-09-27T11:37:26.687228Z] 
{manager.py:510} ERROR - Error initializing bundle thehub_git_repo: Connection 
git_dags_bundle doesn't have a host url
   ```
   
   This happens systematically after the upgrade and prevents the bundle from 
initializing properly.
   
   
   ### What you think should happen instead
   
   The Git bundle should initialize successfully using the configured Airflow 
connection.
   
   When the scheduler refreshes DAG bundles, the `git_dags_bundle` connection 
should be resolved properly, and the repository `thehub_git_repo` should be 
cloned or updated without raising an exception about a missing host URL.
   
   In short: the bundle should load the DAGs normally after the upgrade, 
without errors in the logs.
   
   
   ### How to reproduce
   
   Configure Airflow with the following `airflow.cfg` snippet:
   
   ```
   [dag_processor]
   dag_bundle_config_list = [
         {
           "name": "dags-folder",
           "classpath": "airflow.dag_processing.bundles.local.LocalDagBundle",
           "kwargs": {}
         },
         {
           "name": "thehub_git_repo",
           "classpath": "airflow.providers.git.bundles.git.GitDagBundle",
           "kwargs": {"tracking_ref": "main",
                      "subdir": "dags",
                      "git_conn_id": "git_dags_bundle"
                     }
         }
       ]
   ```
   
   Then create a connection named `git_dags_bundle` in Airflow, with the 
**repository URL properly configured** along with authentication details.
   
   After restarting the scheduler with this setup, the error appears in the 
logs.
   
   
   ### Anything else
   
   This configuration was working correctly with Airflow 3.0.6
   
   ### 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