Skip to content

Commit c3afdcf

Browse files
authored
backport(google-genai): loosen instrumented version restriction (#4597)
* backport(google-genai): loosen instrumented version restriction This is a backport of open-telemetry/opentelemetry-python-genai#21 to the v0.7b0 release branch. * Pin workflows to older core sha so they don't try to build against main
1 parent 5f915e7 commit c3afdcf

18 files changed

Lines changed: 106 additions & 199 deletions

File tree

.github/workflows/core_contrib_test_0.yml

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -143,66 +143,6 @@ jobs:
143143
- name: Run tests
144144
run: tox -e py39-test-instrumentation-vertexai-latest -- -ra
145145

146-
py39-test-instrumentation-google-genai-oldest:
147-
name: instrumentation-google-genai-oldest
148-
runs-on: ubuntu-latest
149-
timeout-minutes: 30
150-
steps:
151-
- name: Checkout contrib repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
152-
uses: actions/checkout@v4
153-
with:
154-
repository: open-telemetry/opentelemetry-python-contrib
155-
ref: ${{ env.CONTRIB_REPO_SHA }}
156-
157-
- name: Checkout core repo @ SHA - ${{ env.CORE_REPO_SHA }}
158-
uses: actions/checkout@v4
159-
with:
160-
repository: open-telemetry/opentelemetry-python
161-
ref: ${{ env.CORE_REPO_SHA }}
162-
path: opentelemetry-python
163-
164-
- name: Set up Python 3.9
165-
uses: actions/setup-python@v5
166-
with:
167-
python-version: "3.9"
168-
architecture: "x64"
169-
170-
- name: Install tox
171-
run: pip install tox-uv
172-
173-
- name: Run tests
174-
run: tox -e py39-test-instrumentation-google-genai-oldest -- -ra
175-
176-
py39-test-instrumentation-google-genai-latest:
177-
name: instrumentation-google-genai-latest
178-
runs-on: ubuntu-latest
179-
timeout-minutes: 30
180-
steps:
181-
- name: Checkout contrib repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
182-
uses: actions/checkout@v4
183-
with:
184-
repository: open-telemetry/opentelemetry-python-contrib
185-
ref: ${{ env.CONTRIB_REPO_SHA }}
186-
187-
- name: Checkout core repo @ SHA - ${{ env.CORE_REPO_SHA }}
188-
uses: actions/checkout@v4
189-
with:
190-
repository: open-telemetry/opentelemetry-python
191-
ref: ${{ env.CORE_REPO_SHA }}
192-
path: opentelemetry-python
193-
194-
- name: Set up Python 3.9
195-
uses: actions/setup-python@v5
196-
with:
197-
python-version: "3.9"
198-
architecture: "x64"
199-
200-
- name: Install tox
201-
run: pip install tox-uv
202-
203-
- name: Run tests
204-
run: tox -e py39-test-instrumentation-google-genai-latest -- -ra
205-
206146
py39-test-instrumentation-anthropic-oldest:
207147
name: instrumentation-anthropic-oldest
208148
runs-on: ubuntu-latest

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ env:
2525
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
2626
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
2727
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
28-
'main'
29-
) || 'main' }}{% endraw %}
28+
'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4'
29+
) || 'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4' }}{% endraw %}
3030
CONTRIB_REPO_SHA: main
3131
PIP_EXISTS_ACTION: w
3232

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ env:
2525
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
2626
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
2727
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
28-
'main'
29-
) || 'main' }}{% endraw %}
28+
'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4'
29+
) || 'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4' }}{% endraw %}
3030
CONTRIB_REPO_SHA: main
3131
PIP_EXISTS_ACTION: w
3232

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ env:
2525
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
2626
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
2727
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
28-
'main'
29-
) || 'main' }}{% endraw %}
28+
'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4'
29+
) || 'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4' }}{% endraw %}
3030
CONTRIB_REPO_SHA: main
3131
PIP_EXISTS_ACTION: w
3232

.github/workflows/lint_0.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ env:
2525
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
2626
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
2727
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
28-
'main'
29-
) || 'main' }}
28+
'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4'
29+
) || 'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4' }}
3030
CONTRIB_REPO_SHA: main
3131
PIP_EXISTS_ACTION: w
3232

.github/workflows/misc_0.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ env:
2525
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
2626
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
2727
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
28-
'main'
29-
) || 'main' }}
28+
'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4'
29+
) || 'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4' }}
3030
CONTRIB_REPO_SHA: main
3131
PIP_EXISTS_ACTION: w
3232

.github/workflows/test_0.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ env:
2525
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
2626
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
2727
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
28-
'main'
29-
) || 'main' }}
28+
'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4'
29+
) || 'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4' }}
3030
CONTRIB_REPO_SHA: main
3131
PIP_EXISTS_ACTION: w
3232

@@ -716,44 +716,6 @@ jobs:
716716
- name: Run tests
717717
run: tox -e py314-test-instrumentation-vertexai-latest -- -ra
718718

719-
py39-test-instrumentation-google-genai-oldest_ubuntu-latest:
720-
name: instrumentation-google-genai-oldest 3.9 Ubuntu
721-
runs-on: ubuntu-latest
722-
timeout-minutes: 30
723-
steps:
724-
- name: Checkout repo @ SHA - ${{ github.sha }}
725-
uses: actions/checkout@v4
726-
727-
- name: Set up Python 3.9
728-
uses: actions/setup-python@v5
729-
with:
730-
python-version: "3.9"
731-
732-
- name: Install tox
733-
run: pip install tox-uv
734-
735-
- name: Run tests
736-
run: tox -e py39-test-instrumentation-google-genai-oldest -- -ra
737-
738-
py39-test-instrumentation-google-genai-latest_ubuntu-latest:
739-
name: instrumentation-google-genai-latest 3.9 Ubuntu
740-
runs-on: ubuntu-latest
741-
timeout-minutes: 30
742-
steps:
743-
- name: Checkout repo @ SHA - ${{ github.sha }}
744-
uses: actions/checkout@v4
745-
746-
- name: Set up Python 3.9
747-
uses: actions/setup-python@v5
748-
with:
749-
python-version: "3.9"
750-
751-
- name: Install tox
752-
run: pip install tox-uv
753-
754-
- name: Run tests
755-
run: tox -e py39-test-instrumentation-google-genai-latest -- -ra
756-
757719
py310-test-instrumentation-google-genai-oldest_ubuntu-latest:
758720
name: instrumentation-google-genai-oldest 3.10 Ubuntu
759721
runs-on: ubuntu-latest
@@ -4781,3 +4743,41 @@ jobs:
47814743

47824744
- name: Run tests
47834745
run: tox -e py314-test-instrumentation-fastapi -- -ra
4746+
4747+
pypy3-test-instrumentation-fastapi_ubuntu-latest:
4748+
name: instrumentation-fastapi pypy-3.9 Ubuntu
4749+
runs-on: ubuntu-latest
4750+
timeout-minutes: 30
4751+
steps:
4752+
- name: Checkout repo @ SHA - ${{ github.sha }}
4753+
uses: actions/checkout@v4
4754+
4755+
- name: Set up Python pypy-3.9
4756+
uses: actions/setup-python@v5
4757+
with:
4758+
python-version: "pypy-3.9"
4759+
4760+
- name: Install tox
4761+
run: pip install tox-uv
4762+
4763+
- name: Run tests
4764+
run: tox -e pypy3-test-instrumentation-fastapi -- -ra
4765+
4766+
py39-test-instrumentation-flask-0_ubuntu-latest:
4767+
name: instrumentation-flask-0 3.9 Ubuntu
4768+
runs-on: ubuntu-latest
4769+
timeout-minutes: 30
4770+
steps:
4771+
- name: Checkout repo @ SHA - ${{ github.sha }}
4772+
uses: actions/checkout@v4
4773+
4774+
- name: Set up Python 3.9
4775+
uses: actions/setup-python@v5
4776+
with:
4777+
python-version: "3.9"
4778+
4779+
- name: Install tox
4780+
run: pip install tox-uv
4781+
4782+
- name: Run tests
4783+
run: tox -e py39-test-instrumentation-flask-0 -- -ra

.github/workflows/test_1.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -25,51 +25,13 @@ env:
2525
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
2626
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
2727
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
28-
'main'
29-
) || 'main' }}
28+
'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4'
29+
) || 'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4' }}
3030
CONTRIB_REPO_SHA: main
3131
PIP_EXISTS_ACTION: w
3232

3333
jobs:
3434

35-
pypy3-test-instrumentation-fastapi_ubuntu-latest:
36-
name: instrumentation-fastapi pypy-3.9 Ubuntu
37-
runs-on: ubuntu-latest
38-
timeout-minutes: 30
39-
steps:
40-
- name: Checkout repo @ SHA - ${{ github.sha }}
41-
uses: actions/checkout@v4
42-
43-
- name: Set up Python pypy-3.9
44-
uses: actions/setup-python@v5
45-
with:
46-
python-version: "pypy-3.9"
47-
48-
- name: Install tox
49-
run: pip install tox-uv
50-
51-
- name: Run tests
52-
run: tox -e pypy3-test-instrumentation-fastapi -- -ra
53-
54-
py39-test-instrumentation-flask-0_ubuntu-latest:
55-
name: instrumentation-flask-0 3.9 Ubuntu
56-
runs-on: ubuntu-latest
57-
timeout-minutes: 30
58-
steps:
59-
- name: Checkout repo @ SHA - ${{ github.sha }}
60-
uses: actions/checkout@v4
61-
62-
- name: Set up Python 3.9
63-
uses: actions/setup-python@v5
64-
with:
65-
python-version: "3.9"
66-
67-
- name: Install tox
68-
run: pip install tox-uv
69-
70-
- name: Run tests
71-
run: tox -e py39-test-instrumentation-flask-0 -- -ra
72-
7335
py39-test-instrumentation-flask-1_ubuntu-latest:
7436
name: instrumentation-flask-1 3.9 Ubuntu
7537
runs-on: ubuntu-latest
@@ -4781,3 +4743,41 @@ jobs:
47814743

47824744
- name: Run tests
47834745
run: tox -e py311-test-instrumentation-redis -- -ra
4746+
4747+
py312-test-instrumentation-redis_ubuntu-latest:
4748+
name: instrumentation-redis 3.12 Ubuntu
4749+
runs-on: ubuntu-latest
4750+
timeout-minutes: 30
4751+
steps:
4752+
- name: Checkout repo @ SHA - ${{ github.sha }}
4753+
uses: actions/checkout@v4
4754+
4755+
- name: Set up Python 3.12
4756+
uses: actions/setup-python@v5
4757+
with:
4758+
python-version: "3.12"
4759+
4760+
- name: Install tox
4761+
run: pip install tox-uv
4762+
4763+
- name: Run tests
4764+
run: tox -e py312-test-instrumentation-redis -- -ra
4765+
4766+
py313-test-instrumentation-redis_ubuntu-latest:
4767+
name: instrumentation-redis 3.13 Ubuntu
4768+
runs-on: ubuntu-latest
4769+
timeout-minutes: 30
4770+
steps:
4771+
- name: Checkout repo @ SHA - ${{ github.sha }}
4772+
uses: actions/checkout@v4
4773+
4774+
- name: Set up Python 3.13
4775+
uses: actions/setup-python@v5
4776+
with:
4777+
python-version: "3.13"
4778+
4779+
- name: Install tox
4780+
run: pip install tox-uv
4781+
4782+
- name: Run tests
4783+
run: tox -e py313-test-instrumentation-redis -- -ra

.github/workflows/test_2.yml

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -25,51 +25,13 @@ env:
2525
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
2626
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
2727
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
28-
'main'
29-
) || 'main' }}
28+
'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4'
29+
) || 'f32b684a1ccd6d5eb658ec0b45bf18928ea430e4' }}
3030
CONTRIB_REPO_SHA: main
3131
PIP_EXISTS_ACTION: w
3232

3333
jobs:
3434

35-
py312-test-instrumentation-redis_ubuntu-latest:
36-
name: instrumentation-redis 3.12 Ubuntu
37-
runs-on: ubuntu-latest
38-
timeout-minutes: 30
39-
steps:
40-
- name: Checkout repo @ SHA - ${{ github.sha }}
41-
uses: actions/checkout@v4
42-
43-
- name: Set up Python 3.12
44-
uses: actions/setup-python@v5
45-
with:
46-
python-version: "3.12"
47-
48-
- name: Install tox
49-
run: pip install tox-uv
50-
51-
- name: Run tests
52-
run: tox -e py312-test-instrumentation-redis -- -ra
53-
54-
py313-test-instrumentation-redis_ubuntu-latest:
55-
name: instrumentation-redis 3.13 Ubuntu
56-
runs-on: ubuntu-latest
57-
timeout-minutes: 30
58-
steps:
59-
- name: Checkout repo @ SHA - ${{ github.sha }}
60-
uses: actions/checkout@v4
61-
62-
- name: Set up Python 3.13
63-
uses: actions/setup-python@v5
64-
with:
65-
python-version: "3.13"
66-
67-
- name: Install tox
68-
run: pip install tox-uv
69-
70-
- name: Run tests
71-
run: tox -e py313-test-instrumentation-redis -- -ra
72-
7335
py314-test-instrumentation-redis_ubuntu-latest:
7436
name: instrumentation-redis 3.14 Ubuntu
7537
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ repos:
2020
- id: rstcheck
2121
additional_dependencies: ['rstcheck[sphinx]']
2222
args: ["--report-level", "warning"]
23+
exclude: ^_template/

0 commit comments

Comments
 (0)