jolt 0.9.371__tar.gz → 0.9.381__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 (96) hide show
  1. {jolt-0.9.371 → jolt-0.9.381}/PKG-INFO +1 -1
  2. {jolt-0.9.371 → jolt-0.9.381}/jolt/cli.py +40 -5
  3. {jolt-0.9.371 → jolt-0.9.381}/jolt/loader.py +9 -6
  4. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/docker.py +2 -2
  5. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/gdb.py +4 -1
  6. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/ninja-compdb.py +4 -1
  7. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/podman.py +1 -36
  8. jolt-0.9.381/jolt/version.py +1 -0
  9. {jolt-0.9.371 → jolt-0.9.381}/jolt.egg-info/PKG-INFO +1 -1
  10. jolt-0.9.371/jolt/version.py +0 -1
  11. {jolt-0.9.371 → jolt-0.9.381}/README.rst +0 -0
  12. {jolt-0.9.371 → jolt-0.9.381}/jolt/__init__.py +0 -0
  13. {jolt-0.9.371 → jolt-0.9.381}/jolt/__main__.py +0 -0
  14. {jolt-0.9.371 → jolt-0.9.381}/jolt/bin/fstree-darwin-x86_64 +0 -0
  15. {jolt-0.9.371 → jolt-0.9.381}/jolt/bin/fstree-linux-x86_64 +0 -0
  16. {jolt-0.9.371 → jolt-0.9.381}/jolt/cache.py +0 -0
  17. {jolt-0.9.371 → jolt-0.9.381}/jolt/chroot.py +0 -0
  18. {jolt-0.9.371 → jolt-0.9.381}/jolt/colors.py +0 -0
  19. {jolt-0.9.371 → jolt-0.9.381}/jolt/common_pb2.py +0 -0
  20. {jolt-0.9.371 → jolt-0.9.381}/jolt/common_pb2_grpc.py +0 -0
  21. {jolt-0.9.371 → jolt-0.9.381}/jolt/config.py +0 -0
  22. {jolt-0.9.371 → jolt-0.9.381}/jolt/error.py +0 -0
  23. {jolt-0.9.371 → jolt-0.9.381}/jolt/expires.py +0 -0
  24. {jolt-0.9.371 → jolt-0.9.381}/jolt/filesystem.py +0 -0
  25. {jolt-0.9.371 → jolt-0.9.381}/jolt/graph.py +0 -0
  26. {jolt-0.9.371 → jolt-0.9.381}/jolt/hooks.py +0 -0
  27. {jolt-0.9.371 → jolt-0.9.381}/jolt/influence.py +0 -0
  28. {jolt-0.9.371 → jolt-0.9.381}/jolt/inspection.py +0 -0
  29. {jolt-0.9.371 → jolt-0.9.381}/jolt/log.py +0 -0
  30. {jolt-0.9.371 → jolt-0.9.381}/jolt/manifest.py +0 -0
  31. {jolt-0.9.371 → jolt-0.9.381}/jolt/options.py +0 -0
  32. {jolt-0.9.371 → jolt-0.9.381}/jolt/pkgs/__init__.py +0 -0
  33. {jolt-0.9.371 → jolt-0.9.381}/jolt/pkgs/golang.py +0 -0
  34. {jolt-0.9.371 → jolt-0.9.381}/jolt/pkgs/nodejs.py +0 -0
  35. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/__init__.py +0 -0
  36. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/alias.py +0 -0
  37. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/allure.py +0 -0
  38. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/autoweight.py +0 -0
  39. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/cache.py +0 -0
  40. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/cmake.py +0 -0
  41. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/conan.py +0 -0
  42. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/cxx.py +0 -0
  43. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/cxxinfo.py +0 -0
  44. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/dashboard.py +0 -0
  45. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/email.py +0 -0
  46. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/email.xslt +0 -0
  47. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/environ.py +0 -0
  48. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/gerrit.py +0 -0
  49. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/git.py +0 -0
  50. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/golang.py +0 -0
  51. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/googletest.py +0 -0
  52. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/http.py +0 -0
  53. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/junit.py +0 -0
  54. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/linux.py +0 -0
  55. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/logstash.py +0 -0
  56. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/ninja.py +0 -0
  57. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/nodejs.py +0 -0
  58. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/paths.py +0 -0
  59. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/python.py +0 -0
  60. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/__init__.py +0 -0
  61. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/administration_pb2.py +0 -0
  62. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/administration_pb2_grpc.py +0 -0
  63. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/log_pb2.py +0 -0
  64. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/log_pb2_grpc.py +0 -0
  65. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/scheduler_pb2.py +0 -0
  66. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/scheduler_pb2_grpc.py +0 -0
  67. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/worker_pb2.py +0 -0
  68. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/remote_execution/worker_pb2_grpc.py +0 -0
  69. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/report.py +0 -0
  70. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/scheduler.py +0 -0
  71. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/selfdeploy.py +0 -0
  72. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/strings.py +0 -0
  73. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/symlinks.py +0 -0
  74. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/telemetry.py +0 -0
  75. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/timeline.py +0 -0
  76. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/volume.py +0 -0
  77. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/yaml-ninja.py +0 -0
  78. {jolt-0.9.371 → jolt-0.9.381}/jolt/plugins/yamltask.py +0 -0
  79. {jolt-0.9.371 → jolt-0.9.381}/jolt/scheduler.py +0 -0
  80. {jolt-0.9.371 → jolt-0.9.381}/jolt/tasks.py +0 -0
  81. {jolt-0.9.371 → jolt-0.9.381}/jolt/templates/cxxexecutable.cmake.template +0 -0
  82. {jolt-0.9.371 → jolt-0.9.381}/jolt/templates/cxxlibrary.cmake.template +0 -0
  83. {jolt-0.9.371 → jolt-0.9.381}/jolt/templates/export.sh.template +0 -0
  84. {jolt-0.9.371 → jolt-0.9.381}/jolt/templates/timeline.html.template +0 -0
  85. {jolt-0.9.371 → jolt-0.9.381}/jolt/timer.py +0 -0
  86. {jolt-0.9.371 → jolt-0.9.381}/jolt/tools.py +0 -0
  87. {jolt-0.9.371 → jolt-0.9.381}/jolt/utils.py +0 -0
  88. {jolt-0.9.371 → jolt-0.9.381}/jolt/version_utils.py +0 -0
  89. {jolt-0.9.371 → jolt-0.9.381}/jolt/xmldom.py +0 -0
  90. {jolt-0.9.371 → jolt-0.9.381}/jolt.egg-info/SOURCES.txt +0 -0
  91. {jolt-0.9.371 → jolt-0.9.381}/jolt.egg-info/dependency_links.txt +0 -0
  92. {jolt-0.9.371 → jolt-0.9.381}/jolt.egg-info/entry_points.txt +0 -0
  93. {jolt-0.9.371 → jolt-0.9.381}/jolt.egg-info/requires.txt +0 -0
  94. {jolt-0.9.371 → jolt-0.9.381}/jolt.egg-info/top_level.txt +0 -0
  95. {jolt-0.9.371 → jolt-0.9.381}/setup.cfg +0 -0
  96. {jolt-0.9.371 → jolt-0.9.381}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jolt
3
- Version: 0.9.371
3
+ Version: 0.9.381
4
4
  Summary: A task executor
5
5
  Home-page: https://github.com/srand/jolt
6
6
  Author: Robert Andersson
@@ -18,7 +18,7 @@ from jolt import log
18
18
  from jolt import __version__
19
19
  from jolt.log import logfile
20
20
  from jolt import config
21
- from jolt.loader import JoltLoader
21
+ from jolt.loader import JoltLoader, import_workspace
22
22
  from jolt import tools
23
23
  from jolt import utils
24
24
  from jolt.influence import HashInfluenceRegistry
@@ -216,12 +216,13 @@ def _autocomplete_tasks(ctx, args, incomplete):
216
216
  help="Don't prune cached artifacts from the build graph. This option can be used to populate the local cache with remotely cached dependency artifacts.")
217
217
  @click.option("--worker", is_flag=True, default=False,
218
218
  help="Run with the worker build strategy", hidden=True)
219
+ @click.option("--environ", type=click.Path(), help="Import build environment from protobuf", hidden=True)
219
220
  @click.pass_context
220
221
  @hooks.cli_build
221
222
  def build(ctx, task, network, keep_going, default, local,
222
223
  no_download, no_download_persistent, no_upload, download, upload, worker, force,
223
224
  salt, copy, debug, result, jobs, no_prune, verbose,
224
- mute):
225
+ mute, environ):
225
226
  """
226
227
  Build task artifact.
227
228
 
@@ -253,6 +254,7 @@ def build(ctx, task, network, keep_going, default, local,
253
254
  are removed before execution starts.
254
255
 
255
256
  """
257
+
256
258
  raise_error_if(network and local,
257
259
  "The -n and -l flags are mutually exclusive")
258
260
 
@@ -304,6 +306,33 @@ def build(ctx, task, network, keep_going, default, local,
304
306
  if keep_going:
305
307
  config.set_keep_going(True)
306
308
 
309
+ # Import build environment from protobuf if provided
310
+ buildenv = None
311
+ if environ:
312
+ with open(environ, "rb") as f:
313
+ from jolt import common_pb2 as common_pb
314
+ buildenv = common_pb.BuildEnvironment()
315
+ try:
316
+ buildenv.ParseFromString(f.read())
317
+ except Exception as e:
318
+ raise_error("Failed to parse build environment protobuf: {}", e)
319
+
320
+ # Import log level
321
+ log.set_level_pb(buildenv.loglevel)
322
+
323
+ # Import workspace
324
+ import_workspace(buildenv)
325
+
326
+ # Import configuration snippet
327
+ config.import_config(buildenv.config)
328
+
329
+ # Import configuration parameters (-c params.key)
330
+ config.import_params({param.key: param.value for param in buildenv.parameters})
331
+
332
+ # Import default parameters (-d taskname:param=value)
333
+ default = utils.as_list(default)
334
+ default += buildenv.task_default_parameters
335
+
307
336
  options = JoltOptions(
308
337
  network=network,
309
338
  local=local,
@@ -340,7 +369,7 @@ def build(ctx, task, network, keep_going, default, local,
340
369
 
341
370
  log.info("Started: {}", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
342
371
 
343
- gb = graph.GraphBuilder(registry, acache, options, progress=True)
372
+ gb = graph.GraphBuilder(registry, acache, options, progress=True, buildenv=buildenv)
344
373
  dag = gb.build(task)
345
374
 
346
375
  # If asked to force rebuild, taint all goal tasks
@@ -374,9 +403,11 @@ def build(ctx, task, network, keep_going, default, local,
374
403
  debug=debug)
375
404
 
376
405
  with progress:
406
+ in_progress = set()
407
+
377
408
  while dag.has_tasks() or not queue.empty():
378
409
  # Find all tasks ready to be executed
379
- leafs = dag.select(lambda graph, task: task.is_ready())
410
+ leafs = dag.select(lambda graph, task: task.is_ready() and task not in in_progress)
380
411
 
381
412
  # Order the tasks by their weights to improve build times
382
413
  leafs.sort(key=lambda x: x.weight)
@@ -385,6 +416,7 @@ def build(ctx, task, network, keep_going, default, local,
385
416
  task = leafs.pop()
386
417
  executor = strategy.create_executor(session, task)
387
418
  queue.submit(executor)
419
+ in_progress.add(task)
388
420
 
389
421
  task, error = queue.wait()
390
422
 
@@ -745,13 +777,16 @@ def download(ctx, task, deps, copy, copy_all):
745
777
 
746
778
  try:
747
779
  with log.progress("Progress", dag.number_of_tasks(), " tasks", estimates=False, debug=False) as p:
780
+ in_progress = set()
781
+
748
782
  while dag.has_tasks() or not queue.empty():
749
- leafs = dag.select(lambda graph, task: task.is_ready())
783
+ leafs = dag.select(lambda graph, task: task.is_ready() and task not in in_progress)
750
784
 
751
785
  while leafs:
752
786
  task = leafs.pop()
753
787
  executor = strategy.create_executor({}, task)
754
788
  queue.submit(executor)
789
+ in_progress.add(task)
755
790
 
756
791
  task, error = queue.wait()
757
792
  p.update(1)
@@ -252,6 +252,7 @@ class JoltLoader(object):
252
252
  for factory in _loaders:
253
253
  loader = factory().create(searchpath)
254
254
  for recipe in loader.recipes:
255
+ recipe.workspace_path = os.path.relpath(recipe.path, self.workspace_path)
255
256
  recipe.load()
256
257
  self._recipes.append(recipe)
257
258
  self._tasks += recipe.tasks
@@ -450,6 +451,7 @@ def export_workspace(tasks=None) -> common_pb.Workspace:
450
451
  cache_grpc_uri = config.geturi("cache", "grpc_uri")
451
452
  if fstree_enabled:
452
453
  if not cache_grpc_uri:
454
+ fstree_enabled = False
453
455
  log.warning("No cache gRPC URI configured, will not push workspace to remote cache")
454
456
  else:
455
457
  raise_error_if(cache_grpc_uri.scheme not in ["tcp"], "Invalid scheme in cache gRPC URI config: {}", cache_grpc_uri.scheme)
@@ -542,12 +544,13 @@ def export_workspace(tasks=None) -> common_pb.Workspace:
542
544
  tree=tree,
543
545
  )
544
546
 
545
- for recipe in loader.recipes:
546
- workspace.files.append(
547
- common_pb.File(
548
- path=recipe.basepath,
549
- content=recipe.source,
547
+ if not fstree_enabled:
548
+ for recipe in loader.recipes:
549
+ workspace.files.append(
550
+ common_pb.File(
551
+ path=recipe.workspace_path,
552
+ content=recipe.source,
553
+ )
550
554
  )
551
- )
552
555
 
553
556
  return workspace
@@ -103,8 +103,8 @@ class DockerClient(Download):
103
103
  url = "https://download.docker.com/{host}/static/stable/{arch}/docker-{version}.tgz"
104
104
  """ URL of binaries """
105
105
 
106
- version = Parameter("27.3.1", help="Docker version")
107
- """ Docker version [27.3.1] """
106
+ version = Parameter("27.4.1", help="Docker version")
107
+ """ Docker version [27.4.1] """
108
108
 
109
109
  def publish(self, artifact, tools):
110
110
  super().publish(artifact, tools)
@@ -86,13 +86,16 @@ def gdb(ctx, task, default, machine_interface, no_binary, gdb_args):
86
86
 
87
87
  try:
88
88
  with log.progress("Progress", dag.number_of_tasks(), " tasks", estimates=False, debug=False) as p:
89
+ in_progress = set()
90
+
89
91
  while dag.has_tasks() or not queue.empty():
90
- leafs = dag.select(lambda graph, task: task.is_ready())
92
+ leafs = dag.select(lambda graph, task: task.is_ready() and task not in in_progress)
91
93
 
92
94
  while leafs:
93
95
  task = leafs.pop()
94
96
  executor = strategy.create_executor({}, task)
95
97
  queue.submit(executor)
98
+ in_progress.add(task)
96
99
 
97
100
  task, _ = queue.wait()
98
101
 
@@ -242,8 +242,10 @@ def compdb(ctx, task, default):
242
242
 
243
243
  try:
244
244
  with log.progress("Progress", dag.number_of_tasks(), " tasks", estimates=False, debug=False) as progress:
245
+ in_progress = set()
246
+
245
247
  while dag.has_tasks() or not queue.empty():
246
- leafs = dag.select(lambda graph, task: task.is_ready())
248
+ leafs = dag.select(lambda graph, task: task.is_ready() and task not in in_progress)
247
249
 
248
250
  # Order the tasks by their weights to improve build times
249
251
  leafs.sort(key=lambda x: x.weight)
@@ -252,6 +254,7 @@ def compdb(ctx, task, default):
252
254
  task = leafs.pop()
253
255
  executor = strategy.create_executor({}, task)
254
256
  queue.submit(executor)
257
+ in_progress.add(task)
255
258
 
256
259
  task, _ = queue.wait()
257
260
 
@@ -1,4 +1,4 @@
1
- from jolt import Download, Parameter, Resource, Task
1
+ from jolt import Parameter, Resource, Task
2
2
  from jolt.error import raise_task_error_if
3
3
  from jolt.tasks import TaskRegistry
4
4
  from jolt import attributes
@@ -15,7 +15,6 @@ from jolt.cache import ArtifactAttributeSetProvider
15
15
  import contextlib
16
16
  import json
17
17
  from os import path
18
- from platform import system
19
18
  import tarfile
20
19
 
21
20
 
@@ -100,35 +99,6 @@ class PodmanAttributeProvider(ArtifactAttributeSetProvider):
100
99
  artifact.podman.unapply(task, artifact)
101
100
 
102
101
 
103
- class PodmanClient(Download):
104
- """ Task: Downloads and publishes the Podman command line client.
105
-
106
- The task will be automatically made available after importing
107
- ``jolt.plugins.podman``.
108
- """
109
-
110
- name = "podman/cli"
111
- """ Name of the task """
112
-
113
- arch = Parameter("x86_64", help="Host architecture")
114
- """ Host architecture [x86_64] """
115
-
116
- collect = ["podman/podman"]
117
-
118
- host = Parameter(system().lower(), help="Host operating system")
119
- """ Host operating system [autodetected] """
120
-
121
- url = "https://download.podman.com/{host}/static/stable/{arch}/podman-{version}.tgz"
122
- """ URL of binaries """
123
-
124
- version = Parameter("20.10.13", help="Podman version")
125
- """ Podman version [20.10.13] """
126
-
127
- def publish(self, artifact, tools):
128
- super().publish(artifact, tools)
129
- artifact.environ.PATH.append("podman")
130
-
131
-
132
102
  @attributes.requires("_image")
133
103
  class Container(Resource):
134
104
  """
@@ -344,8 +314,6 @@ class PodmanLogin(Resource):
344
314
  name = "podman/login"
345
315
  """ Name of the resource """
346
316
 
347
- requires = ["podman/cli"]
348
-
349
317
  user = Parameter("", help="Podman Registry username")
350
318
  """
351
319
  Podman Registry username.
@@ -385,7 +353,6 @@ class PodmanLogin(Resource):
385
353
  tools.run("podman logout {server}")
386
354
 
387
355
 
388
- TaskRegistry.get().add_task_class(PodmanClient)
389
356
  TaskRegistry.get().add_task_class(PodmanLogin)
390
357
 
391
358
 
@@ -445,7 +412,6 @@ class ContainerImage(Task):
445
412
 
446
413
  Optionally add requirements to:
447
414
 
448
- - ``podman/cli`` to provision the Podman client, if none is available on the host.
449
415
  - ``podman/login`` to automatically login to the Podman registry.
450
416
 
451
417
  This class must be subclassed.
@@ -468,7 +434,6 @@ class ContainerImage(Task):
468
434
  class Busybox(ContainerImage):
469
435
  \"\"\" Publishes Busybox image as gzip-compressed tarball \"\"\"
470
436
  compression = "gz"
471
- requires = ["podman/cli"]
472
437
  tags = ["busybox:{identity}"]
473
438
 
474
439
  """
@@ -0,0 +1 @@
1
+ __version__ = "0.9.381"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jolt
3
- Version: 0.9.371
3
+ Version: 0.9.381
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.371"
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