apache-airflow-providers-git 0.0.5__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of apache-airflow-providers-git might be problematic. Click here for more details.
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/PKG-INFO +6 -6
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/README.rst +3 -3
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/changelog.rst +11 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/index.rst +1 -1
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/provider.yaml +2 -1
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/pyproject.toml +3 -3
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/git/__init__.py +1 -1
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/git/bundles/git.py +34 -10
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/unit/git/bundles/test_git.py +95 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/.latest-doc-only-change.txt +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/bundles/index.rst +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/commits.rst +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/conf.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/connections/git.rst +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/installing-providers-from-sources.rst +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/security.rst +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/__init__.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/__init__.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/git/LICENSE +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/git/bundles/__init__.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/git/get_provider_info.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/git/hooks/__init__.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/git/hooks/git.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/providers/git/version_compat.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/conftest.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/unit/__init__.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/unit/git/__init__.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/unit/git/bundles/__init__.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/unit/git/hooks/__init__.py +0 -0
- {apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/unit/git/hooks/test_git.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-git
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Provider package apache-airflow-providers-git for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,git,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -23,8 +23,8 @@ Classifier: Topic :: System :: Monitoring
|
|
|
23
23
|
Requires-Dist: apache-airflow>=3.0.0
|
|
24
24
|
Requires-Dist: GitPython>=3.1.44
|
|
25
25
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
26
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.
|
|
27
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.
|
|
26
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.6/changelog.html
|
|
27
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.6
|
|
28
28
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
29
29
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
30
30
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -55,7 +55,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
|
55
55
|
|
|
56
56
|
Package ``apache-airflow-providers-git``
|
|
57
57
|
|
|
58
|
-
Release: ``0.0.
|
|
58
|
+
Release: ``0.0.6``
|
|
59
59
|
|
|
60
60
|
Release Date: ``|PypiReleaseDate|``
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@ This is a provider package for ``git`` provider. All classes for this provider p
|
|
|
69
69
|
are in ``airflow.providers.git`` python package.
|
|
70
70
|
|
|
71
71
|
You can find package information and changelog for the provider
|
|
72
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.
|
|
72
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.6/>`_.
|
|
73
73
|
|
|
74
74
|
Installation
|
|
75
75
|
------------
|
|
@@ -91,5 +91,5 @@ PIP package Version required
|
|
|
91
91
|
================== ==================
|
|
92
92
|
|
|
93
93
|
The changelog for the provider package can be found in the
|
|
94
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.
|
|
94
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.6/changelog.html>`_.
|
|
95
95
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
Package ``apache-airflow-providers-git``
|
|
25
25
|
|
|
26
|
-
Release: ``0.0.
|
|
26
|
+
Release: ``0.0.6``
|
|
27
27
|
|
|
28
28
|
Release Date: ``|PypiReleaseDate|``
|
|
29
29
|
|
|
@@ -37,7 +37,7 @@ This is a provider package for ``git`` provider. All classes for this provider p
|
|
|
37
37
|
are in ``airflow.providers.git`` python package.
|
|
38
38
|
|
|
39
39
|
You can find package information and changelog for the provider
|
|
40
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.
|
|
40
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.6/>`_.
|
|
41
41
|
|
|
42
42
|
Installation
|
|
43
43
|
------------
|
|
@@ -59,4 +59,4 @@ PIP package Version required
|
|
|
59
59
|
================== ==================
|
|
60
60
|
|
|
61
61
|
The changelog for the provider package can be found in the
|
|
62
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.
|
|
62
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.6/changelog.html>`_.
|
{apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/changelog.rst
RENAMED
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
specific language governing permissions and limitations
|
|
16
16
|
under the License.
|
|
17
17
|
|
|
18
|
+
0.0.6
|
|
19
|
+
.....
|
|
20
|
+
|
|
21
|
+
Misc
|
|
22
|
+
~~~~
|
|
23
|
+
|
|
24
|
+
* ``Refactor bundle view_url to not instaniate bundle on server components (#52876)``
|
|
25
|
+
|
|
26
|
+
.. Below changes are excluded from the changelog. Move them to
|
|
27
|
+
appropriate section above if needed. Do not delete the lines(!):
|
|
28
|
+
|
|
18
29
|
0.0.5
|
|
19
30
|
.....
|
|
20
31
|
|
|
@@ -22,12 +22,13 @@ description: |
|
|
|
22
22
|
`Distributed version control system (GIT) <https://git-scm.com/>`__
|
|
23
23
|
|
|
24
24
|
state: ready
|
|
25
|
-
source-date-epoch:
|
|
25
|
+
source-date-epoch: 1754503255
|
|
26
26
|
# Note that those versions are maintained by release manager - do not update them manually
|
|
27
27
|
# with the exception of case where other provider in sources has >= new provider version.
|
|
28
28
|
# In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
|
|
29
29
|
# to be done in the same PR
|
|
30
30
|
versions:
|
|
31
|
+
- 0.0.6
|
|
31
32
|
- 0.0.5
|
|
32
33
|
- 0.0.4
|
|
33
34
|
- 0.0.3
|
|
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
|
25
25
|
|
|
26
26
|
[project]
|
|
27
27
|
name = "apache-airflow-providers-git"
|
|
28
|
-
version = "0.0.
|
|
28
|
+
version = "0.0.6"
|
|
29
29
|
description = "Provider package apache-airflow-providers-git for Apache Airflow"
|
|
30
30
|
readme = "README.rst"
|
|
31
31
|
authors = [
|
|
@@ -95,8 +95,8 @@ apache-airflow-providers-common-sql = {workspace = true}
|
|
|
95
95
|
apache-airflow-providers-standard = {workspace = true}
|
|
96
96
|
|
|
97
97
|
[project.urls]
|
|
98
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.
|
|
99
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.
|
|
98
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.6"
|
|
99
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-git/0.0.6/changelog.html"
|
|
100
100
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
101
101
|
"Source Code" = "https://github.com/apache/airflow"
|
|
102
102
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "0.0.
|
|
32
|
+
__version__ = "0.0.6"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"3.0.0"
|
|
@@ -25,9 +25,7 @@ import structlog
|
|
|
25
25
|
from git import Repo
|
|
26
26
|
from git.exc import BadName, GitCommandError, NoSuchPathError
|
|
27
27
|
|
|
28
|
-
from airflow.dag_processing.bundles.base import
|
|
29
|
-
BaseDagBundle,
|
|
30
|
-
)
|
|
28
|
+
from airflow.dag_processing.bundles.base import BaseDagBundle
|
|
31
29
|
from airflow.exceptions import AirflowException
|
|
32
30
|
from airflow.providers.git.hooks.git import GitHook
|
|
33
31
|
|
|
@@ -215,32 +213,58 @@ class GitDagBundle(BaseDagBundle):
|
|
|
215
213
|
return f"{domain}/{repo_path}"
|
|
216
214
|
|
|
217
215
|
def view_url(self, version: str | None = None) -> str | None:
|
|
216
|
+
"""
|
|
217
|
+
Return a URL for viewing the DAGs in the repository.
|
|
218
|
+
|
|
219
|
+
This method is deprecated and will be removed when the minimum supported Airflow version is 3.1.
|
|
220
|
+
Use `view_url_template` instead.
|
|
221
|
+
"""
|
|
218
222
|
if not version:
|
|
219
223
|
return None
|
|
220
|
-
|
|
221
|
-
if not
|
|
224
|
+
template = self.view_url_template()
|
|
225
|
+
if not template:
|
|
222
226
|
return None
|
|
227
|
+
if not self.subdir:
|
|
228
|
+
# remove {subdir} from the template if subdir is not set
|
|
229
|
+
template = template.replace("/{subdir}", "")
|
|
230
|
+
return template.format(version=version, subdir=self.subdir)
|
|
231
|
+
|
|
232
|
+
def view_url_template(self) -> str | None:
|
|
233
|
+
if hasattr(self, "_view_url_template") and self._view_url_template:
|
|
234
|
+
# Because we use this method in the view_url method, we need to handle
|
|
235
|
+
# backward compatibility for Airflow versions that doesn't have the
|
|
236
|
+
# _view_url_template attribute. Should be removed when we drop support for Airflow 3.0
|
|
237
|
+
return self._view_url_template
|
|
238
|
+
|
|
239
|
+
if not self.repo_url:
|
|
240
|
+
return None
|
|
241
|
+
|
|
242
|
+
url = self.repo_url
|
|
223
243
|
if url.startswith("git@"):
|
|
224
244
|
url = self._convert_git_ssh_url_to_https(url)
|
|
225
245
|
if url.endswith(".git"):
|
|
226
246
|
url = url[:-4]
|
|
247
|
+
|
|
227
248
|
parsed_url = urlparse(url)
|
|
228
249
|
host = parsed_url.hostname
|
|
229
250
|
if not host:
|
|
230
251
|
return None
|
|
252
|
+
|
|
231
253
|
if parsed_url.username or parsed_url.password:
|
|
232
254
|
new_netloc = host
|
|
233
255
|
if parsed_url.port:
|
|
234
256
|
new_netloc += f":{parsed_url.port}"
|
|
235
257
|
url = parsed_url._replace(netloc=new_netloc).geturl()
|
|
258
|
+
|
|
236
259
|
host_patterns = {
|
|
237
|
-
"github.com": f"{url}/tree/{version}",
|
|
238
|
-
"gitlab.com": f"{url}/-/tree/{version}",
|
|
239
|
-
"bitbucket.org": f"{url}/src/{version}",
|
|
260
|
+
"github.com": f"{url}/tree/{{version}}",
|
|
261
|
+
"gitlab.com": f"{url}/-/tree/{{version}}",
|
|
262
|
+
"bitbucket.org": f"{url}/src/{{version}}",
|
|
240
263
|
}
|
|
241
|
-
|
|
242
|
-
host_patterns = {k: f"{v}/{self.subdir}" for k, v in host_patterns.items()}
|
|
264
|
+
|
|
243
265
|
for allowed_host, template in host_patterns.items():
|
|
244
266
|
if host == allowed_host or host.endswith(f".{allowed_host}"):
|
|
267
|
+
if self.subdir:
|
|
268
|
+
return f"{template}/{self.subdir}"
|
|
245
269
|
return template
|
|
246
270
|
return None
|
|
@@ -35,6 +35,7 @@ from airflow.providers.git.bundles.git import GitDagBundle
|
|
|
35
35
|
from airflow.providers.git.hooks.git import GitHook
|
|
36
36
|
|
|
37
37
|
from tests_common.test_utils.config import conf_vars
|
|
38
|
+
from tests_common.test_utils.version_compat import AIRFLOW_V_3_1_PLUS
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
@pytest.fixture(autouse=True)
|
|
@@ -522,6 +523,100 @@ class TestGitDagBundle:
|
|
|
522
523
|
assert view_url == expected_url
|
|
523
524
|
bundle.initialize.assert_not_called()
|
|
524
525
|
|
|
526
|
+
@pytest.mark.skipif(not AIRFLOW_V_3_1_PLUS, reason="Airflow 3.0 does not support view_url_template")
|
|
527
|
+
@pytest.mark.parametrize(
|
|
528
|
+
"repo_url, extra_conn_kwargs, expected_url",
|
|
529
|
+
[
|
|
530
|
+
(
|
|
531
|
+
"git@github.com:apache/airflow.git",
|
|
532
|
+
None,
|
|
533
|
+
"https://github.com/apache/airflow/tree/{version}/subdir",
|
|
534
|
+
),
|
|
535
|
+
(
|
|
536
|
+
"git@github.com:apache/airflow",
|
|
537
|
+
None,
|
|
538
|
+
"https://github.com/apache/airflow/tree/{version}/subdir",
|
|
539
|
+
),
|
|
540
|
+
(
|
|
541
|
+
"https://github.com/apache/airflow",
|
|
542
|
+
None,
|
|
543
|
+
"https://github.com/apache/airflow/tree/{version}/subdir",
|
|
544
|
+
),
|
|
545
|
+
(
|
|
546
|
+
"https://github.com/apache/airflow.git",
|
|
547
|
+
None,
|
|
548
|
+
"https://github.com/apache/airflow/tree/{version}/subdir",
|
|
549
|
+
),
|
|
550
|
+
(
|
|
551
|
+
"git@gitlab.com:apache/airflow.git",
|
|
552
|
+
None,
|
|
553
|
+
"https://gitlab.com/apache/airflow/-/tree/{version}/subdir",
|
|
554
|
+
),
|
|
555
|
+
(
|
|
556
|
+
"git@bitbucket.org:apache/airflow.git",
|
|
557
|
+
None,
|
|
558
|
+
"https://bitbucket.org/apache/airflow/src/{version}/subdir",
|
|
559
|
+
),
|
|
560
|
+
(
|
|
561
|
+
"git@myorg.github.com:apache/airflow.git",
|
|
562
|
+
None,
|
|
563
|
+
"https://myorg.github.com/apache/airflow/tree/{version}/subdir",
|
|
564
|
+
),
|
|
565
|
+
(
|
|
566
|
+
"https://myorg.github.com/apache/airflow.git",
|
|
567
|
+
None,
|
|
568
|
+
"https://myorg.github.com/apache/airflow/tree/{version}/subdir",
|
|
569
|
+
),
|
|
570
|
+
(
|
|
571
|
+
"https://github.com/apache/airflow",
|
|
572
|
+
{"password": "abc123"},
|
|
573
|
+
"https://github.com/apache/airflow/tree/{version}/subdir",
|
|
574
|
+
),
|
|
575
|
+
(
|
|
576
|
+
"https://github.com/apache/airflow",
|
|
577
|
+
{"login": "abc123"},
|
|
578
|
+
"https://github.com/apache/airflow/tree/{version}/subdir",
|
|
579
|
+
),
|
|
580
|
+
(
|
|
581
|
+
"https://github.com/apache/airflow",
|
|
582
|
+
{"login": "abc123", "password": "def456"},
|
|
583
|
+
"https://github.com/apache/airflow/tree/{version}/subdir",
|
|
584
|
+
),
|
|
585
|
+
(
|
|
586
|
+
"https://github.com:443/apache/airflow",
|
|
587
|
+
None,
|
|
588
|
+
"https://github.com:443/apache/airflow/tree/{version}/subdir",
|
|
589
|
+
),
|
|
590
|
+
(
|
|
591
|
+
"https://github.com:443/apache/airflow",
|
|
592
|
+
{"password": "abc123"},
|
|
593
|
+
"https://github.com:443/apache/airflow/tree/{version}/subdir",
|
|
594
|
+
),
|
|
595
|
+
],
|
|
596
|
+
)
|
|
597
|
+
@mock.patch("airflow.providers.git.bundles.git.Repo")
|
|
598
|
+
def test_view_url_template_subdir(
|
|
599
|
+
self, mock_gitrepo, repo_url, extra_conn_kwargs, expected_url, create_connection_without_db
|
|
600
|
+
):
|
|
601
|
+
create_connection_without_db(
|
|
602
|
+
Connection(
|
|
603
|
+
conn_id="git_default",
|
|
604
|
+
host=repo_url,
|
|
605
|
+
conn_type="git",
|
|
606
|
+
**(extra_conn_kwargs or {}),
|
|
607
|
+
)
|
|
608
|
+
)
|
|
609
|
+
bundle = GitDagBundle(
|
|
610
|
+
name="test",
|
|
611
|
+
tracking_ref="main",
|
|
612
|
+
subdir="subdir",
|
|
613
|
+
git_conn_id="git_default",
|
|
614
|
+
)
|
|
615
|
+
bundle.initialize = mock.MagicMock()
|
|
616
|
+
view_url_template = bundle.view_url_template()
|
|
617
|
+
assert view_url_template == expected_url
|
|
618
|
+
bundle.initialize.assert_not_called()
|
|
619
|
+
|
|
525
620
|
@mock.patch("airflow.providers.git.bundles.git.Repo")
|
|
526
621
|
def test_view_url_returns_none_when_no_version_in_view_url(self, mock_gitrepo):
|
|
527
622
|
bundle = GitDagBundle(
|
|
File without changes
|
{apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/bundles/index.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/docs/connections/git.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/src/airflow/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/unit/__init__.py
RENAMED
|
File without changes
|
{apache_airflow_providers_git-0.0.5 → apache_airflow_providers_git-0.0.6}/tests/unit/git/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|