jolt 0.9.347__tar.gz → 0.9.350__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.
Files changed (97) hide show
  1. {jolt-0.9.347 → jolt-0.9.350}/PKG-INFO +1 -1
  2. {jolt-0.9.347 → jolt-0.9.350}/jolt/graph.py +27 -10
  3. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/git.py +1 -11
  4. jolt-0.9.350/jolt/version.py +1 -0
  5. {jolt-0.9.347 → jolt-0.9.350}/jolt.egg-info/PKG-INFO +1 -1
  6. jolt-0.9.347/jolt/version.py +0 -1
  7. {jolt-0.9.347 → jolt-0.9.350}/README.rst +0 -0
  8. {jolt-0.9.347 → jolt-0.9.350}/jolt/__init__.py +0 -0
  9. {jolt-0.9.347 → jolt-0.9.350}/jolt/__main__.py +0 -0
  10. {jolt-0.9.347 → jolt-0.9.350}/jolt/bin/fstree-darwin-x86_64 +0 -0
  11. {jolt-0.9.347 → jolt-0.9.350}/jolt/bin/fstree-linux-x86_64 +0 -0
  12. {jolt-0.9.347 → jolt-0.9.350}/jolt/cache.py +0 -0
  13. {jolt-0.9.347 → jolt-0.9.350}/jolt/chroot.py +0 -0
  14. {jolt-0.9.347 → jolt-0.9.350}/jolt/cli.py +0 -0
  15. {jolt-0.9.347 → jolt-0.9.350}/jolt/colors.py +0 -0
  16. {jolt-0.9.347 → jolt-0.9.350}/jolt/common_pb2.py +0 -0
  17. {jolt-0.9.347 → jolt-0.9.350}/jolt/common_pb2_grpc.py +0 -0
  18. {jolt-0.9.347 → jolt-0.9.350}/jolt/config.py +0 -0
  19. {jolt-0.9.347 → jolt-0.9.350}/jolt/error.py +0 -0
  20. {jolt-0.9.347 → jolt-0.9.350}/jolt/expires.py +0 -0
  21. {jolt-0.9.347 → jolt-0.9.350}/jolt/filesystem.py +0 -0
  22. {jolt-0.9.347 → jolt-0.9.350}/jolt/hooks.py +0 -0
  23. {jolt-0.9.347 → jolt-0.9.350}/jolt/influence.py +0 -0
  24. {jolt-0.9.347 → jolt-0.9.350}/jolt/inspection.py +0 -0
  25. {jolt-0.9.347 → jolt-0.9.350}/jolt/loader.py +0 -0
  26. {jolt-0.9.347 → jolt-0.9.350}/jolt/log.py +0 -0
  27. {jolt-0.9.347 → jolt-0.9.350}/jolt/manifest.py +0 -0
  28. {jolt-0.9.347 → jolt-0.9.350}/jolt/options.py +0 -0
  29. {jolt-0.9.347 → jolt-0.9.350}/jolt/pkgs/__init__.py +0 -0
  30. {jolt-0.9.347 → jolt-0.9.350}/jolt/pkgs/golang.py +0 -0
  31. {jolt-0.9.347 → jolt-0.9.350}/jolt/pkgs/nodejs.py +0 -0
  32. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/__init__.py +0 -0
  33. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/alias.py +0 -0
  34. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/allure.py +0 -0
  35. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/autoweight.py +0 -0
  36. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/cache.py +0 -0
  37. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/cmake.py +0 -0
  38. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/conan.py +0 -0
  39. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/cxx.py +0 -0
  40. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/cxxinfo.py +0 -0
  41. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/dashboard.py +0 -0
  42. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/debian.py +0 -0
  43. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/docker.py +0 -0
  44. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/email.py +0 -0
  45. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/email.xslt +0 -0
  46. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/environ.py +0 -0
  47. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/gdb.py +0 -0
  48. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/gerrit.py +0 -0
  49. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/golang.py +0 -0
  50. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/googletest.py +0 -0
  51. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/http.py +0 -0
  52. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/junit.py +0 -0
  53. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/logstash.py +0 -0
  54. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/ninja-compdb.py +0 -0
  55. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/ninja.py +0 -0
  56. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/nodejs.py +0 -0
  57. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/paths.py +0 -0
  58. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/podman.py +0 -0
  59. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/python.py +0 -0
  60. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/__init__.py +0 -0
  61. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/administration_pb2.py +0 -0
  62. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/administration_pb2_grpc.py +0 -0
  63. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/log_pb2.py +0 -0
  64. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/log_pb2_grpc.py +0 -0
  65. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/scheduler_pb2.py +0 -0
  66. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/scheduler_pb2_grpc.py +0 -0
  67. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/worker_pb2.py +0 -0
  68. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/remote_execution/worker_pb2_grpc.py +0 -0
  69. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/repo.py +0 -0
  70. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/report.py +0 -0
  71. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/scheduler.py +0 -0
  72. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/selfdeploy.py +0 -0
  73. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/strings.py +0 -0
  74. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/symlinks.py +0 -0
  75. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/telemetry.py +0 -0
  76. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/timeline.py +0 -0
  77. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/volume.py +0 -0
  78. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/yaml-ninja.py +0 -0
  79. {jolt-0.9.347 → jolt-0.9.350}/jolt/plugins/yamltask.py +0 -0
  80. {jolt-0.9.347 → jolt-0.9.350}/jolt/scheduler.py +0 -0
  81. {jolt-0.9.347 → jolt-0.9.350}/jolt/tasks.py +0 -0
  82. {jolt-0.9.347 → jolt-0.9.350}/jolt/templates/cxxexecutable.cmake.template +0 -0
  83. {jolt-0.9.347 → jolt-0.9.350}/jolt/templates/cxxlibrary.cmake.template +0 -0
  84. {jolt-0.9.347 → jolt-0.9.350}/jolt/templates/export.sh.template +0 -0
  85. {jolt-0.9.347 → jolt-0.9.350}/jolt/templates/timeline.html.template +0 -0
  86. {jolt-0.9.347 → jolt-0.9.350}/jolt/timer.py +0 -0
  87. {jolt-0.9.347 → jolt-0.9.350}/jolt/tools.py +0 -0
  88. {jolt-0.9.347 → jolt-0.9.350}/jolt/utils.py +0 -0
  89. {jolt-0.9.347 → jolt-0.9.350}/jolt/version_utils.py +0 -0
  90. {jolt-0.9.347 → jolt-0.9.350}/jolt/xmldom.py +0 -0
  91. {jolt-0.9.347 → jolt-0.9.350}/jolt.egg-info/SOURCES.txt +0 -0
  92. {jolt-0.9.347 → jolt-0.9.350}/jolt.egg-info/dependency_links.txt +0 -0
  93. {jolt-0.9.347 → jolt-0.9.350}/jolt.egg-info/entry_points.txt +0 -0
  94. {jolt-0.9.347 → jolt-0.9.350}/jolt.egg-info/requires.txt +0 -0
  95. {jolt-0.9.347 → jolt-0.9.350}/jolt.egg-info/top_level.txt +0 -0
  96. {jolt-0.9.347 → jolt-0.9.350}/setup.cfg +0 -0
  97. {jolt-0.9.347 → jolt-0.9.350}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jolt
3
- Version: 0.9.347
3
+ Version: 0.9.350
4
4
  Summary: A task executor
5
5
  Home-page: https://github.com/srand/jolt
6
6
  Author: Robert Andersson
@@ -216,7 +216,7 @@ class TaskProxy(object):
216
216
  for c in self.children:
217
217
  if c.is_resource() or c.is_alias():
218
218
  continue
219
- if not c.is_available_locally():
219
+ if not c.is_available_locally(persistent_only=True):
220
220
  return False
221
221
  return True
222
222
 
@@ -335,16 +335,32 @@ class TaskProxy(object):
335
335
  self._download = False
336
336
 
337
337
  def download(self, force=False, session_only=False, persistent_only=False):
338
+ """
339
+ Downloads all artifacts of this task.
340
+
341
+ If the task is not downloadable, the method returns True. Failure to
342
+ download persistent artifacts is considered a failure, and the method
343
+ returns False. Session artifacts are not required to be downloaded.
344
+
345
+ :param force: Force download even if the artifacts are already available.
346
+ :param session_only: Download only session artifacts.
347
+ :param persistent_only: Download only persistent artifacts.
348
+
349
+ """
338
350
  if not force and not self.is_downloadable():
339
351
  return True
352
+ success = True
340
353
  artifacts = self._artifacts
341
- if session_only:
342
- artifacts = list(filter(lambda a: a.is_session(), artifacts))
343
- if persistent_only:
344
- artifacts = list(filter(lambda a: not a.is_session(), artifacts))
345
- if not artifacts:
346
- return True
347
- return all([self.cache.download(artifact, force=force) for artifact in artifacts])
354
+ artifacts_session = list(filter(lambda a: a.is_session(), artifacts))
355
+ artifacts_persistent = list(filter(lambda a: not a.is_session(), artifacts))
356
+ download_all = not session_only and not persistent_only
357
+ if session_only or download_all:
358
+ for artifact in artifacts_session:
359
+ if not self.cache.download(artifact, force=force):
360
+ self.warning("Failed to download session artifact: {}", artifact.identity)
361
+ if persistent_only or download_all:
362
+ success = all([self.cache.download(artifact, force=force) for artifact in artifacts_persistent])
363
+ return success
348
364
 
349
365
  def upload(self, force=False, locked=False, session_only=False, persistent_only=False, artifacts=None):
350
366
  artifacts = artifacts or self._artifacts
@@ -426,9 +442,10 @@ class TaskProxy(object):
426
442
  self.children.extend(n.children)
427
443
  n.ancestors.add(self)
428
444
 
429
- # Exclude transitive alias and resources dependencies
445
+ # Exclude transitive alias and resources dependencies.
446
+ # Workspace resources are included as they may be required by its dependencies.
430
447
  self.children = list(
431
- filter(lambda n: not n.is_alias() and (not n.is_resource() or dag.are_neighbors(self, n)),
448
+ filter(lambda n: (dag.are_neighbors(self, n) or n.is_workspace_resource()) or (not n.is_alias() and not n.is_resource()),
432
449
  utils.unique_list(self.children)))
433
450
 
434
451
  # Prepare workspace resources for this task so that influence can be calculated
@@ -43,7 +43,6 @@ class GitRepository(object):
43
43
  self._tree_hash = {}
44
44
  self._original_head = True
45
45
  self._last_rev = None
46
- self._lock = RLock()
47
46
  self._init_repo()
48
47
 
49
48
  def _init_repo(self):
@@ -77,7 +76,6 @@ class GitRepository(object):
77
76
  def is_indexed(self):
78
77
  return self.is_cloned() and fs.path.exists(self._git_index())
79
78
 
80
- @locked
81
79
  def clone(self):
82
80
  log.info("Cloning into {0}", self.path)
83
81
 
@@ -127,7 +125,6 @@ class GitRepository(object):
127
125
  "Failed to clone repository '{0}'", self.relpath)
128
126
 
129
127
  @utils.cached.instance
130
- @locked
131
128
  def diff_unchecked(self):
132
129
  if not self.is_indexed():
133
130
  return ""
@@ -141,7 +138,6 @@ class GitRepository(object):
141
138
  output_on_error=True,
142
139
  output_rstrip=False)
143
140
 
144
- @locked
145
141
  def diff(self):
146
142
  diff = self.diff_unchecked()
147
143
  dlim = config.getsize("git", "maxdiffsize", "1 MiB")
@@ -151,7 +147,6 @@ class GitRepository(object):
151
147
  .format(self.relpath, len(diff), dlim))
152
148
  return diff
153
149
 
154
- @locked
155
150
  def patch(self, patch):
156
151
  if not patch:
157
152
  return
@@ -162,7 +157,6 @@ class GitRepository(object):
162
157
  log.info("Applying patch to {0}", self.path)
163
158
  self.tools.run("git apply --whitespace=nowarn {patchfile}", patchfile=patchfile)
164
159
 
165
- @locked
166
160
  def head(self):
167
161
  if not self.is_cloned():
168
162
  return None
@@ -206,7 +200,6 @@ class GitRepository(object):
206
200
  output_on_error=True)
207
201
  return tree
208
202
 
209
- @locked
210
203
  def tree_hash(self, rev=None, path="/"):
211
204
  # When rev is None, the caller want the tree hash of the repository's
212
205
  # current workspace state. If no checkout has been made, that would be the
@@ -246,17 +239,14 @@ class GitRepository(object):
246
239
 
247
240
  return value
248
241
 
249
- @locked
250
242
  def clean(self):
251
243
  with self.tools.cwd(self.path):
252
244
  return self.tools.run("git clean -dfx", output_on_error=True)
253
245
 
254
- @locked
255
246
  def reset(self):
256
247
  with self.tools.cwd(self.path):
257
248
  return self.tools.run("git reset --hard", output_on_error=True)
258
249
 
259
- @locked
260
250
  def fetch(self, commit=None):
261
251
  if commit and not self.is_valid_sha(commit):
262
252
  commit = None
@@ -270,7 +260,6 @@ class GitRepository(object):
270
260
  what=commit or refspec or '',
271
261
  output_on_error=True)
272
262
 
273
- @locked
274
263
  def checkout(self, rev, commit=None):
275
264
  if rev == self._last_rev:
276
265
  log.debug("Checkout skipped, already @ {}", rev)
@@ -566,6 +555,7 @@ class Git(WorkspaceResource, FileInfluence):
566
555
  influence = super()._influence()
567
556
  return influence + [self] if self._must_influence() else influence
568
557
 
558
+ @locked
569
559
  @utils.cached.instance
570
560
  def get_influence(self, task):
571
561
  if not self.git.is_cloned():
@@ -0,0 +1 @@
1
+ __version__ = "0.9.350"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jolt
3
- Version: 0.9.347
3
+ Version: 0.9.350
4
4
  Summary: A task executor
5
5
  Home-page: https://github.com/srand/jolt
6
6
  Author: Robert Andersson
@@ -1 +0,0 @@
1
- __version__ = "0.9.347"
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
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
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