jedcunningham commented on code in PR #61343:
URL: https://github.com/apache/airflow/pull/61343#discussion_r2757512109
##########
providers/git/src/airflow/providers/git/bundles/git.py:
##########
@@ -99,9 +99,17 @@ def __init__(
self.hook: GitHook | None = None
try:
self.hook = GitHook(git_conn_id=git_conn_id or "git_default",
repo_url=self.repo_url)
- except Exception:
- # re raise so exception propagates immediately with clear error
message
- raise
+ except Exception as e:
+ if not self.repo_url:
+ # when repo_url is not provided, we need the connection to get
it and if we fail here, we raise
+ raise
+ # if repo_url is provided, connection can be optional for auth, so
we log and continue to enable
+ # public repos to work without connection
+ self._log.info(
+ "Could not create GitHook, proceeding without authentication
for public repository",
Review Comment:
LGTM.
--
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]