prefect-gitlab 0.2.1__tar.gz → 0.2.2__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.
- {prefect-gitlab-0.2.1/prefect_gitlab.egg-info → prefect-gitlab-0.2.2}/PKG-INFO +14 -15
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/README.md +12 -14
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab/_version.py +3 -3
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab/repositories.py +17 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2/prefect_gitlab.egg-info}/PKG-INFO +14 -15
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab.egg-info/requires.txt +1 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/requirements.txt +1 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/tests/test_repositories.py +20 -1
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/LICENSE +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/MANIFEST.in +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab/__init__.py +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab/credentials.py +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab.egg-info/SOURCES.txt +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab.egg-info/dependency_links.txt +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab.egg-info/entry_points.txt +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/prefect_gitlab.egg-info/top_level.txt +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/requirements-dev.txt +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/setup.cfg +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/setup.py +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/tests/test_credentials.py +0 -0
- {prefect-gitlab-0.2.1 → prefect-gitlab-0.2.2}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: prefect-gitlab
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A Prefect collection for working with GitLab repositories.
|
|
5
5
|
Home-page: https://github.com/prefecthq/prefect-gitlab
|
|
6
6
|
Author: Prefect Technologies, Inc.
|
|
@@ -22,6 +22,7 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: prefect>=2.13.5
|
|
24
24
|
Requires-Dist: python-gitlab>=3.12.0
|
|
25
|
+
Requires-Dist: tenacity>=8.2.3
|
|
25
26
|
Provides-Extra: dev
|
|
26
27
|
Requires-Dist: pytest; extra == "dev"
|
|
27
28
|
Requires-Dist: black; extra == "dev"
|
|
@@ -43,18 +44,16 @@ Requires-Dist: pillow; extra == "dev"
|
|
|
43
44
|
|
|
44
45
|
<p align="center">
|
|
45
46
|
<a href="https://pypi.python.org/pypi/prefect-gitlab/" alt="PyPI version">
|
|
46
|
-
<img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-gitlab?color=
|
|
47
|
+
<img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-gitlab?color=26272B&labelColor=090422"></a>
|
|
47
48
|
<a href="https://github.com/prefecthq/prefect-gitlab/" alt="Stars">
|
|
48
|
-
<img src="https://img.shields.io/github/stars/prefecthq/prefect-gitlab?color=
|
|
49
|
+
<img src="https://img.shields.io/github/stars/prefecthq/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
49
50
|
<a href="https://pepy.tech/badge/prefect-gitlab/" alt="Downloads">
|
|
50
|
-
<img src="https://img.shields.io/pypi/dm/prefect-gitlab?color=
|
|
51
|
+
<img src="https://img.shields.io/pypi/dm/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
51
52
|
<a href="https://github.com/prefecthq/prefect-gitlab/pulse" alt="Activity">
|
|
52
|
-
<img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect-gitlab?color=
|
|
53
|
+
<img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
53
54
|
<br>
|
|
54
55
|
<a href="https://prefect-community.slack.com" alt="Slack">
|
|
55
|
-
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=
|
|
56
|
-
<a href="https://discourse.prefect.io/" alt="Discourse">
|
|
57
|
-
<img src="https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse" /></a>
|
|
56
|
+
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=26272B&labelColor=090422&logo=slack" /></a>
|
|
58
57
|
</p>
|
|
59
58
|
|
|
60
59
|
## Welcome!
|
|
@@ -65,11 +64,11 @@ Requires-Dist: pillow; extra == "dev"
|
|
|
65
64
|
|
|
66
65
|
### Python setup
|
|
67
66
|
|
|
68
|
-
Requires an installation of Python 3.
|
|
67
|
+
Requires an installation of Python 3.8 or higher.
|
|
69
68
|
|
|
70
|
-
We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.
|
|
69
|
+
We recommend using a Python virtual environment manager such as pipenv, conda, or virtualenv.
|
|
71
70
|
|
|
72
|
-
This
|
|
71
|
+
This integration is designed to work with Prefect 2.3.0 or higher. For more information about how to use Prefect, please refer to the [Prefect documentation](https://docs.prefect.io/).
|
|
73
72
|
|
|
74
73
|
### Installation
|
|
75
74
|
|
|
@@ -79,13 +78,13 @@ Install `prefect-gitlab` with `pip`:
|
|
|
79
78
|
pip install prefect-gitlab
|
|
80
79
|
```
|
|
81
80
|
|
|
82
|
-
Then, register
|
|
81
|
+
Then, register the [block types](https://docs.prefect.io/concepts/blocks/)) in this integration to view the storage block type on Prefect Cloud:
|
|
83
82
|
|
|
84
83
|
```bash
|
|
85
84
|
prefect block register -m prefect_gitlab
|
|
86
85
|
```
|
|
87
86
|
|
|
88
|
-
Note, to use the `load` method on
|
|
87
|
+
Note, to use the `load` method on a block, you must already have a block document [saved](https://docs.prefect.io/concepts/blocks/).
|
|
89
88
|
|
|
90
89
|
## Creating a GitLab storage block
|
|
91
90
|
|
|
@@ -138,9 +137,9 @@ Finally, enter your repository information in the form and click **Create**:
|
|
|
138
137
|
|
|
139
138
|
If you encounter any bugs while using `prefect-gitlab`, feel free to open an issue in the [prefect-gitlab](https://github.com/prefecthq/prefect-gitlab) repository.
|
|
140
139
|
|
|
141
|
-
If you have any questions or issues while using `prefect-gitlab`, you can find help in
|
|
140
|
+
If you have any questions or issues while using `prefect-gitlab`, you can find help in the [Prefect Slack community](https://prefect.io/slack).
|
|
142
141
|
|
|
143
|
-
Feel free to ⭐️ or watch [`prefect-gitlab`](https://github.com/prefecthq/prefect-gitlab) for updates
|
|
142
|
+
Feel free to ⭐️ or watch [`prefect-gitlab`](https://github.com/prefecthq/prefect-gitlab) for updates!
|
|
144
143
|
|
|
145
144
|
## Development
|
|
146
145
|
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<a href="https://pypi.python.org/pypi/prefect-gitlab/" alt="PyPI version">
|
|
5
|
-
<img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-gitlab?color=
|
|
5
|
+
<img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-gitlab?color=26272B&labelColor=090422"></a>
|
|
6
6
|
<a href="https://github.com/prefecthq/prefect-gitlab/" alt="Stars">
|
|
7
|
-
<img src="https://img.shields.io/github/stars/prefecthq/prefect-gitlab?color=
|
|
7
|
+
<img src="https://img.shields.io/github/stars/prefecthq/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
8
8
|
<a href="https://pepy.tech/badge/prefect-gitlab/" alt="Downloads">
|
|
9
|
-
<img src="https://img.shields.io/pypi/dm/prefect-gitlab?color=
|
|
9
|
+
<img src="https://img.shields.io/pypi/dm/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
10
10
|
<a href="https://github.com/prefecthq/prefect-gitlab/pulse" alt="Activity">
|
|
11
|
-
<img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect-gitlab?color=
|
|
11
|
+
<img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
12
12
|
<br>
|
|
13
13
|
<a href="https://prefect-community.slack.com" alt="Slack">
|
|
14
|
-
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=
|
|
15
|
-
<a href="https://discourse.prefect.io/" alt="Discourse">
|
|
16
|
-
<img src="https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse" /></a>
|
|
14
|
+
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=26272B&labelColor=090422&logo=slack" /></a>
|
|
17
15
|
</p>
|
|
18
16
|
|
|
19
17
|
## Welcome!
|
|
@@ -24,11 +22,11 @@
|
|
|
24
22
|
|
|
25
23
|
### Python setup
|
|
26
24
|
|
|
27
|
-
Requires an installation of Python 3.
|
|
25
|
+
Requires an installation of Python 3.8 or higher.
|
|
28
26
|
|
|
29
|
-
We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.
|
|
27
|
+
We recommend using a Python virtual environment manager such as pipenv, conda, or virtualenv.
|
|
30
28
|
|
|
31
|
-
This
|
|
29
|
+
This integration is designed to work with Prefect 2.3.0 or higher. For more information about how to use Prefect, please refer to the [Prefect documentation](https://docs.prefect.io/).
|
|
32
30
|
|
|
33
31
|
### Installation
|
|
34
32
|
|
|
@@ -38,13 +36,13 @@ Install `prefect-gitlab` with `pip`:
|
|
|
38
36
|
pip install prefect-gitlab
|
|
39
37
|
```
|
|
40
38
|
|
|
41
|
-
Then, register
|
|
39
|
+
Then, register the [block types](https://docs.prefect.io/concepts/blocks/)) in this integration to view the storage block type on Prefect Cloud:
|
|
42
40
|
|
|
43
41
|
```bash
|
|
44
42
|
prefect block register -m prefect_gitlab
|
|
45
43
|
```
|
|
46
44
|
|
|
47
|
-
Note, to use the `load` method on
|
|
45
|
+
Note, to use the `load` method on a block, you must already have a block document [saved](https://docs.prefect.io/concepts/blocks/).
|
|
48
46
|
|
|
49
47
|
## Creating a GitLab storage block
|
|
50
48
|
|
|
@@ -97,9 +95,9 @@ Finally, enter your repository information in the form and click **Create**:
|
|
|
97
95
|
|
|
98
96
|
If you encounter any bugs while using `prefect-gitlab`, feel free to open an issue in the [prefect-gitlab](https://github.com/prefecthq/prefect-gitlab) repository.
|
|
99
97
|
|
|
100
|
-
If you have any questions or issues while using `prefect-gitlab`, you can find help in
|
|
98
|
+
If you have any questions or issues while using `prefect-gitlab`, you can find help in the [Prefect Slack community](https://prefect.io/slack).
|
|
101
99
|
|
|
102
|
-
Feel free to ⭐️ or watch [`prefect-gitlab`](https://github.com/prefecthq/prefect-gitlab) for updates
|
|
100
|
+
Feel free to ⭐️ or watch [`prefect-gitlab`](https://github.com/prefecthq/prefect-gitlab) for updates!
|
|
103
101
|
|
|
104
102
|
## Development
|
|
105
103
|
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "
|
|
11
|
+
"date": "2024-02-07T14:31:34-0500",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.2.
|
|
14
|
+
"full-revisionid": "9cd1a3e9ec4f374db98d832ea60d0acba6a416f7",
|
|
15
|
+
"version": "0.2.2"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -52,6 +52,7 @@ from prefect.filesystems import ReadableDeploymentStorage
|
|
|
52
52
|
from prefect.utilities.asyncutils import sync_compatible
|
|
53
53
|
from prefect.utilities.processutils import run_process
|
|
54
54
|
from pydantic import VERSION as PYDANTIC_VERSION
|
|
55
|
+
from tenacity import retry, stop_after_attempt, wait_fixed, wait_random
|
|
55
56
|
|
|
56
57
|
if PYDANTIC_VERSION.startswith("2."):
|
|
57
58
|
from pydantic.v1 import Field, HttpUrl, validator
|
|
@@ -60,6 +61,13 @@ else:
|
|
|
60
61
|
|
|
61
62
|
from prefect_gitlab.credentials import GitLabCredentials
|
|
62
63
|
|
|
64
|
+
# Create get_directory retry settings
|
|
65
|
+
|
|
66
|
+
MAX_CLONE_ATTEMPTS = 3
|
|
67
|
+
CLONE_RETRY_MIN_DELAY_SECONDS = 1
|
|
68
|
+
CLONE_RETRY_MIN_DELAY_JITTER_SECONDS = 0
|
|
69
|
+
CLONE_RETRY_MAX_DELAY_JITTER_SECONDS = 3
|
|
70
|
+
|
|
63
71
|
|
|
64
72
|
class GitLabRepository(ReadableDeploymentStorage):
|
|
65
73
|
"""
|
|
@@ -153,6 +161,15 @@ class GitLabRepository(ReadableDeploymentStorage):
|
|
|
153
161
|
return str(content_source), str(content_destination)
|
|
154
162
|
|
|
155
163
|
@sync_compatible
|
|
164
|
+
@retry(
|
|
165
|
+
stop=stop_after_attempt(MAX_CLONE_ATTEMPTS),
|
|
166
|
+
wait=wait_fixed(CLONE_RETRY_MIN_DELAY_SECONDS)
|
|
167
|
+
+ wait_random(
|
|
168
|
+
CLONE_RETRY_MIN_DELAY_JITTER_SECONDS,
|
|
169
|
+
CLONE_RETRY_MAX_DELAY_JITTER_SECONDS,
|
|
170
|
+
),
|
|
171
|
+
reraise=True,
|
|
172
|
+
)
|
|
156
173
|
async def get_directory(
|
|
157
174
|
self, from_path: Optional[str] = None, local_path: Optional[str] = None
|
|
158
175
|
) -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: prefect-gitlab
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A Prefect collection for working with GitLab repositories.
|
|
5
5
|
Home-page: https://github.com/prefecthq/prefect-gitlab
|
|
6
6
|
Author: Prefect Technologies, Inc.
|
|
@@ -22,6 +22,7 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: prefect>=2.13.5
|
|
24
24
|
Requires-Dist: python-gitlab>=3.12.0
|
|
25
|
+
Requires-Dist: tenacity>=8.2.3
|
|
25
26
|
Provides-Extra: dev
|
|
26
27
|
Requires-Dist: pytest; extra == "dev"
|
|
27
28
|
Requires-Dist: black; extra == "dev"
|
|
@@ -43,18 +44,16 @@ Requires-Dist: pillow; extra == "dev"
|
|
|
43
44
|
|
|
44
45
|
<p align="center">
|
|
45
46
|
<a href="https://pypi.python.org/pypi/prefect-gitlab/" alt="PyPI version">
|
|
46
|
-
<img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-gitlab?color=
|
|
47
|
+
<img alt="PyPI" src="https://img.shields.io/pypi/v/prefect-gitlab?color=26272B&labelColor=090422"></a>
|
|
47
48
|
<a href="https://github.com/prefecthq/prefect-gitlab/" alt="Stars">
|
|
48
|
-
<img src="https://img.shields.io/github/stars/prefecthq/prefect-gitlab?color=
|
|
49
|
+
<img src="https://img.shields.io/github/stars/prefecthq/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
49
50
|
<a href="https://pepy.tech/badge/prefect-gitlab/" alt="Downloads">
|
|
50
|
-
<img src="https://img.shields.io/pypi/dm/prefect-gitlab?color=
|
|
51
|
+
<img src="https://img.shields.io/pypi/dm/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
51
52
|
<a href="https://github.com/prefecthq/prefect-gitlab/pulse" alt="Activity">
|
|
52
|
-
<img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect-gitlab?color=
|
|
53
|
+
<img src="https://img.shields.io/github/commit-activity/m/prefecthq/prefect-gitlab?color=26272B&labelColor=090422" /></a>
|
|
53
54
|
<br>
|
|
54
55
|
<a href="https://prefect-community.slack.com" alt="Slack">
|
|
55
|
-
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=
|
|
56
|
-
<a href="https://discourse.prefect.io/" alt="Discourse">
|
|
57
|
-
<img src="https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse" /></a>
|
|
56
|
+
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=26272B&labelColor=090422&logo=slack" /></a>
|
|
58
57
|
</p>
|
|
59
58
|
|
|
60
59
|
## Welcome!
|
|
@@ -65,11 +64,11 @@ Requires-Dist: pillow; extra == "dev"
|
|
|
65
64
|
|
|
66
65
|
### Python setup
|
|
67
66
|
|
|
68
|
-
Requires an installation of Python 3.
|
|
67
|
+
Requires an installation of Python 3.8 or higher.
|
|
69
68
|
|
|
70
|
-
We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.
|
|
69
|
+
We recommend using a Python virtual environment manager such as pipenv, conda, or virtualenv.
|
|
71
70
|
|
|
72
|
-
This
|
|
71
|
+
This integration is designed to work with Prefect 2.3.0 or higher. For more information about how to use Prefect, please refer to the [Prefect documentation](https://docs.prefect.io/).
|
|
73
72
|
|
|
74
73
|
### Installation
|
|
75
74
|
|
|
@@ -79,13 +78,13 @@ Install `prefect-gitlab` with `pip`:
|
|
|
79
78
|
pip install prefect-gitlab
|
|
80
79
|
```
|
|
81
80
|
|
|
82
|
-
Then, register
|
|
81
|
+
Then, register the [block types](https://docs.prefect.io/concepts/blocks/)) in this integration to view the storage block type on Prefect Cloud:
|
|
83
82
|
|
|
84
83
|
```bash
|
|
85
84
|
prefect block register -m prefect_gitlab
|
|
86
85
|
```
|
|
87
86
|
|
|
88
|
-
Note, to use the `load` method on
|
|
87
|
+
Note, to use the `load` method on a block, you must already have a block document [saved](https://docs.prefect.io/concepts/blocks/).
|
|
89
88
|
|
|
90
89
|
## Creating a GitLab storage block
|
|
91
90
|
|
|
@@ -138,9 +137,9 @@ Finally, enter your repository information in the form and click **Create**:
|
|
|
138
137
|
|
|
139
138
|
If you encounter any bugs while using `prefect-gitlab`, feel free to open an issue in the [prefect-gitlab](https://github.com/prefecthq/prefect-gitlab) repository.
|
|
140
139
|
|
|
141
|
-
If you have any questions or issues while using `prefect-gitlab`, you can find help in
|
|
140
|
+
If you have any questions or issues while using `prefect-gitlab`, you can find help in the [Prefect Slack community](https://prefect.io/slack).
|
|
142
141
|
|
|
143
|
-
Feel free to ⭐️ or watch [`prefect-gitlab`](https://github.com/prefecthq/prefect-gitlab) for updates
|
|
142
|
+
Feel free to ⭐️ or watch [`prefect-gitlab`](https://github.com/prefecthq/prefect-gitlab) for updates!
|
|
144
143
|
|
|
145
144
|
## Development
|
|
146
145
|
|
|
@@ -15,7 +15,7 @@ else:
|
|
|
15
15
|
|
|
16
16
|
import prefect_gitlab
|
|
17
17
|
from prefect_gitlab.credentials import GitLabCredentials
|
|
18
|
-
from prefect_gitlab.repositories import GitLabRepository
|
|
18
|
+
from prefect_gitlab.repositories import GitLabRepository # noqa: E402
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class TestGitLab:
|
|
@@ -243,3 +243,22 @@ class TestGitLab:
|
|
|
243
243
|
|
|
244
244
|
assert set(os.listdir(tmp_dst)) == set([sub_dir_name])
|
|
245
245
|
assert set(os.listdir(Path(tmp_dst) / sub_dir_name)) == child_contents
|
|
246
|
+
|
|
247
|
+
async def test_get_directory_retries(self, monkeypatch):
|
|
248
|
+
# Constants for the retry decorator
|
|
249
|
+
MAX_CLONE_ATTEMPTS = 3
|
|
250
|
+
|
|
251
|
+
# Create an instance of GitLabRepository
|
|
252
|
+
g = GitLabRepository(repository="https://gitlab.com/prefectHQ/prefect.git")
|
|
253
|
+
|
|
254
|
+
# Prepare a MagicMock to simulate the process call within get_directory
|
|
255
|
+
mock = AsyncMock()
|
|
256
|
+
mock.return_value = AsyncMock(returncode=1) # Simulate failure
|
|
257
|
+
monkeypatch.setattr(prefect_gitlab.repositories, "run_process", mock)
|
|
258
|
+
|
|
259
|
+
# Call get_directory and expect it to raise a RetryError after maximum attempts
|
|
260
|
+
with pytest.raises(OSError):
|
|
261
|
+
await g.get_directory()
|
|
262
|
+
print(mock.call_count)
|
|
263
|
+
# Verify that the function retried the expected number of times
|
|
264
|
+
assert mock.call_count == MAX_CLONE_ATTEMPTS
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|