Skip to content

Commit

Permalink
chore(ci): bump riot version and pin virtualenv==20.26.6 for hatch us…
Browse files Browse the repository at this point in the history
…e with python3.7 [2.12] (#11109)

This PR is a combination of this backport PR
#11085 and an additional
`virtualenv` version pinning fix that were required to unblock the CI
for the 2.12 release branch.

The reason the original backport PR was not sufficient to fix the CI for
2.12 unlike 2.13+ was because of some discrepancies with CircleCI vs.
GitLab. Since 2.11 and 2.12 still run the `appsec_threat_*` tests via
CircleCI, it was somehow still using the newer `virtualenv==20.27.0`
instead of `virtualenv==20.26.0` that we attempted to pin in the
previous backport.

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: Taegyun Kim <[email protected]>
  • Loading branch information
erikayasuda and taegyunkim authored Oct 21, 2024
1 parent df9472b commit 2ddc6f5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.templ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ commands:
description: "Install riot"
steps:
# Make sure we install and run riot on Python 3
- run: pip3 install riot==0.19.1
- run: pip3 install riot==0.20.0

setup_rust:
description: "Install rust toolchain"
Expand Down Expand Up @@ -119,7 +119,7 @@ commands:
setup_hatch:
description: "Install hatch"
steps:
- run: pip3 install hatch~=1.8.0 hatch-containers==0.7.0
- run: pip3 install hatch~=1.8.0 hatch-containers==0.7.0 virtualenv==20.26.6

start_docker_services:
description: "Start Docker services"
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
name: Generate config
command: |
export GIT_COMMIT_DESC=$(git log -n 1 $CIRCLE_SHA1)
pip3 install riot==0.19.1
pip3 install riot==0.20.0
riot -P -v run --pass-env -s circleci-gen-config -- -v
- continuation/continue:
configuration_path: .circleci/config.gen.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/requirements-locks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: pyenv global 3.10 3.7 3.8 3.9 3.11 3.12

- name: Install Dependencies
run: pip install --upgrade pip && pip install riot
run: pip install --upgrade pip && pip install riot==0.20.0

- name: Generate riot locks
run: scripts/compile-and-prune-test-requirements
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ jobs:
- name: Install hatch
run: pip install hatch

- name: Install virtualenv
run: pip install virtualenv==20.26.6

- name: Run tests
run: hatch run ddtrace_unit_tests:test
3 changes: 2 additions & 1 deletion .gitlab/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
tags: [ "arch:arm64" ]
before_script:
- pyenv global 3.12 3.7 3.8 3.9 3.10 3.11 3.13-dev
- pip install riot~=0.19.1
- pip install riot==0.20.0

build_base_venvs:
extends: .testrunner
Expand All @@ -15,6 +15,7 @@ build_base_venvs:
CMAKE_BUILD_PARALLEL_LEVEL: 24
PIP_VERBOSE: 1
script:
- pip install riot==0.20.0
- riot -P -v generate --python=$PYTHON_VERSION
artifacts:
name: venv_$PYTHON_VERSION
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing-testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ In addition, you will need `riot <https://ddriot.readthedocs.io/en/latest/>`_ an

.. code-block:: bash
$ pip install riot==0.19.1
$ pip install riot==0.20.0
$ pip install hatch~=1.8.0 hatch-containers==0.7.0
Some of our test environments are managed with Riot, others with Hatch.
Expand Down
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"ddapm-test-agent>=1.2.0",
"packaging==23.1",
"pygments==2.16.1",
"riot==0.19.1",
"riot==0.20.0",
"ruff==0.1.3",
"clang-format==18.1.5",
]
Expand Down
3 changes: 1 addition & 2 deletions scripts/ddtest
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ fi
# retry docker pull if fails
for i in {1..3}; do docker-compose pull -q testrunner && break || sleep 3; done

FULL_CMD="pip install -q --disable-pip-version-check riot==0.19.1 hatch && $CMD"

FULL_CMD="pip install -q --disable-pip-version-check riot==0.20.0 hatch~=1.8.0 virtualenv==20.26.6 && $CMD"

# install and upgrade riot in case testrunner image has not been updated
# DEV: Use `--no-TTY` and `--quiet-pull` when running in CircleCI
Expand Down

0 comments on commit 2ddc6f5

Please sign in to comment.