Skip to content

Commit

Permalink
tests: pin MarkupSafe dependency (#3478) (#3876)
Browse files Browse the repository at this point in the history
The 2.1.0 release of MarkupSafe comes with some changes that break some
of the projects that depend on it. We fix the framework tests by pinning
the version to the latest 2.0 release for now.

(cherry picked from commit 3e1958b)

Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
  • Loading branch information
mergify[bot] and P403n1x87 committed Jun 28, 2022
1 parent b47b31f commit 642dc6d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/test_frameworks.yml
Expand Up @@ -94,7 +94,7 @@ jobs:
# django.tests.requests module interferes with requests library patching in the tracer -> disable requests patch
run: DD_TRACE_REQUESTS_ENABLED=0 ddtrace-run tests/runtests.py

fastapi-testsuite-0_63:
fastapi-testsuite-0_75:
runs-on: ubuntu-latest
env:
DD_TESTING_RAISE: true
Expand All @@ -112,21 +112,18 @@ jobs:
- uses: actions/checkout@v2
with:
repository: tiangolo/fastapi
ref: 0.63.0
ref: 0.75.0
path: fastapi
#This step installs Flit, a way to put Python packages and modules on PyPI (More info at https://flit.readthedocs.io/en/latest/)
- name: Install Flit
run: pip install flit
#Installs all dependencies needed for FastAPI
- name: Install Dependencies
run: flit install --symlink
#Reverts SQLalchemy to v1.3.24. Newest version breaks tests due to RowProxy module being deprecated in latest v1.4.11 More info: (https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#rowproxy-is-no-longer-a-proxy-is-now-called-row-and-behaves-like-an-enhanced-named-tuple)
- name: Downgrade SQLalchemy
run: pip install --force-reinstall SQLAlchemy==1.3.24
- name: Inject ddtrace
run: pip install ../ddtrace
- name: Test
run: ddtrace-run pytest tests
run: ddtrace-run pytest -p no:warnings tests

flask-testsuite-1_1_4:
runs-on: ubuntu-latest
Expand All @@ -153,13 +150,16 @@ jobs:
run: pip install tox
- name: Create tox env
run: tox -e py38 --notest
- name: Inject ddtrace
run: .tox/py38/bin/pip install ../ddtrace
- name: Add pytest configuration for ddtrace
run: echo -e "[pytest]\nddtrace-patch-all = 1" > pytest.ini
- name: Run tests
# test_exception_propagation is broken upstream
run: tox -e py38 -- -k 'not test_exception_propagation and not test_memory_consumption'
run: |
source .tox/py38/bin/activate
pip install ../ddtrace
pip install -e .
pip install --upgrade MarkupSafe==2.0.1
pytest -p no:warnings -k 'not test_exception_propagation and not test_memory_consumption' tests/
httpx-testsuite-0_22_0:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -276,6 +276,8 @@ jobs:
run: pip install ../ddtrace
- name: Install dependencies
run: "make init"
- name: MarkupSafe fix
run: pip install --upgrade MarkupSafe==2.0.1
- name: Run tests
run: ddtrace-run pytest -p no:warnings tests

Expand Down

0 comments on commit 642dc6d

Please sign in to comment.