opentf-toolkit-nightly 0.61.0.dev1267__py3-none-any.whl → 0.61.0.dev1274__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 CHANGED
@@ -223,6 +223,9 @@ def parse_and_start(
223
223
  ) -> List[Any]:
224
224
  """Lookup item manifests and start them if not disabled."""
225
225
  result = []
226
+ if not paths:
227
+ logging.warning('No paths to search for %s, aborting', item)
228
+ return result
226
229
  for path in paths:
227
230
  for entry in os.walk(path):
228
231
  logging.debug("Reading path '%s'.", entry[0])
@@ -286,15 +289,29 @@ def maybe_start_eventbus(conf: Dict[str, Any]) -> List[Any]:
286
289
 
287
290
 
288
291
  def maybe_start_otelcol():
289
- if (v := _get_env('OPENTF_TELEMETRY')) and v.lower() in ('true', 'yes', 'on', '1'):
292
+ telemetry = _get_env('OPENTF_TELEMETRY')
293
+ expected = ('true', 'yes', 'on', '1')
294
+ if telemetry and telemetry.lower() in expected:
290
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
+ )
291
302
  cmd = '"/usr/local/bin/otelcol --config=file:/app/otelcol-config.yaml $OTELCOL_EXTRA_OPTIONS"'
292
- logging.info('Starting OpenTelemetry Collector...')
303
+ logging.info(f'Starting OpenTelemetry Collector{options_msg}...')
293
304
  pid = subprocess.Popen(f'sh -c {cmd}', shell=True)
294
305
  logging.debug('(pid is %d.)', pid.pid)
295
306
  return [pid]
296
307
  except Exception as err:
297
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
+ )
298
315
  return []
299
316
 
300
317
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: opentf-toolkit-nightly
3
- Version: 0.61.0.dev1267
3
+ Version: 0.61.0.dev1274
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=oUPymARagVRCwfvtSf8oDD6zndld-XvDnB8RchdY4e4,22155
57
+ opentf/scripts/startup.py,sha256=vOGxl7xBcp1-_LsAKiOmeOqFl2iT81A2XRrXBLUrNi4,22785
58
58
  opentf/toolkit/__init__.py,sha256=mYeJPZ92ulbTBItqEsZgF4nnuRh6G19QPY3Jxc92ifc,23028
59
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.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,,
61
+ opentf_toolkit_nightly-0.61.0.dev1274.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
62
+ opentf_toolkit_nightly-0.61.0.dev1274.dist-info/METADATA,sha256=IPGR5Sr0w4hDW9loGKtpuO3O9B_YlP1X8DJF--E1ja0,2192
63
+ opentf_toolkit_nightly-0.61.0.dev1274.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
64
+ opentf_toolkit_nightly-0.61.0.dev1274.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
65
+ opentf_toolkit_nightly-0.61.0.dev1274.dist-info/RECORD,,