opentf-toolkit-nightly 0.61.0.dev1271__py3-none-any.whl → 0.61.0.dev1277__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/scripts/startup.py +16 -2
- opentf/toolkit/channels.py +13 -1
- {opentf_toolkit_nightly-0.61.0.dev1271.dist-info → opentf_toolkit_nightly-0.61.0.dev1277.dist-info}/METADATA +1 -1
- {opentf_toolkit_nightly-0.61.0.dev1271.dist-info → opentf_toolkit_nightly-0.61.0.dev1277.dist-info}/RECORD +7 -7
- {opentf_toolkit_nightly-0.61.0.dev1271.dist-info → opentf_toolkit_nightly-0.61.0.dev1277.dist-info}/WHEEL +1 -1
- {opentf_toolkit_nightly-0.61.0.dev1271.dist-info → opentf_toolkit_nightly-0.61.0.dev1277.dist-info}/LICENSE +0 -0
- {opentf_toolkit_nightly-0.61.0.dev1271.dist-info → opentf_toolkit_nightly-0.61.0.dev1277.dist-info}/top_level.txt +0 -0
opentf/scripts/startup.py
CHANGED
|
@@ -289,15 +289,29 @@ def maybe_start_eventbus(conf: Dict[str, Any]) -> List[Any]:
|
|
|
289
289
|
|
|
290
290
|
|
|
291
291
|
def maybe_start_otelcol():
|
|
292
|
-
|
|
292
|
+
telemetry = _get_env('OPENTF_TELEMETRY')
|
|
293
|
+
expected = ('true', 'yes', 'on', '1')
|
|
294
|
+
if telemetry and telemetry.lower() in expected:
|
|
293
295
|
try:
|
|
296
|
+
extra_options = os.environ.get('OTELCOL_EXTRA_OPTIONS', None)
|
|
297
|
+
options_msg = (
|
|
298
|
+
f' with following command line options: {extra_options}'
|
|
299
|
+
if extra_options
|
|
300
|
+
else ''
|
|
301
|
+
)
|
|
294
302
|
cmd = '"/usr/local/bin/otelcol --config=file:/app/otelcol-config.yaml $OTELCOL_EXTRA_OPTIONS"'
|
|
295
|
-
logging.info('Starting OpenTelemetry Collector...')
|
|
303
|
+
logging.info(f'Starting OpenTelemetry Collector{options_msg}...')
|
|
296
304
|
pid = subprocess.Popen(f'sh -c {cmd}', shell=True)
|
|
297
305
|
logging.debug('(pid is %d.)', pid.pid)
|
|
298
306
|
return [pid]
|
|
299
307
|
except Exception as err:
|
|
300
308
|
logging.error('Failed to start OpenTelemetry Collector: %s.', str(err))
|
|
309
|
+
elif telemetry:
|
|
310
|
+
logging.warning(
|
|
311
|
+
'Unexpected OPENTF_TELEMETRY environment variable value %s (accepted values are %s).',
|
|
312
|
+
telemetry,
|
|
313
|
+
', '.join(expected),
|
|
314
|
+
)
|
|
301
315
|
return []
|
|
302
316
|
|
|
303
317
|
|
opentf/toolkit/channels.py
CHANGED
|
@@ -528,6 +528,13 @@ def _must_keep_workspace(metadata: Dict[str, Any]) -> bool:
|
|
|
528
528
|
return False
|
|
529
529
|
|
|
530
530
|
|
|
531
|
+
def _must_remove_workspace(metadata: Dict[str, Any]) -> bool:
|
|
532
|
+
hooks_annotations = metadata.get('annotations', {}).get(HOOKS_ANNOTATIONS, {})
|
|
533
|
+
if hooks_annotations.get('channel') == 'teardown':
|
|
534
|
+
return hooks_annotations.get('keep-workspace') is False
|
|
535
|
+
return False
|
|
536
|
+
|
|
537
|
+
|
|
531
538
|
def _maybe_change_directory(
|
|
532
539
|
command: Dict[str, Any], runner_os: str, script: List[str], prefix: str
|
|
533
540
|
) -> None:
|
|
@@ -582,7 +589,12 @@ def _make_prolog(
|
|
|
582
589
|
if name in local_variables_names:
|
|
583
590
|
script.append(VARIABLE_MAKER[runner_os](name, value))
|
|
584
591
|
|
|
585
|
-
if step_sequence_id
|
|
592
|
+
if step_sequence_id != CHANNEL_RELEASE and _must_remove_workspace(
|
|
593
|
+
command['metadata']
|
|
594
|
+
):
|
|
595
|
+
script.append(PROLOG_SCRIPTS[runner_os][REMOVE_WORKSPACE])
|
|
596
|
+
_export_opentf_workspace(runner_os, '.', script)
|
|
597
|
+
elif step_sequence_id == CHANNEL_RELEASE:
|
|
586
598
|
# on windows, the script ends if it is removed, so script
|
|
587
599
|
# removal should be the last operation
|
|
588
600
|
if not _must_keep_workspace(command['metadata']):
|
|
@@ -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.dev1277
|
|
4
4
|
Summary: OpenTestFactory Orchestrator Toolkit
|
|
5
5
|
Home-page: https://gitlab.com/henixdevelopment/open-source/opentestfactory/python-toolkit
|
|
6
6
|
Author: Martin Lafaix
|
|
@@ -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=vOGxl7xBcp1-_LsAKiOmeOqFl2iT81A2XRrXBLUrNi4,22785
|
|
58
58
|
opentf/toolkit/__init__.py,sha256=mYeJPZ92ulbTBItqEsZgF4nnuRh6G19QPY3Jxc92ifc,23028
|
|
59
|
-
opentf/toolkit/channels.py,sha256=
|
|
59
|
+
opentf/toolkit/channels.py,sha256=ZKxJ6KplBt_SJS0H2Dikno_mogupFTJ94Myl4pWGFH8,24232
|
|
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.dev1277.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
62
|
+
opentf_toolkit_nightly-0.61.0.dev1277.dist-info/METADATA,sha256=M2qAA4WvCbNFxktm7FEhHxV3TtnNX9Lu0bd2Y0UGBBU,2192
|
|
63
|
+
opentf_toolkit_nightly-0.61.0.dev1277.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
|
|
64
|
+
opentf_toolkit_nightly-0.61.0.dev1277.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
|
|
65
|
+
opentf_toolkit_nightly-0.61.0.dev1277.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|