Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
80955de
Releng: move release preparation to scripts/release
fressi-elastic Mar 23, 2026
a5f58db
Apply suggestion from @Copilot
fressi-elastic Mar 23, 2026
696dd22
Apply suggestion from @Copilot
fressi-elastic Mar 23, 2026
65eb6b5
Use scripts/githooks/pre-commit and scripts/githooks/post-commit as G…
fressi-elastic Mar 23, 2026
f99b746
Remove sentence from contributing guide.
fressi-elastic Mar 23, 2026
6fbe035
Call `make pre-commit` in pre-commit hook.
fressi-elastic Mar 23, 2026
b7f8c18
Address pending comments from PR
fressi-elastic Mar 23, 2026
e1e0b64
docs: point release prep at Codex runbook, drop duplicated steps
fressi-elastic Mar 23, 2026
cef8a3c
Remove updated procudures from public documentation.
fressi-elastic Mar 23, 2026
b24e379
Remove references to Java 17 from changed documents.
fressi-elastic Mar 23, 2026
ca3f756
Rename RALLY_CHANGELOG_TOKEN to RALLY_CHANGELOG_TOKEN_FILE
fressi-elastic Mar 23, 2026
d348682
Remove stale Preparing a release doc references
fressi-elastic Mar 23, 2026
8fdedc4
Remove internal Codex links; restore public maintainer and doc pointers
fressi-elastic Mar 24, 2026
082057e
Remove docker based script and git hooks changes as being unrelated. …
fressi-elastic Mar 26, 2026
fa83363
Fix follow-ups from release tooling cleanup
fressi-elastic Mar 26, 2026
ad669f6
Fix makefile after prepare-docker.sh has been removed.
fressi-elastic Mar 26, 2026
56e27a8
Bump version to 2.14.0
fressi-elastic Mar 26, 2026
056be98
Workaround connection errors downloading licences from GitHub
fressi-elastic Mar 26, 2026
1cf1c6f
Fix regressions of Makefile
fressi-elastic Mar 27, 2026
aad1035
Merge branch 'master' of github.com:elastic/rally into chore/release-…
fressi-elastic Mar 27, 2026
e5cbac4
Revert esrally/_version.py
fressi-elastic Mar 27, 2026
34fd5e6
Fix broken script.
fressi-elastic Mar 27, 2026
4b6bf33
Release dry-run, drop tracked NOTICE.txt, fix tar on Python 3.10/3.11
fressi-elastic Mar 27, 2026
0d13a40
Harden release changelog: stderr messages, prepare.sh propagates fail…
fressi-elastic Mar 27, 2026
0ad1602
Merge branch 'master' of github.com:elastic/rally into chore/release-…
fressi-elastic Mar 28, 2026
56da168
Use pylint on changelog.py
fressi-elastic Mar 28, 2026
0a5e196
Merge branch 'master' of github.com:elastic/rally into chore/release-…
fressi-elastic Mar 30, 2026
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
85 changes: 85 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Patterns aligned with .gitignore — reduces Docker build context size.
# See .gitignore for original references and rationale.

# OS
.DS_Store
.AppleDouble
.LSOverride
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.AppleDB
.AppleDesktop
.apdisk

# IDE / editors
*.iml
.idea/
*~
/.project
/.pydevproject
/.vscode

# Virtualenv / local env
.venv*/
env/
.envrc
.python-version

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# Test / coverage
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
junit-*.xml
.pytest_cache/

# Translations / logs
*.mo
*.pot
*.log

# Docs build
docs/_build/

# PyBuilder
target/

# Pickles
*.pk

# Rally-specific
.rally_it/
NOTICE.txt
recipes/ccr/ccr-target-hosts.json
tracks/
12 changes: 11 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,15 @@ repos:
"-j0",
"--rcfile=.pylintrc",
]
exclude: ^(docs/|changelog.py)
exclude: ^(docs/|scripts/release/changelog\.py)
require_serial: true

# Shell scripts: release tooling and repo githooks. Widen to all *.sh once legacy
# scripts under .buildkite/, recipes/, repo root, etc. pass shellcheck.
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
name: shellcheck
args: [-x]
files: (^scripts/release/.*\.sh$)|(^scripts/githooks/(pre-commit|post-commit)$)
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ If you want to get started in the project, a good idea is to check issues labele
You will need to fork the Rally repository and clone it to your local machine. See
the [Github help page](https://help.github.com/articles/fork-a-repo) for help.

Optional: use this repository’s hooks under `scripts/githooks` (instead of `.git/hooks`):

```bash
make install-git-hooks
```

This sets `git config core.hooksPath scripts/githooks` in your local clone. You can run the same `git config` command by hand if you prefer.

* **`pre-commit`** — runs `uv run -- pre-commit run` (same as `make pre-commit`) on staged files before the commit is created. Requires [uv](https://docs.astral.sh/uv/) and a dev environment (`make install` or `make venv`).
* **`post-commit`** — strips `Co-authored-by` / `Made-with: Cursor` trailers Cursor may add; it runs `git commit --amend` when the message changes, so the latest commit’s hash can change.

To stop using these hooks in this clone, run `git config --unset core.hooksPath`. The post-commit hook sets `GIT_CURSOR_HOOK_AMENDING` internally to avoid re-running while amending; you normally do not need to set that variable yourself.

### Importing the project into IntelliJ IDEA

Rally builds using virtualenv. When importing into IntelliJ you will need to define an appropriate Python SDK, which is provided by virtualenv.
Expand All @@ -60,7 +73,7 @@ Once your changes and tests are ready to submit for review:

Ensure that all tests pass by running `make check-all`. This runs sequentially lint checks, unit tests and integration tests. These can be executed in isolation using `make lint`, `make test` and `make it` respectively, in case you need to iterate over a subset of tests.

Note: Integration tests are much slower than unit tests and require `docker-compose`.
Note: Integration tests are much slower than unit tests and require `docker compose`. They also require **Java 21**; set `JAVA_HOME` (or `JAVA21_HOME`) to match.

3. Sign the Contributor License Agreement

Expand All @@ -79,6 +92,10 @@ Then sit back and wait. There will probably be discussion about the pull request

Note: Contributors belonging to the "Elastic" organization on Github can merge PRs themselves after getting a "LGTM" (Looks good to me); this workflow is similar to the established one in the Elasticsearch project.

## Release process (maintainers)

Follow the internal **Rally Release Process** runbook: https://codex.elastic.dev/r/elasticsearch-team/teams/performance/runbooks/rally-release-process
Comment thread
fressi-elastic marked this conversation as resolved.
Outdated

# Contributing to the Rally codebase

**Repository:** [https://github.com/elastic/rally](https://github.com/elastic/rally)
Expand Down
27 changes: 12 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ PY_VERSION := $(shell jq -r '.python_versions.DEFAULT_PY_VER' .ci/variables.json
export UV_PYTHON := $(PY_VERSION)
export UV_PROJECT_ENVIRONMENT := $(VIRTUAL_ENV)

PRE_COMMIT_HOOK_PATH := .git/hooks/pre-commit

LOG_CI_LEVEL := INFO

# --- Global goals ---
Expand Down Expand Up @@ -57,7 +55,7 @@ check-all: all
format \
pre-commit \
precommit \
install-pre-commit \
install-git-hooks \
docs \
serve-docs \
clean-docs \
Expand Down Expand Up @@ -143,14 +141,9 @@ lint: venv
precommit pre-commit: venv
uv run -- pre-commit run

# It install a pre-commit hook in the project .git dir so modified files are checked before creating every commit.
install-pre-commit: $(PRE_COMMIT_HOOK_PATH)

$(PRE_COMMIT_HOOK_PATH):
mkdir -p $(dir $@)
echo '#!/usr/bin/env $(SHELL)' > '$@'
echo 'make pre-commit' >> '$@'
chmod ugo+x '$@'
# It points git at scripts/githooks (pre-commit + post-commit). Run from the repo root.
install-git-hooks:
git config core.hooksPath scripts/githooks

# pre-commit run also formats files, but let's keep `make format` for convenience.
format: lint
Expand Down Expand Up @@ -217,11 +210,15 @@ benchmark: venv
# --- Release goals ---

release-checks: venv
$(VENV_ACTIVATE); ./release-checks.sh $(release_version) $(next_version)
@if [ -z "$(RELEASE_VERSION)" ]; then echo "error: set RELEASE_VERSION (e.g. make release-checks RELEASE_VERSION=2.13.0)" >&2; exit 1; fi
$(VENV_ACTIVATE); ./scripts/release/checks.sh $(RELEASE_VERSION)

# usage: e.g. make release release_version=0.9.2 next_version=0.9.3
release: venv release-checks clean docs lint test it
$(VENV_ACTIVATE); ./release.sh $(release_version) $(next_version)
# usage: e.g. make release RELEASE_VERSION=2.13.0
release:
@if [ -z "$(RELEASE_VERSION)" ]; then echo "error: set RELEASE_VERSION (e.g. make release RELEASE_VERSION=2.13.0)" >&2; exit 1; fi
./scripts/release/prepare-docker.sh $(RELEASE_VERSION)

# --- Other goals ---

# This is a shortcut for creating a shell running inside the project virtual environment.
sh:
Expand Down
8 changes: 2 additions & 6 deletions docs/developing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Install the following software packages:

* `uv <https://docs.astral.sh/uv/getting-started/installation/>`_
* JDK version required to build Elasticsearch. Please refer to the `build setup requirements <https://github.com/elastic/elasticsearch/blob/main/CONTRIBUTING.md#contributing-to-the-elasticsearch-codebase>`_.
For running Rally's integration tests (e.g. ``make it`` or ``make it_tracks_compat``), ensure your environment uses **Java 21** (recent Rally versions use Java 21 in CI). Set ``JAVA_HOME`` or ``JAVA21_HOME`` accordingly.
* `Docker <https://docs.docker.com/install/>`_ and on Linux additionally `docker-compose <https://docs.docker.com/compose/install/>`_.
* `jq <https://stedolan.github.io/jq/download/>`_
* git
Expand Down Expand Up @@ -36,7 +37,7 @@ Rally uses automatic code formatters. You can apply them by running ``make forma

However, consider using editor integrations to do it automatically: you'll need to configure `black <https://black.readthedocs.io/en/stable/integrations/editors.html>`_ and `isort <https://github.com/PyCQA/isort/wiki/isort-Plugins>`_.

Also consider running `pre-commit install` to run lint as part of your git commits.
Also consider running ``make install-git-hooks`` to point git at ``scripts/githooks`` so lint runs on each commit (same as ``make pre-commit`` via the hook there).

Automatic Updates
~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -76,8 +77,3 @@ To get a rough understanding of Rally, it makes sense to get to know its key com
* `Reporter`: A reporter tells us how the race went (currently only after the fact).

There is a dedicated :doc:`tutorial on how to add new tracks to Rally</adding_tracks>`.

How to contribute code
----------------------

See the `contributors guide <https://github.com/elastic/rally/blob/master/CONTRIBUTING.md>`_. We strive to be PEP-8 compliant but don't follow it to the letter.
Comment thread
fressi-elastic marked this conversation as resolved.
1 change: 1 addition & 0 deletions docs/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,4 @@ You can then build and test the image with::

docker build --tag=custom-rally .
docker run -ti custom-rally list tracks

64 changes: 0 additions & 64 deletions prepare-release.sh

This file was deleted.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ classifiers = [
]
################################################################################################
#
# Adapt `create-notice.sh` whenever changing dependencies here.
# Adapt `scripts/release/create-notice.sh` whenever changing dependencies here.
#
# That script grabs all license files so we include them in the notice file.
#
Expand Down Expand Up @@ -92,6 +92,8 @@ dependencies = [
"hatch==1.3.1",
"hatchling==1.6.0",
"wheel==0.46.2",
# Release Docker image pins the same pip (scripts/release/Dockerfile).
"pip==26.0.1",
Comment thread
fressi-elastic marked this conversation as resolved.
Outdated
]

[project.optional-dependencies]
Expand All @@ -117,6 +119,7 @@ develop = [
"pytest-httpserver==1.1.3",
"sphinx==5.1.1",
"furo==2022.06.21",
# Release image + prepare-docker venv pin the same version (scripts/release/Dockerfile, prepare-docker.sh).
"github3.py==3.2.0",
"pre-commit==2.20.0",
"pylint==3.3.8",
Expand Down
70 changes: 0 additions & 70 deletions release-checks.sh

This file was deleted.

Loading
Loading