Skip to content

Commit 6339fc4

Browse files
authored
Weaver live check test util (#5088)
* Add weaver live check test util helper * up * review feedback * more tests * update typing_extensions for util tests * fixing some very important linting errors * fix py3.14 errors on win - skip weaver live tests * don't run util tests on py3.14 win - grpcio is missing there * don't run util tests on py3.10 win - grpcio is missing there * conditional test deps * up * review comments * speed up weaver tests * fix segfault on pypy 3.10 on ubuntu * up
1 parent d206604 commit 6339fc4

File tree

10 files changed

+746
-2
lines changed

10 files changed

+746
-2
lines changed

.github/workflows/templates/test.yml.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ env:
2020
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
2121
'main'
2222
) || 'main' }}{% endraw %}
23+
WEAVER_VERSION: "v0.22.1"
2324
PIP_EXISTS_ACTION: w
2425
CONTRIB_REPO_UTIL_HTTP: ${% raw %}{{ github.workspace }}{% endraw %}/opentelemetry-python-contrib/util/opentelemetry-util-http
2526
CONTRIB_REPO_INSTRUMENTATION: ${% raw %}{{ github.workspace }}{% endraw %}/opentelemetry-python-contrib/opentelemetry-instrumentation
@@ -51,6 +52,14 @@ jobs:
5152
ref: ${% raw %}{{ env.CONTRIB_REPO_SHA }}{% endraw %}
5253
path: opentelemetry-python-contrib
5354
{%- endif %}
55+
{%- if "test-opentelemetry-test-utils" in job_data.tox_env and job_data.os != "windows-latest" %}
56+
57+
- name: Install weaver
58+
run: |
59+
WEAVER_URL="https://github.com/open-telemetry/weaver/releases/download/${% raw %}{{ env.WEAVER_VERSION }}{% endraw %}/weaver-x86_64-unknown-linux-gnu.tar.xz"
60+
curl -sSL "$WEAVER_URL" | tar -xJ -C /tmp weaver-x86_64-unknown-linux-gnu/weaver
61+
sudo mv /tmp/weaver-x86_64-unknown-linux-gnu/weaver /usr/local/bin/weaver
62+
{%- endif %}
5463

5564
- name: Set up Python {{ job_data.python_version }}
5665
uses: actions/setup-python@v5

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ env:
2020
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
2121
'main'
2222
) || 'main' }}
23+
WEAVER_VERSION: "v0.22.1"
2324
PIP_EXISTS_ACTION: w
2425
CONTRIB_REPO_UTIL_HTTP: ${{ github.workspace }}/opentelemetry-python-contrib/util/opentelemetry-util-http
2526
CONTRIB_REPO_INSTRUMENTATION: ${{ github.workspace }}/opentelemetry-python-contrib/opentelemetry-instrumentation
@@ -2865,6 +2866,12 @@ jobs:
28652866
- name: Checkout repo @ SHA - ${{ github.sha }}
28662867
uses: actions/checkout@v4
28672868

2869+
- name: Install weaver
2870+
run: |
2871+
WEAVER_URL="https://github.com/open-telemetry/weaver/releases/download/${{ env.WEAVER_VERSION }}/weaver-x86_64-unknown-linux-gnu.tar.xz"
2872+
curl -sSL "$WEAVER_URL" | tar -xJ -C /tmp weaver-x86_64-unknown-linux-gnu/weaver
2873+
sudo mv /tmp/weaver-x86_64-unknown-linux-gnu/weaver /usr/local/bin/weaver
2874+
28682875
- name: Set up Python 3.10
28692876
uses: actions/setup-python@v5
28702877
with:
@@ -2884,6 +2891,12 @@ jobs:
28842891
- name: Checkout repo @ SHA - ${{ github.sha }}
28852892
uses: actions/checkout@v4
28862893

2894+
- name: Install weaver
2895+
run: |
2896+
WEAVER_URL="https://github.com/open-telemetry/weaver/releases/download/${{ env.WEAVER_VERSION }}/weaver-x86_64-unknown-linux-gnu.tar.xz"
2897+
curl -sSL "$WEAVER_URL" | tar -xJ -C /tmp weaver-x86_64-unknown-linux-gnu/weaver
2898+
sudo mv /tmp/weaver-x86_64-unknown-linux-gnu/weaver /usr/local/bin/weaver
2899+
28872900
- name: Set up Python 3.11
28882901
uses: actions/setup-python@v5
28892902
with:
@@ -2903,6 +2916,12 @@ jobs:
29032916
- name: Checkout repo @ SHA - ${{ github.sha }}
29042917
uses: actions/checkout@v4
29052918

2919+
- name: Install weaver
2920+
run: |
2921+
WEAVER_URL="https://github.com/open-telemetry/weaver/releases/download/${{ env.WEAVER_VERSION }}/weaver-x86_64-unknown-linux-gnu.tar.xz"
2922+
curl -sSL "$WEAVER_URL" | tar -xJ -C /tmp weaver-x86_64-unknown-linux-gnu/weaver
2923+
sudo mv /tmp/weaver-x86_64-unknown-linux-gnu/weaver /usr/local/bin/weaver
2924+
29062925
- name: Set up Python 3.12
29072926
uses: actions/setup-python@v5
29082927
with:
@@ -2922,6 +2941,12 @@ jobs:
29222941
- name: Checkout repo @ SHA - ${{ github.sha }}
29232942
uses: actions/checkout@v4
29242943

2944+
- name: Install weaver
2945+
run: |
2946+
WEAVER_URL="https://github.com/open-telemetry/weaver/releases/download/${{ env.WEAVER_VERSION }}/weaver-x86_64-unknown-linux-gnu.tar.xz"
2947+
curl -sSL "$WEAVER_URL" | tar -xJ -C /tmp weaver-x86_64-unknown-linux-gnu/weaver
2948+
sudo mv /tmp/weaver-x86_64-unknown-linux-gnu/weaver /usr/local/bin/weaver
2949+
29252950
- name: Set up Python 3.13
29262951
uses: actions/setup-python@v5
29272952
with:
@@ -2941,6 +2966,12 @@ jobs:
29412966
- name: Checkout repo @ SHA - ${{ github.sha }}
29422967
uses: actions/checkout@v4
29432968

2969+
- name: Install weaver
2970+
run: |
2971+
WEAVER_URL="https://github.com/open-telemetry/weaver/releases/download/${{ env.WEAVER_VERSION }}/weaver-x86_64-unknown-linux-gnu.tar.xz"
2972+
curl -sSL "$WEAVER_URL" | tar -xJ -C /tmp weaver-x86_64-unknown-linux-gnu/weaver
2973+
sudo mv /tmp/weaver-x86_64-unknown-linux-gnu/weaver /usr/local/bin/weaver
2974+
29442975
- name: Set up Python 3.14
29452976
uses: actions/setup-python@v5
29462977
with:
@@ -2960,6 +2991,12 @@ jobs:
29602991
- name: Checkout repo @ SHA - ${{ github.sha }}
29612992
uses: actions/checkout@v4
29622993

2994+
- name: Install weaver
2995+
run: |
2996+
WEAVER_URL="https://github.com/open-telemetry/weaver/releases/download/${{ env.WEAVER_VERSION }}/weaver-x86_64-unknown-linux-gnu.tar.xz"
2997+
curl -sSL "$WEAVER_URL" | tar -xJ -C /tmp weaver-x86_64-unknown-linux-gnu/weaver
2998+
sudo mv /tmp/weaver-x86_64-unknown-linux-gnu/weaver /usr/local/bin/weaver
2999+
29633000
- name: Set up Python 3.14t
29643001
uses: actions/setup-python@v5
29653002
with:
@@ -2979,6 +3016,12 @@ jobs:
29793016
- name: Checkout repo @ SHA - ${{ github.sha }}
29803017
uses: actions/checkout@v4
29813018

3019+
- name: Install weaver
3020+
run: |
3021+
WEAVER_URL="https://github.com/open-telemetry/weaver/releases/download/${{ env.WEAVER_VERSION }}/weaver-x86_64-unknown-linux-gnu.tar.xz"
3022+
curl -sSL "$WEAVER_URL" | tar -xJ -C /tmp weaver-x86_64-unknown-linux-gnu/weaver
3023+
sudo mv /tmp/weaver-x86_64-unknown-linux-gnu/weaver /usr/local/bin/weaver
3024+
29823025
- name: Set up Python pypy-3.10
29833026
uses: actions/setup-python@v5
29843027
with:

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2828
([#5076](https://github.com/open-telemetry/opentelemetry-python/pull/5076))
2929
- `opentelemetry-semantic-conventions`: use `X | Y` union annotation
3030
([#5096](https://github.com/open-telemetry/opentelemetry-python/pull/5096))
31-
31+
- Add WeaverLiveCheck test util
32+
([#5088](https://github.com/open-telemetry/opentelemetry-python/pull/5088))
3233

3334
## Version 1.41.0/0.62b0 (2026-04-09)
3435

tests/opentelemetry-test-utils/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies = [
2828
"asgiref ~= 3.0",
2929
"opentelemetry-api == 1.42.0.dev",
3030
"opentelemetry-sdk == 1.42.0.dev",
31+
"requests ~= 2.28",
3132
]
3233

3334
[project.urls]

0 commit comments

Comments
 (0)