Skip to content

Update release preparation to scripts/release#2069

Open
fressi-elastic wants to merge 27 commits intoelastic:masterfrom
fressi-elastic:chore/release-preparation-tooling
Open

Update release preparation to scripts/release#2069
fressi-elastic wants to merge 27 commits intoelastic:masterfrom
fressi-elastic:chore/release-preparation-tooling

Conversation

@fressi-elastic
Copy link
Copy Markdown
Contributor

@fressi-elastic fressi-elastic commented Mar 23, 2026

Supersedes #2067

Summary

  • Release prep scripts live under scripts/release/: prepare.sh (NOTICE, AUTHORS, changelog via changelog.py, version bump in esrally/_version.py, git commit), with create-notice.sh as the shared NOTICE generator.
  • Makefile: make release RELEASE_VERSION=X.Y.Z runs prepare.sh; make release-checks / make test-release run clean, lint, test-all, docs, then prepare.sh --dry with the same version.
  • Removed root prepare-release.sh and release-checks.sh in favor of the paths above.
  • scripts/offline-install.sh sources create-notice.sh from scripts/release/.
  • Changelog automation: changelog.py reads the GitHub token from a file; set RALLY_CHANGELOG_TOKEN_FILE to that path (default ~/.github/rally_release_changelog.token). github3.py remains a develop dependency for this script.
  • Docs: CONTRIBUTING.md (maintainer release pointer), docs/developing.rst (e.g. Java 21 for integration tests).
  • Tooling: pyproject.toml / uv.lock updates as needed (including a documented pip pin for track dependency installs); .pre-commit-config.yaml runs shellcheck on scripts/release/*.sh and pylint includes scripts/release/changelog.py.
  • Small fix: esrally/utils/io.py — tar extraction uses filter="tar" on Python 3.12+ with a fallback for 3.10/3.11.

Out of scope

Per-release generated artifacts for an actual release (e.g. committed CHANGELOG.md, AUTHORS, NOTICE.txt, version bump) can land in a follow-up release PR after this merges.

Maintainer runbook

Consolidate release scripts under scripts/release/, add Docker/Makefile
integration, githooks, and documentation. Root prepare-release.sh and
release-checks.sh are removed in favor of the unified layout.

This commit intentionally excludes release artifacts (AUTHORS, CHANGELOG,
_version, NOTICE) which land in a follow-up release PR.
@fressi-elastic fressi-elastic requested a review from Copilot March 23, 2026 13:38
@fressi-elastic fressi-elastic changed the title Releng: move release preparation to scripts/release Move release preparation to scripts/release Mar 23, 2026
@fressi-elastic fressi-elastic mentioned this pull request Mar 23, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorganizes and expands Rally’s release engineering workflow by moving release preparation into scripts/release/, adding a dedicated Docker-based release preparation path, and updating documentation + tooling references accordingly.

Changes:

  • Introduces scripts/release/prepare.sh and scripts/release/prepare-docker.sh (with a dedicated scripts/release/Dockerfile) to standardize release prep in a container.
  • Updates release-related scripts to use a shared token-path convention (RALLY_CHANGELOG_TOKEN) and improves milestone handling in scripts/release/changelog.py.
  • Adds repo githooks and extends pre-commit configuration (shellcheck for release scripts), plus documentation updates.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
uv.lock Locks new pip dependency resolution.
scripts/release/prepare.sh New host/container release preparation script (NOTICE/AUTHORS/CHANGELOG/version bump + commit).
scripts/release/prepare-docker.sh New Docker runner for release prep (bind-mount repo, named venv volume, UID/GID handling).
scripts/release/create-notice.sh Improves NOTICE generation (curl retries, dependency list updates).
scripts/release/checks.sh Replaces old release checks with token-aware, platform-aware checks under scripts/release/.
scripts/release/changelog.py Adds token path configurability + milestone reopen/create logic.
scripts/release/Dockerfile New image for release prep tooling and editable install.
scripts/offline-install.sh Updates NOTICE generation script path.
scripts/githooks/pre-commit Adds optional repo-managed pre-commit hook wrapper.
scripts/githooks/post-commit Adds optional hook to strip Cursor trailers from commit messages.
release-checks.sh Removes legacy release checks script at repo root.
pyproject.toml Updates NOTICE script reference; adds pip pin; documents github3.py pin rationale.
prepare-release.sh Removes legacy release preparation script at repo root.
docs/docker.rst Documents the separate maintainer-focused release prep image and workflow.
docs/developing.rst Adds a detailed “Preparing a release” section and token guidance.
Makefile Updates release / release-checks targets to use new scripts and RELEASE_VERSION.
CONTRIBUTING.md Documents optional repo hooks; adds maintainer release process pointers.
.pre-commit-config.yaml Adjusts pylint excludes for moved changelog; adds shellcheck hook for release scripts/hooks.
.dockerignore Adds a root dockerignore to keep the release-prep image build context small.
Comments suppressed due to low confidence (1)

scripts/release/changelog.py:116

  • Spelling in the comment: GitHub is capitalized as GitHub, not Github. Please update for consistency with the rest of the docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fressi-elastic and others added 7 commits March 23, 2026 14:47
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Elastic maintainers should follow the internal Rally Release Process on
Codex for tokens, milestones, make release, and the full workflow.

ReadTheDocs keeps only validation and implementation pointers: what
make release skips, release-checks and pre-commit, and where Docker
and changelog scripts document behavior. CONTRIBUTING, prepare-docker,
checks.sh, and Dockerfile comments cross-link accordingly.
Copy link
Copy Markdown
Member

@gareth-ellis gareth-ellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some initial comments

@fressi-elastic
Copy link
Copy Markdown
Contributor Author

The run book for these procedures is being updated here -> https://github.com/elastic/elasticsearch-team/pull/2546

The env var holds a filesystem path to the token file, not the secret.
Update changelog.py, checks.sh, and prepare-docker.sh; clarify error
messages that a token file path is required.
Drop orphan dev_preparing_a_release anchor from developing.rst.
Point release scripts only at the Codex runbook for workflow and
release-checks expectations.
@fressi-elastic fressi-elastic force-pushed the chore/release-preparation-tooling branch from 89cfaa2 to d348682 Compare March 24, 2026 11:20
- CONTRIBUTING.md: point maintainers at make release and scripts/release
- docs/developing.rst: restore How to contribute code section
- scripts/release: drop codex.elastic.dev references from checks.sh and prepare-docker.sh
@fressi-elastic
Copy link
Copy Markdown
Contributor Author

Thank you @gareth-ellis and @gbanasiak. I addressed all your comments.

@fressi-elastic fressi-elastic requested a review from a team March 24, 2026 11:31
Remove duplicate github3.py and the obsolete Docker release comment from develop extras. Correct the developing docs typo (performed) and the Makefile install-pre-commit comment grammar.

Made-with: Cursor
@fressi-elastic fressi-elastic changed the title Move release preparation to scripts/release Update release preparation to scripts/release Mar 27, 2026
Remove scripts/release/checks.sh and run make release-checks via
prepare.sh --dry, which mirrors prepare without writing repo files or
using git. Stop committing NOTICE.txt; prepare.sh stages only AUTHORS,
CHANGELOG.md, and esrally/_version.py.

Add changelog.py --dry (argparse) so dry prepare does not create
GitHub milestones; gate TarFile.extractall(filter=...) on Python 3.12+
to fix decompression tests on 3.10 and 3.11.

Made-with: Cursor
…ures

prepare.sh: detect changelog.py failures explicitly for dry and normal
runs; print a clear error and exit with the script exit code.

changelog.py: token/login errors and uncaught exceptions report to
stderr; tracebacks on stderr; changelog markdown explicitly on stdout;
brief stderr status before emitting markdown.

Made-with: Cursor
@fressi-elastic fressi-elastic force-pushed the chore/release-preparation-tooling branch from eb1c30e to 56da168 Compare March 28, 2026 01:30
@fressi-elastic
Copy link
Copy Markdown
Contributor Author

I addressed all comments and fixed more things, then updated the description of this PR.

@fressi-elastic fressi-elastic added the enhancement Improves the status quo label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improves the status quo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants