opentf-toolkit-nightly 0.61.0.dev1255__py3-none-any.whl → 0.61.0.dev1267__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.
- opentf/commons/__init__.py +1 -1
- opentf/commons/auth.py +0 -1
- opentf/scripts/startup.py +15 -1
- opentf/toolkit/channels.py +3 -1
- {opentf_toolkit_nightly-0.61.0.dev1255.dist-info → opentf_toolkit_nightly-0.61.0.dev1267.dist-info}/METADATA +1 -1
- {opentf_toolkit_nightly-0.61.0.dev1255.dist-info → opentf_toolkit_nightly-0.61.0.dev1267.dist-info}/RECORD +9 -9
- {opentf_toolkit_nightly-0.61.0.dev1255.dist-info → opentf_toolkit_nightly-0.61.0.dev1267.dist-info}/LICENSE +0 -0
- {opentf_toolkit_nightly-0.61.0.dev1255.dist-info → opentf_toolkit_nightly-0.61.0.dev1267.dist-info}/WHEEL +0 -0
- {opentf_toolkit_nightly-0.61.0.dev1255.dist-info → opentf_toolkit_nightly-0.61.0.dev1267.dist-info}/top_level.txt +0 -0
opentf/commons/__init__.py
CHANGED
opentf/commons/auth.py
CHANGED
|
@@ -101,7 +101,6 @@ def _read_key_files(items: Iterable[str], context: Dict[str, Any]) -> None:
|
|
|
101
101
|
'Error while reading trusted key #%d (%s), skipping:', i, keyfile
|
|
102
102
|
)
|
|
103
103
|
logging.error(err)
|
|
104
|
-
|
|
105
104
|
if not keys:
|
|
106
105
|
raise ConfigError(
|
|
107
106
|
f'Could not find at least one valid trusted key among {files}, aborting.'
|
opentf/scripts/startup.py
CHANGED
|
@@ -56,6 +56,7 @@ ENVIRONMENT_VARIABLES = {
|
|
|
56
56
|
'HTTPS_PROXY': None,
|
|
57
57
|
'KEY_SIZE': 4096,
|
|
58
58
|
'NO_PROXY': None,
|
|
59
|
+
'OPENTF_TELEMETRY': None,
|
|
59
60
|
'OPENTF_ALLURE_ENABLED': None,
|
|
60
61
|
'OPENTF_AUTHORIZATION_MODE': None,
|
|
61
62
|
'OPENTF_AUTHORIZATION_POLICY_FILE': None,
|
|
@@ -284,6 +285,19 @@ def maybe_start_eventbus(conf: Dict[str, Any]) -> List[Any]:
|
|
|
284
285
|
return []
|
|
285
286
|
|
|
286
287
|
|
|
288
|
+
def maybe_start_otelcol():
|
|
289
|
+
if (v := _get_env('OPENTF_TELEMETRY')) and v.lower() in ('true', 'yes', 'on', '1'):
|
|
290
|
+
try:
|
|
291
|
+
cmd = '"/usr/local/bin/otelcol --config=file:/app/otelcol-config.yaml $OTELCOL_EXTRA_OPTIONS"'
|
|
292
|
+
logging.info('Starting OpenTelemetry Collector...')
|
|
293
|
+
pid = subprocess.Popen(f'sh -c {cmd}', shell=True)
|
|
294
|
+
logging.debug('(pid is %d.)', pid.pid)
|
|
295
|
+
return [pid]
|
|
296
|
+
except Exception as err:
|
|
297
|
+
logging.error('Failed to start OpenTelemetry Collector: %s.', str(err))
|
|
298
|
+
return []
|
|
299
|
+
|
|
300
|
+
|
|
287
301
|
def _wait(what: str, ready, endpoint: str, headers: Optional[Dict[str, str]] = None):
|
|
288
302
|
start = time.monotonic()
|
|
289
303
|
while True:
|
|
@@ -621,7 +635,7 @@ def main():
|
|
|
621
635
|
plugins_idx = len(running)
|
|
622
636
|
logging.info('Starting Plugins...')
|
|
623
637
|
running += start_plugins(conf)
|
|
624
|
-
|
|
638
|
+
running += maybe_start_otelcol()
|
|
625
639
|
logging.info('OpenTestFactory Orchestrator Ready.')
|
|
626
640
|
if services_idx:
|
|
627
641
|
logging.info(' Started eventbus.')
|
opentf/toolkit/channels.py
CHANGED
|
@@ -51,6 +51,8 @@ PUT_FILE_COMMAND = re.compile(r'^::put file=(.*?)\s*::(.*?)\s*$')
|
|
|
51
51
|
CHANNEL_REQUEST = -1
|
|
52
52
|
CHANNEL_RELEASE = -2
|
|
53
53
|
CHANNEL_NOTIFY = -3
|
|
54
|
+
CHANNEL_TERMINATE = -4 # kill
|
|
55
|
+
CHANNEL_FORCEKILL = -9 # kill -9
|
|
54
56
|
|
|
55
57
|
DEFAULT_CHANNEL_LEASE = 60 # how long to keep the offer, in seconds
|
|
56
58
|
|
|
@@ -199,7 +201,7 @@ def _make_attachment_url(
|
|
|
199
201
|
return url, uuid
|
|
200
202
|
|
|
201
203
|
|
|
202
|
-
def _get_cmd_params(args: str, logs: List[str]):
|
|
204
|
+
def _get_cmd_params(args: str, logs: List[str]) -> Union[int, Dict[str, str]]:
|
|
203
205
|
details = {}
|
|
204
206
|
if args:
|
|
205
207
|
for parameter in args.strip().split(','):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: opentf-toolkit-nightly
|
|
3
|
-
Version: 0.61.0.
|
|
3
|
+
Version: 0.61.0.dev1267
|
|
4
4
|
Summary: OpenTestFactory Orchestrator Toolkit
|
|
5
5
|
Home-page: https://gitlab.com/henixdevelopment/open-source/opentestfactory/python-toolkit
|
|
6
6
|
Author: Martin Lafaix
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
opentf/commons/__init__.py,sha256=
|
|
2
|
-
opentf/commons/auth.py,sha256=
|
|
1
|
+
opentf/commons/__init__.py,sha256=thcqhAp--rYDw-JIBIkgpaLu1kEk3pyPJz8brx7f7vU,22599
|
|
2
|
+
opentf/commons/auth.py,sha256=gXRp_0Tf3bfd65F4QiQmh6C6vR9y3ugag_0DSvozJFk,15898
|
|
3
3
|
opentf/commons/config.py,sha256=_8WzSaeB0yjGRa8mTQ69OASyUSbKZbwNOiKpMp2jFwI,7842
|
|
4
4
|
opentf/commons/exceptions.py,sha256=7dhUXO8iyAbqVwlUKxZhgRzGqVcb7LkG39hFlm-VxIA,2407
|
|
5
5
|
opentf/commons/expressions.py,sha256=jM_YKXVOFhvOE2aE2IuacuvxhIsOYTFs2oQkpcbWR6g,19645
|
|
@@ -54,12 +54,12 @@ opentf/schemas/opentestfactory.org/v1beta1/ServiceConfig.json,sha256=m5ZgWAKbutu
|
|
|
54
54
|
opentf/schemas/opentestfactory.org/v1beta1/Workflow.json,sha256=QZ8mM9PhzsI9gTmwmKTWYNoRn--rtcM3L0PzgnPBfMU,15424
|
|
55
55
|
opentf/schemas/opentestfactory.org/v1beta2/ServiceConfig.json,sha256=rEvK2YWL5lG94_qYgR_GnLWNsaQhaQ-2kuZdWJr5NnY,3517
|
|
56
56
|
opentf/scripts/launch_java_service.sh,sha256=S0jAaCuv2sZy0Gf2NGBuPX-eD531rcM-b0fNyhmzSjw,2423
|
|
57
|
-
opentf/scripts/startup.py,sha256=
|
|
57
|
+
opentf/scripts/startup.py,sha256=oUPymARagVRCwfvtSf8oDD6zndld-XvDnB8RchdY4e4,22155
|
|
58
58
|
opentf/toolkit/__init__.py,sha256=mYeJPZ92ulbTBItqEsZgF4nnuRh6G19QPY3Jxc92ifc,23028
|
|
59
|
-
opentf/toolkit/channels.py,sha256=
|
|
59
|
+
opentf/toolkit/channels.py,sha256=EDuX5rk-wdaPLZeirllJqosRnmtz8bA4_eRfH857KZ4,23717
|
|
60
60
|
opentf/toolkit/core.py,sha256=fqnGgaYnuVcd4fyeNIwpc0QtyUo7jsKeVgdkBfY3iqo,9443
|
|
61
|
-
opentf_toolkit_nightly-0.61.0.
|
|
62
|
-
opentf_toolkit_nightly-0.61.0.
|
|
63
|
-
opentf_toolkit_nightly-0.61.0.
|
|
64
|
-
opentf_toolkit_nightly-0.61.0.
|
|
65
|
-
opentf_toolkit_nightly-0.61.0.
|
|
61
|
+
opentf_toolkit_nightly-0.61.0.dev1267.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
62
|
+
opentf_toolkit_nightly-0.61.0.dev1267.dist-info/METADATA,sha256=LUt5khG9-7lPVkcKcRjqTwimJYqaKuZyUMmODMFqEjY,2192
|
|
63
|
+
opentf_toolkit_nightly-0.61.0.dev1267.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
64
|
+
opentf_toolkit_nightly-0.61.0.dev1267.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
|
|
65
|
+
opentf_toolkit_nightly-0.61.0.dev1267.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|