AzureDevOpsGitDagBundle

DAG bundle that clones Azure DevOps Git repos with Entra ID auth.

class airflow.providers.git_azure.bundles.git_azure.AzureDevOpsGitDagBundle(*, tracking_ref: str | None = None, git_conn_id: str | None = None, repo_url: str | None = None, **kwargs)

Bases: GitDagBundle

Transparent Git DAG bundle that adds Entra ID workload-identity auth for Azure DevOps.

Behaves exactly like GitDagBundle — GitHub URLs, PAT-based connections, and SSH-key connections work unchanged. Only when the repository URL is an Azure DevOps HTTPS URL and the connection carries no credential of its own does every clone/fetch inject a freshly minted Entra ID access token obtained through the pod’s workload identity (see AzureDevOpsGitHook).

In that case the connection referenced by git_conn_id only needs the repository URL as its host, e.g.:

https://dev.azure.com/<org>/<project>/_git/<repo>

Accepts the same parameters as GitDagBundle, with one difference: tracking_ref may also come from the connection. A tracking_ref key in the connection’s extra overrides the bundle-config value, so a single deployed bundle config can track a different branch/tag per Airflow instance by editing only the connection. The config kwarg is therefore optional — it is an error only if neither source provides a value.

initialize() → None

Clone or fetch the bundle, converting clone/fetch failures to AirflowException.

Raises:

AirflowException – If the underlying clone/fetch fails (e.g. repo not found, auth rejected, or a git checkout error).

view_url_template() → str | None

Return the “view on web” URL template, adding Azure DevOps support.

Returns:

A URL template with a {version} placeholder, or None if the repo URL isn’t a recognized host.

Return type:

str | None