forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GitDagBundle to support https (include 46073/46179) (apache#46226)
- Loading branch information
Showing
3 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2615,7 +2615,6 @@ dag_processor: | |
"classpath": "airflow.dag_processing.bundles.git.GitDagBundle", | ||
"kwargs": { | ||
"subdir": "dags", | ||
"repo_url": "[email protected]:example.com/my-dags.git", | ||
"tracking_ref": "main", | ||
"refresh_interval": 0 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -399,7 +399,8 @@ def test_repo_url_validation_for_ssh(self, mock_hook, repo_url, session): | |
tracking_ref=GIT_DEFAULT_BRANCH, | ||
) | ||
with pytest.raises( | ||
AirflowException, match=f"Invalid git URL: {repo_url}. URL must start with git@ and end with .git" | ||
AirflowException, | ||
match=f"Invalid git URL: {repo_url}. URL must start with git@ or https and end with .git", | ||
): | ||
bundle.initialize() | ||
|
||
|
@@ -413,6 +414,10 @@ def test_repo_url_validation_for_ssh(self, mock_hook, repo_url, session): | |
"[email protected]:apache/airflow.git", | ||
"https://myorg.github.com/apache/airflow/tree/0f0f0f", | ||
), | ||
( | ||
"https://myorg.github.com/apache/airflow.git", | ||
"https://myorg.github.com/apache/airflow/tree/0f0f0f", | ||
), | ||
], | ||
) | ||
@mock.patch("airflow.dag_processing.bundles.git.Repo") | ||
|