Update release preparation to scripts/release#2069
Update release preparation to scripts/release#2069fressi-elastic wants to merge 27 commits intoelastic:masterfrom
Conversation
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.
There was a problem hiding this comment.
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.shandscripts/release/prepare-docker.sh(with a dedicatedscripts/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 inscripts/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, notGithub. Please update for consistency with the rest of the docs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
gareth-ellis
left a comment
There was a problem hiding this comment.
Added some initial comments
|
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.
89cfaa2 to
d348682
Compare
- 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
|
Thank you @gareth-ellis and @gbanasiak. I addressed all your comments. |
…Also update documentation.
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
…preparation-tooling
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
…preparation-tooling
eb1c30e to
56da168
Compare
|
I addressed all comments and fixed more things, then updated the description of this PR. |
…preparation-tooling
Supersedes #2067
Summary
scripts/release/:prepare.sh(NOTICE, AUTHORS, changelog viachangelog.py, version bump inesrally/_version.py, git commit), withcreate-notice.shas the shared NOTICE generator.make release RELEASE_VERSION=X.Y.Zrunsprepare.sh;make release-checks/make test-releaserunclean,lint,test-all,docs, thenprepare.sh --drywith the same version.prepare-release.shandrelease-checks.shin favor of the paths above.scripts/offline-install.shsourcescreate-notice.shfromscripts/release/.changelog.pyreads the GitHub token from a file; setRALLY_CHANGELOG_TOKEN_FILEto that path (default~/.github/rally_release_changelog.token).github3.pyremains a develop dependency for this script.CONTRIBUTING.md(maintainer release pointer),docs/developing.rst(e.g. Java 21 for integration tests).pyproject.toml/uv.lockupdates as needed (including a documentedpippin for track dependency installs);.pre-commit-config.yamlruns shellcheck onscripts/release/*.shand pylint includesscripts/release/changelog.py.esrally/utils/io.py— tar extraction usesfilter="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