Rally installs track dependencies with pip install --upgrade --target ~/.rally/libs. This can upgrade transitive dependencies independently of Rally’s pinned environment.
For example, the elastic/security track installs geneve, which depends on anyio without any constraints. Two days ago, anyio 4.15.0 was released, and that version imports sentinel from typing_extensions, while Python resolves Rally’s pinned typing_extensions==4.12.2, which only provides Sentinel. (This is a recent breaking change in typing extensions.) The resulting mix of packages from ~/.rally/libs and Rally’s virtualenv fails at runtime:
File ".../.rally/libs/anyio/abc/_streams.py", line 8, in <module>
from .._core._typedattr import TypedAttributeProvider
File ".../.rally/libs/anyio/_core/_typedattr.py", line 10, in <module>
from typing_extensions import sentinel
ImportError: cannot import name 'sentinel' from 'typing_extensions' (.../rally/.venv/lib/python3.13/site-packages/typing_extensions.py)
(Notice how anyio comes from .rally/libs, while typing_extensions comes from .rally/.venv.)
Track dependency installation should use Rally’s resolved environment as a pip constraints file. This would allow track-specific packages to be installed or upgraded while forcing shared dependencies such as elasticsearch, anyio, and typing_extensions to versions compatible with Rally.
As a short-term mitigation, bumping Rally’s pinned dependencies, particularly typing_extensions, would restore compatibility with the newer anyio. However, without applying Rally’s constraints during track dependency installation, similar incompatibilities can recur whenever a track introduces or upgrades a shared transitive dependency.
Rally installs track dependencies with
pip install --upgrade --target ~/.rally/libs. This can upgrade transitive dependencies independently of Rally’s pinned environment.For example, the
elastic/securitytrack installs geneve, which depends onanyiowithout any constraints. Two days ago, anyio 4.15.0 was released, and that version importssentinelfromtyping_extensions, while Python resolves Rally’s pinnedtyping_extensions==4.12.2, which only providesSentinel. (This is a recent breaking change in typing extensions.) The resulting mix of packages from ~/.rally/libs and Rally’s virtualenv fails at runtime:(Notice how anyio comes from
.rally/libs, whiletyping_extensionscomes from.rally/.venv.)Track dependency installation should use Rally’s resolved environment as a pip constraints file. This would allow track-specific packages to be installed or upgraded while forcing shared dependencies such as
elasticsearch,anyio, andtyping_extensionsto versions compatible with Rally.As a short-term mitigation, bumping Rally’s pinned dependencies, particularly
typing_extensions, would restore compatibility with the newer anyio. However, without applying Rally’s constraints during track dependency installation, similar incompatibilities can recur whenever a track introduces or upgrades a shared transitive dependency.