Reference to change:
|
executor.shutdown(wait=False, cancel_futures=True) |
The v1.45.0 ThreadPoolExecutor shutdown wait=False change in opentelemetry.sdk.resources.get_aggregated_resources is triggering failures in leaked thread detector in app unit tests.
The regression introduced in v1.45.0:
- Resource.create() call in MeterProvider.init() that spins up a background ThreadPoolExecutor to run resource detectors in parallel.
- The 1.44.0 version of the sdk was using the ThreadPoolExecutor in a context manager expression, which joins all of its threads on exit from context.
- However, version 1.45.0 doesn't use the context manager and instead shuts down the thread pool explicitly with wait=False, which bypasses the thread join calls resulting in the race condition with the thread leak detection in our test suite.
Reference to change:
opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py
Line 776 in 4f0fcfa
The v1.45.0 ThreadPoolExecutor shutdown wait=False change in opentelemetry.sdk.resources.get_aggregated_resources is triggering failures in leaked thread detector in app unit tests.
The regression introduced in v1.45.0: