Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
665557f
Revert "Allow configuring the process startup method to be used for c…
fressi-elastic Aug 26, 2025
41a544a
Merge branch 'master' of github.com:elastic/rally
fressi-elastic Sep 18, 2025
0925770
Merge branch 'master' of github.com:elastic/rally
fressi-elastic Sep 29, 2025
d32aee7
Add support for Python3.13 (pass unit tests).
fressi-elastic Sep 29, 2025
dff998d
Revert unnecessary changes.
fressi-elastic Sep 30, 2025
8e4f56f
Revert unnecessary changes.
fressi-elastic Sep 30, 2025
df04aa1
Revert unnecessary changes.
fressi-elastic Sep 30, 2025
91ae14a
Update the uv.lock file.
fressi-elastic Sep 30, 2025
f2965c7
Add entries for Python v3.13 to the CI testing matrix.
fressi-elastic Sep 30, 2025
e37d7b9
It drops support for Python 3.9
fressi-elastic Sep 30, 2025
7f4fee3
Fix docs/migrate.rst
fressi-elastic Sep 30, 2025
4ca911d
Remove statement: from __future__ import annotations
fressi-elastic Sep 30, 2025
cb01f3a
Fix esrally/track/params.py and update uv.lock file.
fressi-elastic Sep 30, 2025
001f33b
Revert changes to esrally/storage/_range.py
fressi-elastic Sep 30, 2025
78d294f
Skip testing version 3.12 in buildkite pipeline.
fressi-elastic Sep 30, 2025
4f20116
Fix some other annotation and one pylint founding.
fressi-elastic Sep 30, 2025
9e217ef
Update CI python versions file.
fressi-elastic Oct 2, 2025
23e1314
Remove unnecessary changes.
fressi-elastic Oct 2, 2025
ab11c9b
Update CI python versions.
fressi-elastic Oct 2, 2025
4e06935
Set Python3.13 as the default version.
fressi-elastic Oct 2, 2025
45a9015
Let `make test` and `make it` use python 3.13
fressi-elastic Oct 2, 2025
0e9cc67
Add standard-imghdr because imghdr has been removed from python 3.13
fressi-elastic Oct 2, 2025
48f3da0
Update docker image version.
fressi-elastic Oct 2, 2025
0699feb
Use managed python version for preparing venv directory.
fressi-elastic Oct 2, 2025
8c75c66
Refactor Makefile:
fressi-elastic Oct 2, 2025
073d5f4
Add goal to run IT for serverless.
fressi-elastic Oct 2, 2025
210565c
Add goal for rally_tracks_compat
fressi-elastic Oct 2, 2025
bf47095
Fix PHONY goals.
fressi-elastic Oct 2, 2025
7ff36ad
Update python versions for mypy and black
fressi-elastic Oct 2, 2025
6cbea73
Update .buildkite pipeline files.
fressi-elastic Oct 2, 2025
e3f2857
Fix UV installation step.
fressi-elastic Oct 2, 2025
0678a19
Debug CI scripts
fressi-elastic Oct 2, 2025
6fbff06
Fix Dockerfile and CI scripts.
fressi-elastic Oct 2, 2025
d2ffdb5
Fix VENV path in Dockerfile.
fressi-elastic Oct 2, 2025
a92dbf6
Use levacy VIRTUAL_ENV as name for VENV_DIR
fressi-elastic Oct 2, 2025
5ceb63e
Force Python version when running it_serverless test cases.
fressi-elastic Oct 3, 2025
35a216f
Export PY_VERSION as an environment variable.
fressi-elastic Oct 3, 2025
930ac3a
Update uv version in Docerfile.
fressi-elastic Oct 3, 2025
caea1a3
It drops the check for max python version.
fressi-elastic Oct 4, 2025
9dea73e
Drop dependency on tox/nox.
fressi-elastic Oct 4, 2025
a08fa72
It ensures the rally plugin is installed before using for tests.
fressi-elastic Oct 4, 2025
f408e14
It renames Makefile goal rally_tracks_compat -> it_tracks_compat
fressi-elastic Oct 4, 2025
a7a0e6e
It adds some comment in the Makefile.
fressi-elastic Oct 4, 2025
9b38493
Remove unnecessary requirements and update wheel version.
fressi-elastic Oct 6, 2025
70a88c2
Update Makefile error message.
fressi-elastic Oct 6, 2025
3f943fe
Update add_missing_loggers_to_config to make it a little easier to read.
fressi-elastic Oct 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .buildkite/it/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ agents:
machineType: "n1-standard-8"

steps:
- label: "Run 3.9 integration tests :test_tube:"
command: bash .buildkite/it/run.sh 3.9
- label: "Run 3.12 integration tests :test_tube:"
command: bash .buildkite/it/run.sh 3.12
- label: "Run 3.10 integration tests :test_tube:"
command: bash .buildkite/it/run.sh 3.10
- label: "Run 3.13 integration tests :test_tube:"
Comment thread
fressi-elastic marked this conversation as resolved.
command: bash .buildkite/it/run.sh 3.13
4 changes: 2 additions & 2 deletions .ci/variables.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"python_versions": {
"PY39": "3.9.16",
"PY310": "3.10.10",
"PY311": "3.11.7",
"PY312": "3.12.2",
"MIN_PY_VER": "3.9.16",
"PY313": "3.13.1",
Comment thread
fressi-elastic marked this conversation as resolved.
Outdated
"MIN_PY_VER": "3.10.0",
"DEFAULT_PY_VER": "3.12.2"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
os:
- macos-13
- ubuntu-latest
Expand Down
32 changes: 26 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,36 @@ docs: check-venv
serve-docs: check-venv
@. $(VENV_ACTIVATE_FILE); cd docs && $(MAKE) serve

test: check-venv
. $(VENV_ACTIVATE_FILE); nox -s test-3.9
test: test-3.12

test-3.10: check-venv
. $(VENV_ACTIVATE_FILE); nox -s test-3.10

test-3.11: check-venv
. $(VENV_ACTIVATE_FILE); nox -s test-3.11

# It checks the recommended python version
test-3.12: check-venv
. $(VENV_ACTIVATE_FILE); nox -s test-3.12

# checks min and max python versions
it: check-venv python-caches-clean
. $(VENV_ACTIVATE_FILE); nox -s it-3.9
test-3.13: check-venv
. $(VENV_ACTIVATE_FILE); nox -s test-3.13

# It checks the recommended python version
it: it-3.12

it-3.10: check-venv python-caches-clean
. $(VENV_ACTIVATE_FILE); nox -s it-3.10

it-3.11: check-venv python-caches-clean
. $(VENV_ACTIVATE_FILE); nox -s it-3.11

it-3.12: check-venv python-caches-clean
. $(VENV_ACTIVATE_FILE); nox -s it-3.12

it-3.13: check-venv python-caches-clean
. $(VENV_ACTIVATE_FILE); nox -s it-3.13

check-all: lint test it

benchmark: check-venv
Expand All @@ -117,4 +138,3 @@ release-checks: check-venv
# usage: e.g. make release release_version=0.9.2 next_version=0.9.3
release: check-venv release-checks clean docs lint test it
. $(VENV_ACTIVATE_FILE); ./release.sh $(release_version) $(next_version)

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Rally is developed for Unix and is actively tested on Linux and macOS. Rally sup

**Note**: If you actively develop on Elasticsearch, we recommend that you [install Rally in development mode](https://esrally.readthedocs.io/en/latest/developing.html#installation-instructions-for-development) instead as Elasticsearch is fast moving and Rally always adapts accordingly to the latest main version.

Install Python 3.9+ including `pip3`, git 1.9+ and an [appropriate JDK to run Elasticsearch](https://www.elastic.co/support/matrix#matrix_jvm). Be sure that `JAVA_HOME` points to that JDK. Then run the following command, optionally prefixed by `sudo` if necessary:
Install Python 3.10+ including `pip3`, git 1.9+ and an [appropriate JDK to run Elasticsearch](https://www.elastic.co/support/matrix#matrix_jvm). Be sure that `JAVA_HOME` points to that JDK. Then run the following command, optionally prefixed by `sudo` if necessary:

pip3 install esrally

Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Rally does not support Windows and is only actively tested on macOS and Linux. I
Python
~~~~~~

* Python 3.9-3.12 available as ``python3`` on the path. Verify with: ``python3 --version``.
* Python (from version 3.10.x to version 3.13.x) available as ``python3`` on the system executable path. Please verify with: ``python3 --version``.
* Python3 header files (included in the Python3 development package).
* ``pip3`` available on the path. Verify with ``pip3 --version``.

Expand Down
6 changes: 3 additions & 3 deletions docs/migrate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Migration Guide
Migrating to Rally 2.12.0
-------------------------

Minimum Python version is 3.9.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Minimum Python version is 3.10.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Rally 2.12.0 requires Python 3.9.0 or above. Check the :ref:`updated installation instructions <install_python>` for more details.
Rally 2.12.0 requires Python 3.10.0 or above. Check the :ref:`updated installation instructions <install_python>` for more details.

The metrics store keeps existing index templates
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Rally is developed for Unix and is actively tested on Linux and macOS. Rally sup
Install
-------

Install Python 3.9+ including ``pip3``, git 1.9+ and an `appropriate JDK to run Elasticsearch <https://www.elastic.co/support/matrix#matrix_jvm>`_ Be sure that ``JAVA_HOME`` points to that JDK. Then run the following command, optionally prefixed by ``sudo`` if necessary::
Install Python 3.10+ including ``pip3``, git 1.9+ and an `appropriate JDK to run Elasticsearch <https://www.elastic.co/support/matrix#matrix_jvm>`_ Be sure that ``JAVA_HOME`` points to that JDK. Then run the following command, optionally prefixed by ``sudo`` if necessary::

pip3 install esrally

Expand Down
21 changes: 19 additions & 2 deletions esrally/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import os
import sys
import typing
import urllib

from ._version import __version__
Expand Down Expand Up @@ -72,9 +73,25 @@
'''


class Version(typing.NamedTuple):
major: int
minor: int = 0
micro: int = 0

def __str__(self) -> str:
return f"{self.major}.{self.minor}.{self.micro}"


MIN_PYTHON_VERSION = Version(3, 10)

MAX_PYTHON_VERSION = Version(3, 14)
Comment thread
fressi-elastic marked this conversation as resolved.
Outdated


def check_python_version():
if sys.version_info < (3, 9):
raise RuntimeError("Rally requires at least Python 3.9 but you are using:\n\nPython %s" % str(sys.version))
if sys.version_info < MIN_PYTHON_VERSION:
raise RuntimeError(f"Expecting Python version >= {MIN_PYTHON_VERSION}, got {sys.version}")
if sys.version_info >= MAX_PYTHON_VERSION:
raise RuntimeError(f"Expecting Python version < {MAX_PYTHON_VERSION}, got {sys.version}")


def doc_link(path=None):
Expand Down
2 changes: 0 additions & 2 deletions esrally/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import logging
import socket
import traceback
Expand Down
2 changes: 0 additions & 2 deletions esrally/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import collections
import datetime
import glob
Expand Down
2 changes: 0 additions & 2 deletions esrally/rally.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import argparse
import datetime
import logging
Expand Down
4 changes: 1 addition & 3 deletions esrally/storage/_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import datetime
import importlib
import logging
Expand Down Expand Up @@ -57,7 +55,7 @@ class Head:
crc32c: str | None = None
date: datetime.datetime | None = None

def check(self, other: Head, ignore: Container[str] = _HEAD_CHECK_IGNORE) -> None:
def check(self, other: "Head", ignore: Container[str] = _HEAD_CHECK_IGNORE) -> None:
for field in ("url", "content_length", "accept_ranges", "ranges", "document_length", "crc32c", "date"):
if ignore is not None and field in ignore:
continue
Expand Down
10 changes: 4 additions & 6 deletions esrally/storage/_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import logging
import os
import urllib.parse
from collections.abc import Mapping
from typing import Any, NamedTuple, Protocol, runtime_checkable
from typing import Any, NamedTuple, Optional, Protocol, runtime_checkable

import boto3
from botocore.response import StreamingBody
Expand Down Expand Up @@ -56,7 +54,7 @@ def __init__(
self,
aws_profile: str | None = AWS_PROFILE,
chunk_size: int = CHUNK_SIZE,
s3_client: S3Client | None = None,
s3_client: Optional["S3Client"] = None,
Comment thread
gbanasiak marked this conversation as resolved.
Outdated
) -> None:
self.chunk_size = chunk_size
self.aws_profile = aws_profile
Expand Down Expand Up @@ -91,7 +89,7 @@ def get(self, url: str, stream: Writable, head: Head | None = None) -> Head:
_s3_client = None

@property
def _s3(self) -> S3Client:
def _s3(self) -> "S3Client":
if self._s3_client is None:
self._s3_client = boto3.Session(profile_name=self.aws_profile).client("s3")
return self._s3_client
Expand All @@ -104,7 +102,7 @@ class S3Address(NamedTuple):
region: str = ""

@classmethod
def from_url(cls, url: str, region: str = "") -> S3Address:
def from_url(cls, url: str, region: str = "") -> "S3Address":
url = url.strip()
if not url:
raise ValueError("unspecified remote file url")
Expand Down
4 changes: 1 addition & 3 deletions esrally/storage/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import logging
import threading
import time
Expand Down Expand Up @@ -202,7 +200,7 @@ def _server_connections(self, url: str) -> WaitGroup:
with self._lock:
return self._connections[_server_key(url)]

def _server_stats_from_url(self, url: str, ttl: float | None = None) -> deque[ServerStats]:
def _server_stats_from_url(self, url: str, ttl: float | None = None) -> deque["ServerStats"]:
with self._lock:
stats = self._stats[_server_key(url)]
if ttl is not None:
Expand Down
2 changes: 0 additions & 2 deletions esrally/storage/_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import concurrent.futures
from typing import Protocol, runtime_checkable

Expand Down
2 changes: 0 additions & 2 deletions esrally/storage/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import json
import logging
from collections.abc import Mapping, MutableMapping
Expand Down
2 changes: 0 additions & 2 deletions esrally/storage/_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import atexit
import logging
import os
Expand Down
2 changes: 0 additions & 2 deletions esrally/storage/_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import json
import os
from collections import defaultdict
Expand Down
11 changes: 5 additions & 6 deletions esrally/storage/_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import enum
import json
import logging
Expand All @@ -24,7 +22,7 @@
import time
from collections.abc import Iterator, Mapping
from contextlib import contextmanager
from typing import BinaryIO
from typing import BinaryIO, Optional

from esrally.storage._adapter import Head, ServiceUnavailableError
from esrally.storage._client import MAX_CONNECTIONS, Client
Expand Down Expand Up @@ -79,7 +77,8 @@ def __init__(
url: str,
path: str,
executor: Executor,
document_length: int | None,
*,
document_length: int | None = None,
todo: RangeSet = NO_RANGE,
done: RangeSet = NO_RANGE,
multipart_size: int | None = None,
Expand Down Expand Up @@ -126,7 +125,7 @@ def __init__(
self._multipart_size = multipart_size
self._todo = todo - done
self._done = done
self._fds: list[FileDescriptor] = []
self._fds: list["FileDescriptor"] = []
self._executor = executor
self._errors: list[Exception] = []
self._lock = threading.Lock()
Expand Down Expand Up @@ -349,7 +348,7 @@ def close(self):
LOG.warning("error closing file descriptor %r: %s", fd.path, ex)

@contextmanager
def _open(self) -> Iterator[FileDescriptor | None]:
def _open(self) -> Iterator[Optional["FileDescriptor"]]:
Comment thread
gbanasiak marked this conversation as resolved.
Outdated
todo: RangeSet
with self._lock:
# It gets a part of the file to transfer from the remaining range.
Expand Down
2 changes: 0 additions & 2 deletions esrally/storage/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import copy
from collections.abc import Iterable

Expand Down
11 changes: 4 additions & 7 deletions esrally/track/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

from __future__ import annotations

import collections
import inspect
import logging
Expand All @@ -33,8 +30,8 @@
from esrally.track import track
from esrally.utils import io

__PARAM_SOURCES_BY_OP: dict[track.OperationType, ParamSource] = {}
__PARAM_SOURCES_BY_NAME: dict[str, ParamSource] = {}
__PARAM_SOURCES_BY_OP: dict[track.OperationType, "ParamSource"] = {}
__PARAM_SOURCES_BY_NAME: dict[str, "ParamSource"] = {}


def param_source_for_operation(op_type, track, params, task_name):
Expand Down Expand Up @@ -970,8 +967,8 @@ def create_readers(
conflict_probability: float,
on_conflict: str,
recency: str,
create_reader: Callable[..., IndexDataReader],
) -> list[IndexDataReader]:
create_reader: Callable[..., "IndexDataReader"],
) -> list["IndexDataReader"]:
"""
Return a list of IndexDataReader instances to allow a range of clients to read their share of corpora.

Expand Down
2 changes: 0 additions & 2 deletions esrally/utils/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import enum
import math
from collections.abc import Callable
Expand Down
Loading