ephraimbuddy commented on code in PR #46253:
URL: https://github.com/apache/airflow/pull/46253#discussion_r1936972130
##########
airflow/dag_processing/bundles/git.py:
##########
@@ -165,12 +169,17 @@ def _clone_bare_repo_if_required(self) -> None:
raise AirflowException(f"Connection {self.git_conn_id} doesn't
have a host url")
if not os.path.exists(self.bare_repo_path):
self.log.info("Cloning bare repository to %s", self.bare_repo_path)
- Repo.clone_from(
- url=self.repo_url,
- to_path=self.bare_repo_path,
- bare=True,
- env=self.hook.env,
- )
+ try:
+ Repo.clone_from(
+ url=self.repo_url,
+ to_path=self.bare_repo_path,
+ bare=True,
+ env=self.hook.env,
+ )
+ except GitCommandError as e:
+ # log the error to appear in dag-processor stdout and raise
exception to appear
+ # in the dag-processor logs
Review Comment:
```suggestion
```
--
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]