Skip to content

Preserve Rally dependency constraints when installing track dependencies #2180

Description

@pquentin

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    :PackagingInstallation issues or packaging problemsbugSomething's wrongdependenciesPull requests that update a dependency file

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions