diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d882313d14d..50076d83bcd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ env: # Otherwise, set variable to the commit of your branch on # opentelemetry-python-contrib which is compatible with these Core repo # changes. - CONTRIB_REPO_SHA: b8d67dbc2f06e54dbbacd41fec085a3c0c180c71 + CONTRIB_REPO_SHA: 30d0c2ea90dffa7d958a28a699a9021ecb04aa71 # This is needed because we do not clone the core repo in contrib builds anymore. # When running contrib builds as part of core builds, we use actions/checkout@v2 which # does not set an environment variable (simply just runs tox), which is different when @@ -54,7 +54,7 @@ jobs: path: | .tox ~/.cache/pip - key: v2-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core + key: v3-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core # tox fails on windows and Python3.6 when tox dir is reused between builds so we remove it - name: fix for windows + py3.6 if: ${{ matrix.os == 'windows-2019' && matrix.python-version == 'py36' }} @@ -109,7 +109,7 @@ jobs: path: | .tox ~/.cache/pip - key: v2-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core + key: v3-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-core - name: run tox run: tox -e ${{ matrix.tox-environment }} @@ -152,6 +152,6 @@ jobs: path: | .tox ~/.cache/pip - key: v2-tox-cache-${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib + key: v3-tox-cache-${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}-${{ hashFiles('tox.ini', 'dev-requirements.txt') }}-contrib - name: run tox run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} diff --git a/opentelemetry-sdk/tests/logs/test_export.py b/opentelemetry-sdk/tests/logs/test_export.py index 502c68ed759..3e6eed38510 100644 --- a/opentelemetry-sdk/tests/logs/test_export.py +++ b/opentelemetry-sdk/tests/logs/test_export.py @@ -44,6 +44,9 @@ from opentelemetry.trace import TraceFlags from opentelemetry.trace.span import INVALID_SPAN_CONTEXT +is_pypy = hasattr(sys, "pypy_version_info") +supports_register_at_fork = hasattr(os, "fork") and sys.version_info >= (3, 7) + class TestSimpleLogProcessor(unittest.TestCase): def test_simple_log_processor_default_level(self): @@ -272,8 +275,9 @@ def bulk_log_and_flush(num_logs): finished_logs = exporter.get_finished_logs() self.assertEqual(len(finished_logs), 2415) - @unittest.skipUnless( - hasattr(os, "fork") and sys.version_info >= (3, 7), + # TODO: fix https://github.com/open-telemetry/opentelemetry-python/issues/2346 + @unittest.skipIf( + is_pypy or not supports_register_at_fork, "needs *nix and minor version 7 or later", ) def test_batch_log_processor_fork(self):