ephraimbuddy commented on code in PR #52876:
URL: https://github.com/apache/airflow/pull/52876#discussion_r2194646942
##########
providers/git/src/airflow/providers/git/bundles/git.py:
##########
@@ -218,32 +217,53 @@ def _convert_git_ssh_url_to_https(url: str) -> str:
return f"{domain}/{repo_path}"
def view_url(self, version: str | None = None) -> str | None:
+ """
+ Return a URL for viewing the DAGs in the repository.
+
+ This method is deprecated and will be removed in a future release. Use
`view_url_template` instead.
+ """
if not version:
return None
- url = self.repo_url
- if not url:
+ template = self.view_url_template()
+ if not template:
return None
+ return template.format(version=version)
+
+ def view_url_template(self) -> str | None:
+ if hasattr(self, "_view_url_template") and self._view_url_template:
+ # Backward compatibility for released Airflow versions
Review Comment:
Not really. The released airflow versions don't have `_view_url_template`
attr so using this provider with them will result in attribute error.
--
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]