jolt 0.9.76__py3-none-any.whl → 0.9.429__py3-none-any.whl
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.
- jolt/__init__.py +88 -7
- jolt/__main__.py +9 -1
- jolt/bin/fstree-darwin-x86_64 +0 -0
- jolt/bin/fstree-linux-x86_64 +0 -0
- jolt/cache.py +839 -367
- jolt/chroot.py +156 -0
- jolt/cli.py +362 -143
- jolt/common_pb2.py +63 -0
- jolt/common_pb2_grpc.py +4 -0
- jolt/config.py +99 -42
- jolt/error.py +19 -4
- jolt/expires.py +2 -2
- jolt/filesystem.py +8 -6
- jolt/graph.py +705 -117
- jolt/hooks.py +63 -1
- jolt/influence.py +129 -6
- jolt/loader.py +369 -121
- jolt/log.py +225 -63
- jolt/manifest.py +28 -38
- jolt/options.py +35 -10
- jolt/pkgs/abseil.py +42 -0
- jolt/pkgs/asio.py +25 -0
- jolt/pkgs/autoconf.py +41 -0
- jolt/pkgs/automake.py +41 -0
- jolt/pkgs/b2.py +31 -0
- jolt/pkgs/boost.py +111 -0
- jolt/pkgs/boringssl.py +32 -0
- jolt/pkgs/busybox.py +39 -0
- jolt/pkgs/bzip2.py +43 -0
- jolt/pkgs/cares.py +29 -0
- jolt/pkgs/catch2.py +36 -0
- jolt/pkgs/cbindgen.py +17 -0
- jolt/pkgs/cista.py +19 -0
- jolt/pkgs/clang.py +44 -0
- jolt/pkgs/cli11.py +23 -0
- jolt/pkgs/cmake.py +48 -0
- jolt/pkgs/cpython.py +196 -0
- jolt/pkgs/crun.py +29 -0
- jolt/pkgs/curl.py +38 -0
- jolt/pkgs/dbus.py +18 -0
- jolt/pkgs/double_conversion.py +24 -0
- jolt/pkgs/fastfloat.py +21 -0
- jolt/pkgs/ffmpeg.py +28 -0
- jolt/pkgs/flatbuffers.py +29 -0
- jolt/pkgs/fmt.py +27 -0
- jolt/pkgs/fstree.py +20 -0
- jolt/pkgs/gflags.py +18 -0
- jolt/pkgs/glib.py +18 -0
- jolt/pkgs/glog.py +25 -0
- jolt/pkgs/glslang.py +21 -0
- jolt/pkgs/golang.py +16 -11
- jolt/pkgs/googlebenchmark.py +18 -0
- jolt/pkgs/googletest.py +46 -0
- jolt/pkgs/gperf.py +15 -0
- jolt/pkgs/grpc.py +73 -0
- jolt/pkgs/hdf5.py +19 -0
- jolt/pkgs/help2man.py +14 -0
- jolt/pkgs/inja.py +28 -0
- jolt/pkgs/jsoncpp.py +31 -0
- jolt/pkgs/libarchive.py +43 -0
- jolt/pkgs/libcap.py +44 -0
- jolt/pkgs/libdrm.py +44 -0
- jolt/pkgs/libedit.py +42 -0
- jolt/pkgs/libevent.py +31 -0
- jolt/pkgs/libexpat.py +27 -0
- jolt/pkgs/libfastjson.py +21 -0
- jolt/pkgs/libffi.py +16 -0
- jolt/pkgs/libglvnd.py +30 -0
- jolt/pkgs/libogg.py +28 -0
- jolt/pkgs/libpciaccess.py +18 -0
- jolt/pkgs/libseccomp.py +21 -0
- jolt/pkgs/libtirpc.py +24 -0
- jolt/pkgs/libtool.py +42 -0
- jolt/pkgs/libunwind.py +35 -0
- jolt/pkgs/libva.py +18 -0
- jolt/pkgs/libvorbis.py +33 -0
- jolt/pkgs/libxml2.py +35 -0
- jolt/pkgs/libxslt.py +17 -0
- jolt/pkgs/libyajl.py +16 -0
- jolt/pkgs/llvm.py +81 -0
- jolt/pkgs/lua.py +54 -0
- jolt/pkgs/lz4.py +26 -0
- jolt/pkgs/m4.py +14 -0
- jolt/pkgs/make.py +17 -0
- jolt/pkgs/mesa.py +81 -0
- jolt/pkgs/meson.py +17 -0
- jolt/pkgs/mstch.py +28 -0
- jolt/pkgs/mysql.py +60 -0
- jolt/pkgs/nasm.py +49 -0
- jolt/pkgs/ncurses.py +30 -0
- jolt/pkgs/ng_log.py +25 -0
- jolt/pkgs/ninja.py +45 -0
- jolt/pkgs/nlohmann_json.py +25 -0
- jolt/pkgs/nodejs.py +19 -11
- jolt/pkgs/opencv.py +24 -0
- jolt/pkgs/openjdk.py +26 -0
- jolt/pkgs/openssl.py +103 -0
- jolt/pkgs/paho.py +76 -0
- jolt/pkgs/patchelf.py +16 -0
- jolt/pkgs/perl.py +42 -0
- jolt/pkgs/pkgconfig.py +64 -0
- jolt/pkgs/poco.py +39 -0
- jolt/pkgs/protobuf.py +77 -0
- jolt/pkgs/pugixml.py +27 -0
- jolt/pkgs/python.py +19 -0
- jolt/pkgs/qt.py +35 -0
- jolt/pkgs/rapidjson.py +26 -0
- jolt/pkgs/rapidyaml.py +28 -0
- jolt/pkgs/re2.py +30 -0
- jolt/pkgs/re2c.py +17 -0
- jolt/pkgs/readline.py +15 -0
- jolt/pkgs/rust.py +41 -0
- jolt/pkgs/sdl.py +28 -0
- jolt/pkgs/simdjson.py +27 -0
- jolt/pkgs/soci.py +46 -0
- jolt/pkgs/spdlog.py +29 -0
- jolt/pkgs/spirv_llvm.py +21 -0
- jolt/pkgs/spirv_tools.py +24 -0
- jolt/pkgs/sqlite.py +83 -0
- jolt/pkgs/ssl.py +12 -0
- jolt/pkgs/texinfo.py +15 -0
- jolt/pkgs/tomlplusplus.py +22 -0
- jolt/pkgs/wayland.py +26 -0
- jolt/pkgs/x11.py +58 -0
- jolt/pkgs/xerces_c.py +20 -0
- jolt/pkgs/xorg.py +360 -0
- jolt/pkgs/xz.py +29 -0
- jolt/pkgs/yamlcpp.py +30 -0
- jolt/pkgs/zeromq.py +47 -0
- jolt/pkgs/zlib.py +69 -0
- jolt/pkgs/zstd.py +33 -0
- jolt/plugins/alias.py +3 -0
- jolt/plugins/allure.py +5 -2
- jolt/plugins/autotools.py +66 -0
- jolt/plugins/cache.py +133 -0
- jolt/plugins/cmake.py +74 -6
- jolt/plugins/conan.py +238 -0
- jolt/plugins/cxx.py +698 -0
- jolt/plugins/cxxinfo.py +7 -0
- jolt/plugins/dashboard.py +1 -1
- jolt/plugins/docker.py +91 -23
- jolt/plugins/email.py +5 -2
- jolt/plugins/email.xslt +144 -101
- jolt/plugins/environ.py +11 -0
- jolt/plugins/fetch.py +141 -0
- jolt/plugins/gdb.py +44 -21
- jolt/plugins/gerrit.py +1 -14
- jolt/plugins/git.py +316 -101
- jolt/plugins/googletest.py +522 -1
- jolt/plugins/http.py +36 -38
- jolt/plugins/libtool.py +63 -0
- jolt/plugins/linux.py +990 -0
- jolt/plugins/logstash.py +4 -4
- jolt/plugins/meson.py +61 -0
- jolt/plugins/ninja-compdb.py +107 -31
- jolt/plugins/ninja.py +929 -134
- jolt/plugins/paths.py +11 -1
- jolt/plugins/pkgconfig.py +219 -0
- jolt/plugins/podman.py +148 -91
- jolt/plugins/python.py +137 -0
- jolt/plugins/remote_execution/__init__.py +0 -0
- jolt/plugins/remote_execution/administration_pb2.py +46 -0
- jolt/plugins/remote_execution/administration_pb2_grpc.py +170 -0
- jolt/plugins/remote_execution/log_pb2.py +32 -0
- jolt/plugins/remote_execution/log_pb2_grpc.py +68 -0
- jolt/plugins/remote_execution/scheduler_pb2.py +41 -0
- jolt/plugins/remote_execution/scheduler_pb2_grpc.py +141 -0
- jolt/plugins/remote_execution/worker_pb2.py +38 -0
- jolt/plugins/remote_execution/worker_pb2_grpc.py +112 -0
- jolt/plugins/report.py +12 -2
- jolt/plugins/rust.py +25 -0
- jolt/plugins/scheduler.py +710 -0
- jolt/plugins/selfdeploy/setup.py +9 -4
- jolt/plugins/selfdeploy.py +138 -88
- jolt/plugins/strings.py +35 -22
- jolt/plugins/symlinks.py +26 -11
- jolt/plugins/telemetry.py +5 -2
- jolt/plugins/timeline.py +13 -3
- jolt/plugins/volume.py +46 -48
- jolt/scheduler.py +591 -191
- jolt/tasks.py +1783 -245
- jolt/templates/export.sh.template +12 -6
- jolt/templates/timeline.html.template +44 -47
- jolt/timer.py +22 -0
- jolt/tools.py +749 -302
- jolt/utils.py +245 -18
- jolt/version.py +1 -1
- jolt/version_utils.py +2 -2
- jolt/xmldom.py +12 -2
- {jolt-0.9.76.dist-info → jolt-0.9.429.dist-info}/METADATA +98 -38
- jolt-0.9.429.dist-info/RECORD +207 -0
- {jolt-0.9.76.dist-info → jolt-0.9.429.dist-info}/WHEEL +1 -1
- jolt/plugins/amqp.py +0 -834
- jolt/plugins/debian.py +0 -338
- jolt/plugins/ftp.py +0 -181
- jolt/plugins/ninja-cache.py +0 -64
- jolt/plugins/ninjacli.py +0 -271
- jolt/plugins/repo.py +0 -253
- jolt-0.9.76.dist-info/RECORD +0 -79
- {jolt-0.9.76.dist-info → jolt-0.9.429.dist-info}/entry_points.txt +0 -0
- {jolt-0.9.76.dist-info → jolt-0.9.429.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
|
|
6
|
+
from jolt.plugins.remote_execution import administration_pb2 as jolt_dot_plugins_dot_remote__execution_dot_administration__pb2
|
|
7
|
+
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AdministrationStub(object):
|
|
11
|
+
"""This service is not yet implemented.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, channel):
|
|
15
|
+
"""Constructor.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
channel: A grpc.Channel.
|
|
19
|
+
"""
|
|
20
|
+
self.CancelBuild = channel.unary_unary(
|
|
21
|
+
'/Administration/CancelBuild',
|
|
22
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildRequest.SerializeToString,
|
|
23
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildResponse.FromString,
|
|
24
|
+
)
|
|
25
|
+
self.ListBuilds = channel.unary_unary(
|
|
26
|
+
'/Administration/ListBuilds',
|
|
27
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListBuildsRequest.SerializeToString,
|
|
28
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListBuildsResponse.FromString,
|
|
29
|
+
)
|
|
30
|
+
self.ListWorkers = channel.unary_unary(
|
|
31
|
+
'/Administration/ListWorkers',
|
|
32
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListWorkersRequest.SerializeToString,
|
|
33
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListWorkersResponse.FromString,
|
|
34
|
+
)
|
|
35
|
+
self.Reschedule = channel.unary_unary(
|
|
36
|
+
'/Administration/Reschedule',
|
|
37
|
+
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
|
|
38
|
+
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class AdministrationServicer(object):
|
|
43
|
+
"""This service is not yet implemented.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
def CancelBuild(self, request, context):
|
|
47
|
+
"""Missing associated documentation comment in .proto file."""
|
|
48
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
49
|
+
context.set_details('Method not implemented!')
|
|
50
|
+
raise NotImplementedError('Method not implemented!')
|
|
51
|
+
|
|
52
|
+
def ListBuilds(self, request, context):
|
|
53
|
+
"""Missing associated documentation comment in .proto file."""
|
|
54
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
55
|
+
context.set_details('Method not implemented!')
|
|
56
|
+
raise NotImplementedError('Method not implemented!')
|
|
57
|
+
|
|
58
|
+
def ListWorkers(self, request, context):
|
|
59
|
+
"""Missing associated documentation comment in .proto file."""
|
|
60
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
61
|
+
context.set_details('Method not implemented!')
|
|
62
|
+
raise NotImplementedError('Method not implemented!')
|
|
63
|
+
|
|
64
|
+
def Reschedule(self, request, context):
|
|
65
|
+
"""Missing associated documentation comment in .proto file."""
|
|
66
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
67
|
+
context.set_details('Method not implemented!')
|
|
68
|
+
raise NotImplementedError('Method not implemented!')
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def add_AdministrationServicer_to_server(servicer, server):
|
|
72
|
+
rpc_method_handlers = {
|
|
73
|
+
'CancelBuild': grpc.unary_unary_rpc_method_handler(
|
|
74
|
+
servicer.CancelBuild,
|
|
75
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildRequest.FromString,
|
|
76
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildResponse.SerializeToString,
|
|
77
|
+
),
|
|
78
|
+
'ListBuilds': grpc.unary_unary_rpc_method_handler(
|
|
79
|
+
servicer.ListBuilds,
|
|
80
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListBuildsRequest.FromString,
|
|
81
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListBuildsResponse.SerializeToString,
|
|
82
|
+
),
|
|
83
|
+
'ListWorkers': grpc.unary_unary_rpc_method_handler(
|
|
84
|
+
servicer.ListWorkers,
|
|
85
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListWorkersRequest.FromString,
|
|
86
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListWorkersResponse.SerializeToString,
|
|
87
|
+
),
|
|
88
|
+
'Reschedule': grpc.unary_unary_rpc_method_handler(
|
|
89
|
+
servicer.Reschedule,
|
|
90
|
+
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
|
|
91
|
+
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
|
|
92
|
+
),
|
|
93
|
+
}
|
|
94
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
95
|
+
'Administration', rpc_method_handlers)
|
|
96
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# This class is part of an EXPERIMENTAL API.
|
|
100
|
+
class Administration(object):
|
|
101
|
+
"""This service is not yet implemented.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
@staticmethod
|
|
105
|
+
def CancelBuild(request,
|
|
106
|
+
target,
|
|
107
|
+
options=(),
|
|
108
|
+
channel_credentials=None,
|
|
109
|
+
call_credentials=None,
|
|
110
|
+
insecure=False,
|
|
111
|
+
compression=None,
|
|
112
|
+
wait_for_ready=None,
|
|
113
|
+
timeout=None,
|
|
114
|
+
metadata=None):
|
|
115
|
+
return grpc.experimental.unary_unary(request, target, '/Administration/CancelBuild',
|
|
116
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildRequest.SerializeToString,
|
|
117
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildResponse.FromString,
|
|
118
|
+
options, channel_credentials,
|
|
119
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
120
|
+
|
|
121
|
+
@staticmethod
|
|
122
|
+
def ListBuilds(request,
|
|
123
|
+
target,
|
|
124
|
+
options=(),
|
|
125
|
+
channel_credentials=None,
|
|
126
|
+
call_credentials=None,
|
|
127
|
+
insecure=False,
|
|
128
|
+
compression=None,
|
|
129
|
+
wait_for_ready=None,
|
|
130
|
+
timeout=None,
|
|
131
|
+
metadata=None):
|
|
132
|
+
return grpc.experimental.unary_unary(request, target, '/Administration/ListBuilds',
|
|
133
|
+
jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListBuildsRequest.SerializeToString,
|
|
134
|
+
jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListBuildsResponse.FromString,
|
|
135
|
+
options, channel_credentials,
|
|
136
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
137
|
+
|
|
138
|
+
@staticmethod
|
|
139
|
+
def ListWorkers(request,
|
|
140
|
+
target,
|
|
141
|
+
options=(),
|
|
142
|
+
channel_credentials=None,
|
|
143
|
+
call_credentials=None,
|
|
144
|
+
insecure=False,
|
|
145
|
+
compression=None,
|
|
146
|
+
wait_for_ready=None,
|
|
147
|
+
timeout=None,
|
|
148
|
+
metadata=None):
|
|
149
|
+
return grpc.experimental.unary_unary(request, target, '/Administration/ListWorkers',
|
|
150
|
+
jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListWorkersRequest.SerializeToString,
|
|
151
|
+
jolt_dot_plugins_dot_remote__execution_dot_administration__pb2.ListWorkersResponse.FromString,
|
|
152
|
+
options, channel_credentials,
|
|
153
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
154
|
+
|
|
155
|
+
@staticmethod
|
|
156
|
+
def Reschedule(request,
|
|
157
|
+
target,
|
|
158
|
+
options=(),
|
|
159
|
+
channel_credentials=None,
|
|
160
|
+
call_credentials=None,
|
|
161
|
+
insecure=False,
|
|
162
|
+
compression=None,
|
|
163
|
+
wait_for_ready=None,
|
|
164
|
+
timeout=None,
|
|
165
|
+
metadata=None):
|
|
166
|
+
return grpc.experimental.unary_unary(request, target, '/Administration/Reschedule',
|
|
167
|
+
google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
|
|
168
|
+
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
|
|
169
|
+
options, channel_credentials,
|
|
170
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: jolt/plugins/remote_execution/log.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
15
|
+
from jolt import common_pb2 as jolt_dot_common__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'jolt/plugins/remote_execution/log.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x11jolt/common.proto\"s\n\x0eReadLogRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12*\n\x06\x62\x65\x66ore\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x05\x61\x66ter\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"9\n\x0fReadLogResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1a\n\x08loglines\x18\x02 \x03(\x0b\x32\x08.LogLine2:\n\x08LogStash\x12.\n\x07ReadLog\x12\x0f.ReadLogRequest\x1a\x10.ReadLogResponse0\x01\x42\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
19
|
+
|
|
20
|
+
_globals = globals()
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.log_pb2', _globals)
|
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
+
_globals['DESCRIPTOR']._options = None
|
|
25
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
26
|
+
_globals['_READLOGREQUEST']._serialized_start=95
|
|
27
|
+
_globals['_READLOGREQUEST']._serialized_end=210
|
|
28
|
+
_globals['_READLOGRESPONSE']._serialized_start=212
|
|
29
|
+
_globals['_READLOGRESPONSE']._serialized_end=269
|
|
30
|
+
_globals['_LOGSTASH']._serialized_start=271
|
|
31
|
+
_globals['_LOGSTASH']._serialized_end=329
|
|
32
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from jolt.plugins.remote_execution import log_pb2 as jolt_dot_plugins_dot_remote__execution_dot_log__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class LogStashStub(object):
|
|
9
|
+
"""Missing associated documentation comment in .proto file."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, channel):
|
|
12
|
+
"""Constructor.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
channel: A grpc.Channel.
|
|
16
|
+
"""
|
|
17
|
+
self.ReadLog = channel.unary_stream(
|
|
18
|
+
'/LogStash/ReadLog',
|
|
19
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_log__pb2.ReadLogRequest.SerializeToString,
|
|
20
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_log__pb2.ReadLogResponse.FromString,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class LogStashServicer(object):
|
|
25
|
+
"""Missing associated documentation comment in .proto file."""
|
|
26
|
+
|
|
27
|
+
def ReadLog(self, request, context):
|
|
28
|
+
"""Read a log file.
|
|
29
|
+
Log lines are streamed back as they are read from internal storage.
|
|
30
|
+
"""
|
|
31
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
32
|
+
context.set_details('Method not implemented!')
|
|
33
|
+
raise NotImplementedError('Method not implemented!')
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def add_LogStashServicer_to_server(servicer, server):
|
|
37
|
+
rpc_method_handlers = {
|
|
38
|
+
'ReadLog': grpc.unary_stream_rpc_method_handler(
|
|
39
|
+
servicer.ReadLog,
|
|
40
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_log__pb2.ReadLogRequest.FromString,
|
|
41
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_log__pb2.ReadLogResponse.SerializeToString,
|
|
42
|
+
),
|
|
43
|
+
}
|
|
44
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
45
|
+
'LogStash', rpc_method_handlers)
|
|
46
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# This class is part of an EXPERIMENTAL API.
|
|
50
|
+
class LogStash(object):
|
|
51
|
+
"""Missing associated documentation comment in .proto file."""
|
|
52
|
+
|
|
53
|
+
@staticmethod
|
|
54
|
+
def ReadLog(request,
|
|
55
|
+
target,
|
|
56
|
+
options=(),
|
|
57
|
+
channel_credentials=None,
|
|
58
|
+
call_credentials=None,
|
|
59
|
+
insecure=False,
|
|
60
|
+
compression=None,
|
|
61
|
+
wait_for_ready=None,
|
|
62
|
+
timeout=None,
|
|
63
|
+
metadata=None):
|
|
64
|
+
return grpc.experimental.unary_stream(request, target, '/LogStash/ReadLog',
|
|
65
|
+
jolt_dot_plugins_dot_remote__execution_dot_log__pb2.ReadLogRequest.SerializeToString,
|
|
66
|
+
jolt_dot_plugins_dot_remote__execution_dot_log__pb2.ReadLogResponse.FromString,
|
|
67
|
+
options, channel_credentials,
|
|
68
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: jolt/plugins/remote_execution/scheduler.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from jolt import common_pb2 as jolt_dot_common__pb2
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-jolt/plugins/remote_execution/scheduler.proto\x1a\x11jolt/common.proto\"[\n\x0c\x42uildRequest\x12&\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\x11.BuildEnvironment\x12\x10\n\x08priority\x18\x02 \x01(\x05\x12\x11\n\tlogstream\x18\x03 \x01(\x08\"=\n\x0b\x42uildUpdate\x12\x1c\n\x06status\x18\x01 \x01(\x0e\x32\x0c.BuildStatus\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t\"&\n\x12\x43\x61ncelBuildRequest\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\"3\n\x13\x43\x61ncelBuildResponse\x12\x1c\n\x06status\x18\x01 \x01(\x0e\x32\x0c.BuildStatus\"0\n\x0bTaskRequest\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x0f\n\x07task_id\x18\x02 \x01(\t\"0\n\x10WorkerAllocation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08hostname\x18\x02 \x01(\t\"\xa3\x01\n\nTaskUpdate\x12\x1d\n\x07request\x18\x01 \x01(\x0b\x32\x0c.TaskRequest\x12\x1b\n\x06status\x18\x02 \x01(\x0e\x32\x0b.TaskStatus\x12!\n\x06worker\x18\x03 \x01(\x0b\x32\x11.WorkerAllocation\x12\x1a\n\x08loglines\x18\x04 \x03(\x0b\x32\x08.LogLine\x12\x1a\n\x06\x65rrors\x18\x05 \x03(\x0b\x32\n.TaskError2\xa2\x01\n\tScheduler\x12.\n\rScheduleBuild\x12\r.BuildRequest\x1a\x0c.BuildUpdate0\x01\x12\x38\n\x0b\x43\x61ncelBuild\x12\x13.CancelBuildRequest\x1a\x14.CancelBuildResponse\x12+\n\x0cScheduleTask\x12\x0c.TaskRequest\x1a\x0b.TaskUpdate0\x01\x42\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
18
|
+
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.scheduler_pb2', _globals)
|
|
22
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
+
_globals['DESCRIPTOR']._options = None
|
|
24
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
25
|
+
_globals['_BUILDREQUEST']._serialized_start=68
|
|
26
|
+
_globals['_BUILDREQUEST']._serialized_end=159
|
|
27
|
+
_globals['_BUILDUPDATE']._serialized_start=161
|
|
28
|
+
_globals['_BUILDUPDATE']._serialized_end=222
|
|
29
|
+
_globals['_CANCELBUILDREQUEST']._serialized_start=224
|
|
30
|
+
_globals['_CANCELBUILDREQUEST']._serialized_end=262
|
|
31
|
+
_globals['_CANCELBUILDRESPONSE']._serialized_start=264
|
|
32
|
+
_globals['_CANCELBUILDRESPONSE']._serialized_end=315
|
|
33
|
+
_globals['_TASKREQUEST']._serialized_start=317
|
|
34
|
+
_globals['_TASKREQUEST']._serialized_end=365
|
|
35
|
+
_globals['_WORKERALLOCATION']._serialized_start=367
|
|
36
|
+
_globals['_WORKERALLOCATION']._serialized_end=415
|
|
37
|
+
_globals['_TASKUPDATE']._serialized_start=418
|
|
38
|
+
_globals['_TASKUPDATE']._serialized_end=581
|
|
39
|
+
_globals['_SCHEDULER']._serialized_start=584
|
|
40
|
+
_globals['_SCHEDULER']._serialized_end=746
|
|
41
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SchedulerStub(object):
|
|
9
|
+
"""The scheduler service
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, channel):
|
|
13
|
+
"""Constructor.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
channel: A grpc.Channel.
|
|
17
|
+
"""
|
|
18
|
+
self.ScheduleBuild = channel.unary_stream(
|
|
19
|
+
'/Scheduler/ScheduleBuild',
|
|
20
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.BuildRequest.SerializeToString,
|
|
21
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.BuildUpdate.FromString,
|
|
22
|
+
)
|
|
23
|
+
self.CancelBuild = channel.unary_unary(
|
|
24
|
+
'/Scheduler/CancelBuild',
|
|
25
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildRequest.SerializeToString,
|
|
26
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildResponse.FromString,
|
|
27
|
+
)
|
|
28
|
+
self.ScheduleTask = channel.unary_stream(
|
|
29
|
+
'/Scheduler/ScheduleTask',
|
|
30
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.SerializeToString,
|
|
31
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.FromString,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class SchedulerServicer(object):
|
|
36
|
+
"""The scheduler service
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def ScheduleBuild(self, request, context):
|
|
40
|
+
"""Create a new build in the scheduler.
|
|
41
|
+
The build is not started until tasks are scheduled.
|
|
42
|
+
"""
|
|
43
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
44
|
+
context.set_details('Method not implemented!')
|
|
45
|
+
raise NotImplementedError('Method not implemented!')
|
|
46
|
+
|
|
47
|
+
def CancelBuild(self, request, context):
|
|
48
|
+
"""Cancel a build.
|
|
49
|
+
"""
|
|
50
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
51
|
+
context.set_details('Method not implemented!')
|
|
52
|
+
raise NotImplementedError('Method not implemented!')
|
|
53
|
+
|
|
54
|
+
def ScheduleTask(self, request, context):
|
|
55
|
+
"""Schedule a task to be executed.
|
|
56
|
+
The scheduler will assign the task to a free worker
|
|
57
|
+
and updates will be sent back once the task is running.
|
|
58
|
+
"""
|
|
59
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
60
|
+
context.set_details('Method not implemented!')
|
|
61
|
+
raise NotImplementedError('Method not implemented!')
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def add_SchedulerServicer_to_server(servicer, server):
|
|
65
|
+
rpc_method_handlers = {
|
|
66
|
+
'ScheduleBuild': grpc.unary_stream_rpc_method_handler(
|
|
67
|
+
servicer.ScheduleBuild,
|
|
68
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.BuildRequest.FromString,
|
|
69
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.BuildUpdate.SerializeToString,
|
|
70
|
+
),
|
|
71
|
+
'CancelBuild': grpc.unary_unary_rpc_method_handler(
|
|
72
|
+
servicer.CancelBuild,
|
|
73
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildRequest.FromString,
|
|
74
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildResponse.SerializeToString,
|
|
75
|
+
),
|
|
76
|
+
'ScheduleTask': grpc.unary_stream_rpc_method_handler(
|
|
77
|
+
servicer.ScheduleTask,
|
|
78
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.FromString,
|
|
79
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.SerializeToString,
|
|
80
|
+
),
|
|
81
|
+
}
|
|
82
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
83
|
+
'Scheduler', rpc_method_handlers)
|
|
84
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# This class is part of an EXPERIMENTAL API.
|
|
88
|
+
class Scheduler(object):
|
|
89
|
+
"""The scheduler service
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
@staticmethod
|
|
93
|
+
def ScheduleBuild(request,
|
|
94
|
+
target,
|
|
95
|
+
options=(),
|
|
96
|
+
channel_credentials=None,
|
|
97
|
+
call_credentials=None,
|
|
98
|
+
insecure=False,
|
|
99
|
+
compression=None,
|
|
100
|
+
wait_for_ready=None,
|
|
101
|
+
timeout=None,
|
|
102
|
+
metadata=None):
|
|
103
|
+
return grpc.experimental.unary_stream(request, target, '/Scheduler/ScheduleBuild',
|
|
104
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.BuildRequest.SerializeToString,
|
|
105
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.BuildUpdate.FromString,
|
|
106
|
+
options, channel_credentials,
|
|
107
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
108
|
+
|
|
109
|
+
@staticmethod
|
|
110
|
+
def CancelBuild(request,
|
|
111
|
+
target,
|
|
112
|
+
options=(),
|
|
113
|
+
channel_credentials=None,
|
|
114
|
+
call_credentials=None,
|
|
115
|
+
insecure=False,
|
|
116
|
+
compression=None,
|
|
117
|
+
wait_for_ready=None,
|
|
118
|
+
timeout=None,
|
|
119
|
+
metadata=None):
|
|
120
|
+
return grpc.experimental.unary_unary(request, target, '/Scheduler/CancelBuild',
|
|
121
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildRequest.SerializeToString,
|
|
122
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.CancelBuildResponse.FromString,
|
|
123
|
+
options, channel_credentials,
|
|
124
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
125
|
+
|
|
126
|
+
@staticmethod
|
|
127
|
+
def ScheduleTask(request,
|
|
128
|
+
target,
|
|
129
|
+
options=(),
|
|
130
|
+
channel_credentials=None,
|
|
131
|
+
call_credentials=None,
|
|
132
|
+
insecure=False,
|
|
133
|
+
compression=None,
|
|
134
|
+
wait_for_ready=None,
|
|
135
|
+
timeout=None,
|
|
136
|
+
metadata=None):
|
|
137
|
+
return grpc.experimental.unary_stream(request, target, '/Scheduler/ScheduleTask',
|
|
138
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.SerializeToString,
|
|
139
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.FromString,
|
|
140
|
+
options, channel_credentials,
|
|
141
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: jolt/plugins/remote_execution/worker.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
7
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from jolt import common_pb2 as jolt_dot_common__pb2
|
|
15
|
+
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*jolt/plugins/remote_execution/worker.proto\x1a\x11jolt/common.proto\x1a-jolt/plugins/remote_execution/scheduler.proto\"\xaf\x01\n\rWorkerRequest\x12%\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x15.WorkerRequest.Action\x12\x1c\n\x05\x62uild\x18\x02 \x01(\x0b\x32\r.BuildRequest\x12\x11\n\tworker_id\x18\x03 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x04 \x01(\t\"4\n\x06\x41\x63tion\x12\t\n\x05\x42UILD\x10\x00\x12\x10\n\x0c\x43\x41NCEL_BUILD\x10\x01\x12\r\n\tTERMINATE\x10\x02\"\xf1\x01\n\x0cWorkerUpdate\x12$\n\x06status\x18\x01 \x01(\x0e\x32\x14.WorkerUpdate.Status\x12\x1b\n\x08platform\x18\x02 \x01(\x0b\x32\t.Platform\x12 \n\rtask_platform\x18\x04 \x01(\x0b\x32\t.Platform\x12\x1b\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x0c.WorkerError\"_\n\x06Status\x12\r\n\tENLISTING\x10\x00\x12\r\n\tDELISTING\x10\x01\x12\x0f\n\x0b\x42UILD_ENDED\x10\x02\x12\x11\n\rDEPLOY_FAILED\x10\x03\x12\x13\n\x0f\x45XECUTOR_FAILED\x10\x04\"/\n\x0bWorkerError\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07\x64\x65tails\x18\x02 \x01(\t2i\n\x06Worker\x12\x34\n\x0fGetInstructions\x12\r.WorkerUpdate\x1a\x0e.WorkerRequest(\x01\x30\x01\x12)\n\x08GetTasks\x12\x0b.TaskUpdate\x1a\x0c.TaskRequest(\x01\x30\x01\x42\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
19
|
+
|
|
20
|
+
_globals = globals()
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.worker_pb2', _globals)
|
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
+
_globals['DESCRIPTOR']._options = None
|
|
25
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
26
|
+
_globals['_WORKERREQUEST']._serialized_start=113
|
|
27
|
+
_globals['_WORKERREQUEST']._serialized_end=288
|
|
28
|
+
_globals['_WORKERREQUEST_ACTION']._serialized_start=236
|
|
29
|
+
_globals['_WORKERREQUEST_ACTION']._serialized_end=288
|
|
30
|
+
_globals['_WORKERUPDATE']._serialized_start=291
|
|
31
|
+
_globals['_WORKERUPDATE']._serialized_end=532
|
|
32
|
+
_globals['_WORKERUPDATE_STATUS']._serialized_start=437
|
|
33
|
+
_globals['_WORKERUPDATE_STATUS']._serialized_end=532
|
|
34
|
+
_globals['_WORKERERROR']._serialized_start=534
|
|
35
|
+
_globals['_WORKERERROR']._serialized_end=581
|
|
36
|
+
_globals['_WORKER']._serialized_start=583
|
|
37
|
+
_globals['_WORKER']._serialized_end=688
|
|
38
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
6
|
+
from jolt.plugins.remote_execution import worker_pb2 as jolt_dot_plugins_dot_remote__execution_dot_worker__pb2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class WorkerStub(object):
|
|
10
|
+
"""The scheduler interface for workers and executors.
|
|
11
|
+
Workers prepare the build environment by deploying and
|
|
12
|
+
running executors (Jolt clients) to execute tasks.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, channel):
|
|
16
|
+
"""Constructor.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
channel: A grpc.Channel.
|
|
20
|
+
"""
|
|
21
|
+
self.GetInstructions = channel.stream_stream(
|
|
22
|
+
'/Worker/GetInstructions',
|
|
23
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerUpdate.SerializeToString,
|
|
24
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerRequest.FromString,
|
|
25
|
+
)
|
|
26
|
+
self.GetTasks = channel.stream_stream(
|
|
27
|
+
'/Worker/GetTasks',
|
|
28
|
+
request_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.SerializeToString,
|
|
29
|
+
response_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.FromString,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class WorkerServicer(object):
|
|
34
|
+
"""The scheduler interface for workers and executors.
|
|
35
|
+
Workers prepare the build environment by deploying and
|
|
36
|
+
running executors (Jolt clients) to execute tasks.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def GetInstructions(self, request_iterator, context):
|
|
40
|
+
"""Called by a worker to get build instructions.
|
|
41
|
+
"""
|
|
42
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
43
|
+
context.set_details('Method not implemented!')
|
|
44
|
+
raise NotImplementedError('Method not implemented!')
|
|
45
|
+
|
|
46
|
+
def GetTasks(self, request_iterator, context):
|
|
47
|
+
"""Called by an executor (Jolt client) to get task execution requests.
|
|
48
|
+
Task updates, including status and logs are sent back to the scheduler.
|
|
49
|
+
"""
|
|
50
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
51
|
+
context.set_details('Method not implemented!')
|
|
52
|
+
raise NotImplementedError('Method not implemented!')
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def add_WorkerServicer_to_server(servicer, server):
|
|
56
|
+
rpc_method_handlers = {
|
|
57
|
+
'GetInstructions': grpc.stream_stream_rpc_method_handler(
|
|
58
|
+
servicer.GetInstructions,
|
|
59
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerUpdate.FromString,
|
|
60
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerRequest.SerializeToString,
|
|
61
|
+
),
|
|
62
|
+
'GetTasks': grpc.stream_stream_rpc_method_handler(
|
|
63
|
+
servicer.GetTasks,
|
|
64
|
+
request_deserializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.FromString,
|
|
65
|
+
response_serializer=jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.SerializeToString,
|
|
66
|
+
),
|
|
67
|
+
}
|
|
68
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
69
|
+
'Worker', rpc_method_handlers)
|
|
70
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# This class is part of an EXPERIMENTAL API.
|
|
74
|
+
class Worker(object):
|
|
75
|
+
"""The scheduler interface for workers and executors.
|
|
76
|
+
Workers prepare the build environment by deploying and
|
|
77
|
+
running executors (Jolt clients) to execute tasks.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
@staticmethod
|
|
81
|
+
def GetInstructions(request_iterator,
|
|
82
|
+
target,
|
|
83
|
+
options=(),
|
|
84
|
+
channel_credentials=None,
|
|
85
|
+
call_credentials=None,
|
|
86
|
+
insecure=False,
|
|
87
|
+
compression=None,
|
|
88
|
+
wait_for_ready=None,
|
|
89
|
+
timeout=None,
|
|
90
|
+
metadata=None):
|
|
91
|
+
return grpc.experimental.stream_stream(request_iterator, target, '/Worker/GetInstructions',
|
|
92
|
+
jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerUpdate.SerializeToString,
|
|
93
|
+
jolt_dot_plugins_dot_remote__execution_dot_worker__pb2.WorkerRequest.FromString,
|
|
94
|
+
options, channel_credentials,
|
|
95
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
96
|
+
|
|
97
|
+
@staticmethod
|
|
98
|
+
def GetTasks(request_iterator,
|
|
99
|
+
target,
|
|
100
|
+
options=(),
|
|
101
|
+
channel_credentials=None,
|
|
102
|
+
call_credentials=None,
|
|
103
|
+
insecure=False,
|
|
104
|
+
compression=None,
|
|
105
|
+
wait_for_ready=None,
|
|
106
|
+
timeout=None,
|
|
107
|
+
metadata=None):
|
|
108
|
+
return grpc.experimental.stream_stream(request_iterator, target, '/Worker/GetTasks',
|
|
109
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskUpdate.SerializeToString,
|
|
110
|
+
jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2.TaskRequest.FromString,
|
|
111
|
+
options, channel_credentials,
|
|
112
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
jolt/plugins/report.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from contextlib import contextmanager
|
|
2
2
|
|
|
3
|
+
from jolt import common_pb2 as common_pb
|
|
3
4
|
from jolt.hooks import TaskHook, TaskHookFactory
|
|
4
5
|
from jolt.manifest import JoltManifest
|
|
5
6
|
|
|
@@ -12,6 +13,7 @@ class ReportHooks(TaskHook):
|
|
|
12
13
|
report.name = task.qualified_name
|
|
13
14
|
report.goal = str(task.is_goal()).lower()
|
|
14
15
|
report.identity = task.identity
|
|
16
|
+
report.instance = task.instance
|
|
15
17
|
report.result = result
|
|
16
18
|
if task.duration_running:
|
|
17
19
|
report.duration = str(task.duration_running.seconds)
|
|
@@ -36,7 +38,14 @@ class ReportHooks(TaskHook):
|
|
|
36
38
|
|
|
37
39
|
def task_failed(self, task):
|
|
38
40
|
with task.task.report() as report:
|
|
39
|
-
|
|
41
|
+
if task.status() == common_pb.TaskStatus.TASK_FAILED:
|
|
42
|
+
self.finalize_report(report.manifest, task, "FAILED")
|
|
43
|
+
elif task.status() == common_pb.TaskStatus.TASK_CANCELLED:
|
|
44
|
+
self.finalize_report(report.manifest, task, "CANCELLED")
|
|
45
|
+
|
|
46
|
+
def task_unstable(self, task):
|
|
47
|
+
with task.task.report() as report:
|
|
48
|
+
self.finalize_report(report.manifest, task, "UNSTABLE")
|
|
40
49
|
|
|
41
50
|
@contextmanager
|
|
42
51
|
def task_run(self, task):
|
|
@@ -49,7 +58,8 @@ class ReportHooks(TaskHook):
|
|
|
49
58
|
raise e
|
|
50
59
|
else:
|
|
51
60
|
with task.task.report() as report:
|
|
52
|
-
|
|
61
|
+
if task.status() == common_pb.TaskStatus.TASK_PASSED:
|
|
62
|
+
self.finalize_report(report.manifest, task, "SUCCESS")
|
|
53
63
|
|
|
54
64
|
def write(self, filename):
|
|
55
65
|
self.manifest.write(filename)
|