Skip to content

Commit 55bf100

Browse files
iurisilvioocelotl
andauthored
Upgrade tox (#3624)
* Upgrade tox * Remove tox-factor * Bump tox cache * Remove exporter-jaeger from matrix These tests were removed in 2a8d4ed, but tox-factor just ignored the problem, but tox 4 fails because the env does not exist. * Ignore py37 getting-started The py37 env was removed in 4a2cb86 and now tox 4 fails instead of ignore it like tox-factor. * Ignore pypy3 for some packages * Github actions exclude does not accept arrays * Contrib tests still running on tox 3 * Revert "Contrib tests still running on tox 3" This reverts commit fdcd75d. * Update contrib SHA * Remove excludes * Revert "Remove excludes" This reverts commit 1cf7b42. * WIP * More WIP --------- Co-authored-by: Diego Hurtado <[email protected]>
1 parent 12f4490 commit 55bf100

File tree

5 files changed

+37
-27
lines changed

5 files changed

+37
-27
lines changed

Diff for: .github/workflows/benchmarks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
python-version: ${{ env[matrix.python-version] }}
2626
architecture: 'x64'
2727
- name: Install tox
28-
run: pip install tox==3.27.1 -U tox-factor
28+
run: pip install tox
2929
- name: Cache tox environment
3030
# Preserves .tox directory between runs for faster installs
3131
uses: actions/cache@v2

Diff for: .github/workflows/public-api-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
python-version: '3.10'
3535

3636
- name: Install tox
37-
run: pip install tox==3.27.1 -U tox-factor
37+
run: pip install tox
3838

3939
- name: Public API Check
4040
run: tox -e public-symbols-check

Diff for: .github/workflows/test.yml

+17-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
# Otherwise, set variable to the commit of your branch on
1111
# opentelemetry-python-contrib which is compatible with these Core repo
1212
# changes.
13-
CONTRIB_REPO_SHA: d167ef7b43941a74378d625fea74628dd7572efa
13+
CONTRIB_REPO_SHA: 1a984d3ba18d4080c58485b7d807dba241179d41
1414
# This is needed because we do not clone the core repo in contrib builds anymore.
1515
# When running contrib builds as part of core builds, we use actions/checkout@v2 which
1616
# does not set an environment variable (simply just runs tox), which is different when
@@ -42,9 +42,6 @@ jobs:
4242
- "getting-started"
4343
- "opentracing-shim"
4444
- "opencensus-shim"
45-
- "exporter-jaeger-combined"
46-
- "exporter-jaeger-proto-grpc"
47-
- "exporter-jaeger-thrift"
4845
- "exporter-opencensus"
4946
- "exporter-otlp-proto-common"
5047
- "exporter-otlp-combined"
@@ -58,6 +55,16 @@ jobs:
5855
- "propagator-b3"
5956
- "propagator-jaeger"
6057
os: [ubuntu-20.04, windows-2019]
58+
exclude:
59+
- python-version: pypy3
60+
package: "opencensus-shim"
61+
- python-version: pypy3
62+
package: "exporter-opencensus"
63+
- python-version: pypy3
64+
package: "exporter-otlp-combined"
65+
- python-version: pypy3
66+
package: "exporter-otlp-proto-grpc"
67+
6168
steps:
6269
- name: Checkout Core Repo @ SHA - ${{ github.sha }}
6370
uses: actions/checkout@v2
@@ -67,15 +74,15 @@ jobs:
6774
python-version: ${{ env[matrix.python-version] }}
6875
architecture: 'x64'
6976
- name: Install tox
70-
run: pip install tox==3.27.1 -U tox-factor
77+
run: pip install tox
7178
- name: Cache tox environment
7279
# Preserves .tox directory between runs for faster installs
7380
uses: actions/cache@v2
7481
with:
7582
path: |
7683
.tox
7784
~/.cache/pip
78-
key: v3-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini',
85+
key: v4-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini',
7986
'dev-requirements.txt') }}-core
8087
- name: Windows does not let git check out files with long names
8188
if: ${{ matrix.os == 'windows-2019'}}
@@ -100,15 +107,15 @@ jobs:
100107
python-version: '3.10'
101108
architecture: 'x64'
102109
- name: Install tox
103-
run: pip install tox==3.27.1
110+
run: pip install tox
104111
- name: Cache tox environment
105112
# Preserves .tox directory between runs for faster installs
106113
uses: actions/cache@v2
107114
with:
108115
path: |
109116
.tox
110117
~/.cache/pip
111-
key: v3-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt')
118+
key: v4-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt')
112119
}}-core
113120
- name: run tox
114121
run: tox -e ${{ matrix.tox-environment }}
@@ -169,7 +176,7 @@ jobs:
169176
- "tornado"
170177
- "tortoiseorm"
171178
- "urllib"
172-
- "urllib3"
179+
- "urllib3v"
173180
- "wsgi"
174181
- "prometheus-remote-write"
175182
- "richconsole"
@@ -191,7 +198,7 @@ jobs:
191198
python-version: ${{ env[matrix.python-version] }}
192199
architecture: 'x64'
193200
- name: Install tox
194-
run: pip install tox==3.27.1 -U tox-factor
201+
run: pip install tox
195202
- name: Cache tox environment
196203
# Preserves .tox directory between runs for faster installs
197204
uses: actions/cache@v2

Diff for: CONTRIBUTING.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,12 @@ during their normal contribution hours.
3838

3939
This project uses [tox](https://tox.readthedocs.io) to automate
4040
some aspects of development, including testing against multiple Python versions.
41-
To install `tox`, run[^1]:
41+
To install `tox`, run:
4242

4343
```console
44-
$ pip install tox==3.27.1
44+
$ pip install tox
4545
```
4646

47-
[^1]: Right now we are experiencing issues with `tox==4.x.y`, so we recommend you use this version.
48-
4947
You can run `tox` with the following arguments:
5048

5149
- `tox` to run all existing tox commands, including unit tests for all packages

Diff for: tox.ini

+16-11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ envlist =
2020

2121
; docs/getting-started
2222
py3{8,9,10,11}-opentelemetry-getting-started
23+
pypy3-opentelemetry-getting-started
2324

2425
py3{8,9,10,11}-opentelemetry-opentracing-shim
2526
pypy3-opentelemetry-opentracing-shim
@@ -31,6 +32,7 @@ envlist =
3132
; exporter-opencensus intentionally excluded from pypy3
3233

3334
py3{8,9,10,11}-proto{3,4}-opentelemetry-exporter-otlp-proto-common
35+
pypy3-proto{3,4}-opentelemetry-exporter-otlp-proto-common
3436

3537
; opentelemetry-exporter-otlp
3638
py3{8,9,10,11}-opentelemetry-exporter-otlp-combined
@@ -90,8 +92,8 @@ deps =
9092
setenv =
9193
; override CONTRIB_REPO_SHA via env variable when testing other branches/commits than main
9294
; i.e: CONTRIB_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox -e <env to test>
93-
CONTRIB_REPO_SHA={env:CONTRIB_REPO_SHA:"main"}
94-
CONTRIB_REPO="git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@{env:CONTRIB_REPO_SHA}"
95+
CONTRIB_REPO_SHA={env:CONTRIB_REPO_SHA:main}
96+
CONTRIB_REPO=git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@{env:CONTRIB_REPO_SHA}
9597
mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/:{toxinidir}/tests/opentelemetry-test-utils/src/
9698

9799
changedir =
@@ -127,11 +129,11 @@ commands_pre =
127129
protobuf: pip install {toxinidir}/opentelemetry-proto
128130

129131
getting-started: pip install -r requirements.txt
130-
getting-started: pip install -e "{env:CONTRIB_REPO}#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http"
131-
getting-started: pip install -e "{env:CONTRIB_REPO}#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation"
132-
getting-started: pip install -e "{env:CONTRIB_REPO}#egg=opentelemetry-instrumentation-requests&subdirectory=instrumentation/opentelemetry-instrumentation-requests"
133-
getting-started: pip install -e "{env:CONTRIB_REPO}#egg=opentelemetry-instrumentation-wsgi&subdirectory=instrumentation/opentelemetry-instrumentation-wsgi"
134-
getting-started: pip install -e "{env:CONTRIB_REPO}#egg=opentelemetry-instrumentation-flask&subdirectory=instrumentation/opentelemetry-instrumentation-flask"
132+
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http
133+
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation
134+
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-requests&subdirectory=instrumentation/opentelemetry-instrumentation-requests
135+
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-wsgi&subdirectory=instrumentation/opentelemetry-instrumentation-wsgi
136+
getting-started: pip install -e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-flask&subdirectory=instrumentation/opentelemetry-instrumentation-flask
135137

136138
opencensus: pip install {toxinidir}/exporter/opentelemetry-exporter-opencensus
137139

@@ -255,14 +257,17 @@ deps =
255257
requests~=2.7
256258
markupsafe~=2.1
257259

260+
allowlist_externals =
261+
{toxinidir}/scripts/tracecontext-integration-test.sh
262+
258263
commands_pre =
259264
pip install -e {toxinidir}/opentelemetry-api \
260265
-e {toxinidir}/opentelemetry-semantic-conventions \
261266
-e {toxinidir}/opentelemetry-sdk \
262-
-e "{env:CONTRIB_REPO}#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http" \
263-
-e "{env:CONTRIB_REPO}#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation" \
264-
-e "{env:CONTRIB_REPO}#egg=opentelemetry-instrumentation-requests&subdirectory=instrumentation/opentelemetry-instrumentation-requests" \
265-
-e "{env:CONTRIB_REPO}#egg=opentelemetry-instrumentation-wsgi&subdirectory=instrumentation/opentelemetry-instrumentation-wsgi"
267+
-e {env:CONTRIB_REPO}\#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http \
268+
-e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation \
269+
-e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-requests&subdirectory=instrumentation/opentelemetry-instrumentation-requests \
270+
-e {env:CONTRIB_REPO}\#egg=opentelemetry-instrumentation-wsgi&subdirectory=instrumentation/opentelemetry-instrumentation-wsgi
266271

267272
commands =
268273
{toxinidir}/scripts/tracecontext-integration-test.sh

0 commit comments

Comments
 (0)