jolt 0.9.123__py3-none-any.whl → 0.9.435__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 +80 -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 +832 -362
- jolt/chroot.py +156 -0
- jolt/cli.py +281 -162
- jolt/common_pb2.py +63 -0
- jolt/common_pb2_grpc.py +4 -0
- jolt/config.py +98 -41
- jolt/error.py +19 -4
- jolt/filesystem.py +2 -6
- jolt/graph.py +705 -117
- jolt/hooks.py +43 -0
- jolt/influence.py +122 -3
- 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 +24 -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 +87 -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 +80 -23
- jolt/plugins/email.py +2 -2
- jolt/plugins/email.xslt +144 -101
- jolt/plugins/environ.py +11 -0
- jolt/plugins/fetch.py +141 -0
- jolt/plugins/gdb.py +39 -19
- jolt/plugins/gerrit.py +1 -14
- jolt/plugins/git.py +283 -85
- jolt/plugins/googletest.py +2 -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 +99 -30
- jolt/plugins/ninja.py +468 -166
- jolt/plugins/paths.py +11 -1
- jolt/plugins/pkgconfig.py +219 -0
- jolt/plugins/podman.py +136 -92
- 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 +8 -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 +589 -192
- jolt/tasks.py +625 -121
- jolt/templates/timeline.html.template +44 -47
- jolt/timer.py +22 -0
- jolt/tools.py +638 -282
- jolt/utils.py +211 -7
- jolt/version.py +1 -1
- jolt/xmldom.py +12 -2
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/METADATA +97 -38
- jolt-0.9.435.dist-info/RECORD +207 -0
- {jolt-0.9.123.dist-info → jolt-0.9.435.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/repo.py +0 -253
- jolt-0.9.123.dist-info/RECORD +0 -77
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/entry_points.txt +0 -0
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/top_level.txt +0 -0
jolt/plugins/python.py
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
|
|
3
|
+
from jolt import Task
|
|
4
|
+
from jolt import attributes
|
|
3
5
|
from jolt import filesystem as fs
|
|
4
6
|
from jolt.cache import ArtifactStringAttribute
|
|
5
7
|
from jolt.cache import ArtifactAttributeSet
|
|
6
8
|
from jolt.cache import ArtifactAttributeSetProvider
|
|
9
|
+
from jolt.error import raise_task_error_if
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
class PythonVariable(ArtifactStringAttribute):
|
|
@@ -98,3 +101,137 @@ class PythonProvider(ArtifactAttributeSetProvider):
|
|
|
98
101
|
|
|
99
102
|
def unapply(self, task, artifact):
|
|
100
103
|
artifact.python.unapply(task, artifact)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@attributes.system
|
|
107
|
+
@attributes.requires("requires_python")
|
|
108
|
+
class PythonEnv(Task):
|
|
109
|
+
"""
|
|
110
|
+
Base class for Python virtual environment tasks.
|
|
111
|
+
|
|
112
|
+
Builds a Python virtual environment and installs specified packages.
|
|
113
|
+
|
|
114
|
+
The venv module from the Python standard library must be available in the
|
|
115
|
+
Python installation used to run the task.
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
abstract = True
|
|
119
|
+
""" This is an abstract base class that should be inherited by concrete tasks. """
|
|
120
|
+
|
|
121
|
+
executable = "python3"
|
|
122
|
+
""" Python executable to use for creating the virtual environment. """
|
|
123
|
+
|
|
124
|
+
requirements = []
|
|
125
|
+
"""
|
|
126
|
+
List of Python packages to install in the virtual environment.
|
|
127
|
+
|
|
128
|
+
Each entry should be a string suitable for pip, e.g., "package==version".
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
def _verify_influence(self, deps, artifact, tools, sources=None):
|
|
132
|
+
# No influence to verify
|
|
133
|
+
return
|
|
134
|
+
|
|
135
|
+
def relocate_scripts(self, artifact, tools, frompath, topath):
|
|
136
|
+
bindir = "Scripts" if self.system == "windows" else "bin"
|
|
137
|
+
|
|
138
|
+
with tools.cwd(artifact.path, bindir):
|
|
139
|
+
for script in tools.glob("*"):
|
|
140
|
+
if script.startswith("python"):
|
|
141
|
+
continue
|
|
142
|
+
tools.replace_in_file(script, frompath, topath)
|
|
143
|
+
|
|
144
|
+
with tools.cwd(artifact.path):
|
|
145
|
+
if not tools.exists("local/bin"):
|
|
146
|
+
return
|
|
147
|
+
with tools.cwd("local", "bin"):
|
|
148
|
+
for script in tools.glob("*"):
|
|
149
|
+
tools.replace_in_file(script, frompath, topath)
|
|
150
|
+
|
|
151
|
+
def publish(self, artifact, tools):
|
|
152
|
+
# Create a parallel installation by copying a Python installation
|
|
153
|
+
|
|
154
|
+
# First locate the Python executable to copy
|
|
155
|
+
py_exe = tools.which(self.executable)
|
|
156
|
+
raise_task_error_if(
|
|
157
|
+
py_exe is None, self,
|
|
158
|
+
f"Python executable '{self.executable}' not found in PATH.",
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
# Follow symlinks to get the real executable
|
|
162
|
+
py_exe = fs.path.realpath(py_exe)
|
|
163
|
+
|
|
164
|
+
# Determine the Python home directory
|
|
165
|
+
py_home = fs.path.dirname(fs.path.dirname(py_exe))
|
|
166
|
+
|
|
167
|
+
# Determine the Python version
|
|
168
|
+
self.version_major = tools.run(
|
|
169
|
+
[py_exe, "-c", "import sys; print(\"{{}}.{{}}\".format(sys.version_info[0], sys.version_info[1]))"],
|
|
170
|
+
shell=False,
|
|
171
|
+
output_on_error=True).strip()
|
|
172
|
+
|
|
173
|
+
self.info("Python executable: {0}", py_exe)
|
|
174
|
+
self.info("Python home: {0}", py_home)
|
|
175
|
+
self.info("Python version: {0}", self.version_major)
|
|
176
|
+
|
|
177
|
+
# Copy the Python installation to the artifact path
|
|
178
|
+
with tools.cwd(py_home):
|
|
179
|
+
artifact.collect(py_exe, "bin/python3")
|
|
180
|
+
artifact.collect("lib/python3")
|
|
181
|
+
artifact.collect("lib/python{version_major}")
|
|
182
|
+
artifact.collect("lib/libpython{version_major}.*")
|
|
183
|
+
|
|
184
|
+
# Create common symlinks
|
|
185
|
+
if self.system != "windows":
|
|
186
|
+
with tools.cwd(artifact.path, "bin"):
|
|
187
|
+
tools.symlink("python3", "python")
|
|
188
|
+
tools.symlink("python3", "python{version_major}")
|
|
189
|
+
|
|
190
|
+
# Install required packages into the artifact using pip
|
|
191
|
+
with tools.environ(PYTHONHOME=artifact.path):
|
|
192
|
+
py_exe = fs.path.join(artifact.path, "bin", "python3")
|
|
193
|
+
with tools.tmpdir() as tmp, tools.cwd(tmp):
|
|
194
|
+
tools.write_file(
|
|
195
|
+
"requirements.txt",
|
|
196
|
+
"\n".join(self.requirements) + "\n"
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
pip_cmd = [
|
|
200
|
+
py_exe,
|
|
201
|
+
"-m",
|
|
202
|
+
"pip",
|
|
203
|
+
"--isolated",
|
|
204
|
+
"--no-cache-dir",
|
|
205
|
+
"install",
|
|
206
|
+
"-r",
|
|
207
|
+
"requirements.txt",
|
|
208
|
+
"--break-system-packages",
|
|
209
|
+
]
|
|
210
|
+
tools.run(pip_cmd, shell=False)
|
|
211
|
+
|
|
212
|
+
artifact.environ.PATH.append("bin")
|
|
213
|
+
artifact.environ.PATH.append("local/bin")
|
|
214
|
+
artifact.strings.install_prefix = artifact.path
|
|
215
|
+
|
|
216
|
+
def unpack(self, artifact, tools):
|
|
217
|
+
# Relocate the virtual environment by adjusting script paths
|
|
218
|
+
frompath = artifact.strings.install_prefix
|
|
219
|
+
topath = artifact.final_path
|
|
220
|
+
self.relocate_scripts(artifact, tools, frompath, topath)
|
|
221
|
+
|
|
222
|
+
artifact.strings.install_prefix = artifact.final_path
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def requires(python=True):
|
|
226
|
+
""" Decorator to add Python requirements to a task. """
|
|
227
|
+
|
|
228
|
+
import jolt.pkgs.cpython
|
|
229
|
+
|
|
230
|
+
def decorate(cls):
|
|
231
|
+
if python:
|
|
232
|
+
cls = attributes.requires("requires_python")(cls)
|
|
233
|
+
cls.requires_python = ["cpython"]
|
|
234
|
+
|
|
235
|
+
return cls
|
|
236
|
+
|
|
237
|
+
return decorate
|
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: jolt/plugins/remote_execution/administration.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 empty_pb2 as google_dot_protobuf_dot_empty__pb2
|
|
15
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
16
|
+
from jolt import common_pb2 as jolt_dot_common__pb2
|
|
17
|
+
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2jolt/plugins/remote_execution/administration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x11jolt/common.proto\x1a-jolt/plugins/remote_execution/scheduler.proto\"\"\n\x11ListBuildsRequest\x12\r\n\x05tasks\x18\x01 \x01(\x08\"\xf4\x02\n\x12ListBuildsResponse\x12)\n\x06\x62uilds\x18\x01 \x03(\x0b\x32\x19.ListBuildsResponse.Build\x1aR\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1b\n\x06status\x18\x03 \x01(\x0e\x32\x0b.TaskStatus\x12\x13\n\x0bhasObserver\x18\x04 \x01(\x08\x1a\xde\x01\n\x05\x42uild\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x06status\x18\x02 \x01(\x0e\x32\x0c.BuildStatus\x12\'\n\x05tasks\x18\x03 \x03(\x0b\x32\x18.ListBuildsResponse.Task\x12/\n\x0bscheduledAt\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0bhasObserver\x18\x05 \x01(\x08\x12\x16\n\x0ehasRunningTask\x18\x06 \x01(\x08\x12\x15\n\rhasQueuedTask\x18\x07 \x01(\x08\x12\r\n\x05ready\x18\x08 \x01(\x08\"\x14\n\x12ListWorkersRequest\"\x80\x02\n\x13ListWorkersResponse\x12,\n\x07workers\x18\x01 \x03(\x0b\x32\x1b.ListWorkersResponse.Worker\x1a=\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1b\n\x06status\x18\x03 \x01(\x0e\x32\x0b.TaskStatus\x1a|\n\x06Worker\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1b\n\x08platform\x18\x02 \x01(\x0b\x32\t.Platform\x12 \n\rtask_platform\x18\x03 \x01(\x0b\x32\t.Platform\x12\'\n\x04task\x18\x04 \x01(\x0b\x32\x19.ListWorkersResponse.Task2\xf9\x01\n\x0e\x41\x64ministration\x12\x38\n\x0b\x43\x61ncelBuild\x12\x13.CancelBuildRequest\x1a\x14.CancelBuildResponse\x12\x35\n\nListBuilds\x12\x12.ListBuildsRequest\x1a\x13.ListBuildsResponse\x12\x38\n\x0bListWorkers\x12\x13.ListWorkersRequest\x1a\x14.ListWorkersResponse\x12<\n\nReschedule\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.EmptyB\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
21
|
+
|
|
22
|
+
_globals = globals()
|
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.administration_pb2', _globals)
|
|
25
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
26
|
+
_globals['DESCRIPTOR']._options = None
|
|
27
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
28
|
+
_globals['_LISTBUILDSREQUEST']._serialized_start=182
|
|
29
|
+
_globals['_LISTBUILDSREQUEST']._serialized_end=216
|
|
30
|
+
_globals['_LISTBUILDSRESPONSE']._serialized_start=219
|
|
31
|
+
_globals['_LISTBUILDSRESPONSE']._serialized_end=591
|
|
32
|
+
_globals['_LISTBUILDSRESPONSE_TASK']._serialized_start=284
|
|
33
|
+
_globals['_LISTBUILDSRESPONSE_TASK']._serialized_end=366
|
|
34
|
+
_globals['_LISTBUILDSRESPONSE_BUILD']._serialized_start=369
|
|
35
|
+
_globals['_LISTBUILDSRESPONSE_BUILD']._serialized_end=591
|
|
36
|
+
_globals['_LISTWORKERSREQUEST']._serialized_start=593
|
|
37
|
+
_globals['_LISTWORKERSREQUEST']._serialized_end=613
|
|
38
|
+
_globals['_LISTWORKERSRESPONSE']._serialized_start=616
|
|
39
|
+
_globals['_LISTWORKERSRESPONSE']._serialized_end=872
|
|
40
|
+
_globals['_LISTWORKERSRESPONSE_TASK']._serialized_start=284
|
|
41
|
+
_globals['_LISTWORKERSRESPONSE_TASK']._serialized_end=345
|
|
42
|
+
_globals['_LISTWORKERSRESPONSE_WORKER']._serialized_start=748
|
|
43
|
+
_globals['_LISTWORKERSRESPONSE_WORKER']._serialized_end=872
|
|
44
|
+
_globals['_ADMINISTRATION']._serialized_start=875
|
|
45
|
+
_globals['_ADMINISTRATION']._serialized_end=1124
|
|
46
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -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)
|