vantage6-node 4.3.4__tar.gz → 4.4.0__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.
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/PKG-INFO +1 -1
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/_version.py +1 -1
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/docker/task_manager.py +30 -11
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6_node.egg-info/PKG-INFO +1 -1
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6_node.egg-info/requires.txt +3 -3
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/setup.cfg +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/setup.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/tests/__init__.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/tests/test_ssh_tunnel.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/__build__ +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/__init__.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/cli/__init__.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/cli/node.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/context.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/docker/docker_base.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/docker/docker_manager.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/docker/exceptions.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/docker/squid.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/docker/ssh_tunnel.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/docker/vpn_manager.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/globals.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/proxy_server.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/socket.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/util/__init__.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6/node/util/colorer.py +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6_node.egg-info/SOURCES.txt +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6_node.egg-info/dependency_links.txt +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6_node.egg-info/entry_points.txt +0 -0
- {vantage6-node-4.3.4 → vantage6-node-4.4.0}/vantage6_node.egg-info/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ with open(os.path.join(here, "__build__")) as fp:
|
|
|
7
7
|
__build__ = json.load(fp)
|
|
8
8
|
|
|
9
9
|
# Module version
|
|
10
|
-
version_info = (4,
|
|
10
|
+
version_info = (4, 4, 0, "final", __build__, 0)
|
|
11
11
|
|
|
12
12
|
# Module version stage suffix map
|
|
13
13
|
_specifier_ = {"alpha": "a", "beta": "b", "candidate": "rc", "final": ""}
|
|
@@ -183,21 +183,39 @@ class DockerTaskManager(DockerBaseManager):
|
|
|
183
183
|
results = fp.read()
|
|
184
184
|
return results
|
|
185
185
|
|
|
186
|
-
def pull(self):
|
|
187
|
-
"""
|
|
186
|
+
def pull(self, local_exists: bool) -> None:
|
|
187
|
+
"""
|
|
188
|
+
Pull the latest docker image.
|
|
189
|
+
|
|
190
|
+
Parameters
|
|
191
|
+
----------
|
|
192
|
+
local_exists: bool
|
|
193
|
+
Whether the image already exists locally
|
|
194
|
+
|
|
195
|
+
Raises
|
|
196
|
+
------
|
|
197
|
+
PermanentAlgorithmStartFail
|
|
198
|
+
If the image could not be pulled and does not exist locally
|
|
199
|
+
"""
|
|
188
200
|
try:
|
|
189
201
|
self.log.info(f"Retrieving latest image: '{self.image}'")
|
|
190
202
|
self.docker.images.pull(self.image)
|
|
191
203
|
except docker.errors.APIError as e:
|
|
192
|
-
self.log.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
204
|
+
self.log.warning("Failed to pull image: could not find image")
|
|
205
|
+
if not local_exists:
|
|
206
|
+
self.log.exception(e)
|
|
207
|
+
self.status = TaskStatus.NO_DOCKER_IMAGE
|
|
208
|
+
raise PermanentAlgorithmStartFail
|
|
209
|
+
else:
|
|
210
|
+
self.log.info("Using local image")
|
|
196
211
|
except Exception as e:
|
|
197
|
-
self.log.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
212
|
+
self.log.warning("Failed to pull image")
|
|
213
|
+
if not local_exists:
|
|
214
|
+
self.log.exception(e)
|
|
215
|
+
self.status = TaskStatus.FAILED
|
|
216
|
+
raise PermanentAlgorithmStartFail
|
|
217
|
+
else:
|
|
218
|
+
self.log.info("Using local image")
|
|
201
219
|
|
|
202
220
|
def run(
|
|
203
221
|
self,
|
|
@@ -272,7 +290,8 @@ class DockerTaskManager(DockerBaseManager):
|
|
|
272
290
|
helper_container_name = container_name + "-helper"
|
|
273
291
|
|
|
274
292
|
# Try to pull the latest image
|
|
275
|
-
self.
|
|
293
|
+
local_exists = len(self.docker.images.list(name=self.image)) > 0
|
|
294
|
+
self.pull(local_exists=local_exists)
|
|
276
295
|
|
|
277
296
|
# remove algorithm containers if they were already running
|
|
278
297
|
self.log.debug("Check if algorithm container is already running")
|
|
@@ -4,9 +4,9 @@ gevent==23.9.1
|
|
|
4
4
|
jinja2==3.1.3
|
|
5
5
|
python-socketio==5.7.2
|
|
6
6
|
requests==2.31.0
|
|
7
|
-
vantage6==4.
|
|
8
|
-
vantage6-client==4.
|
|
9
|
-
vantage6-algorithm-tools==4.
|
|
7
|
+
vantage6==4.4.0
|
|
8
|
+
vantage6-client==4.4.0
|
|
9
|
+
vantage6-algorithm-tools==4.4.0
|
|
10
10
|
|
|
11
11
|
[dev]
|
|
12
12
|
coverage==6.4.4
|
|
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
|
|
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
|