[build] Support per-language patch releases#16987
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enables per-language patch releases for individual Selenium language bindings (e.g., selenium-4.28.1-ruby), allowing targeted updates without requiring a full release of all components.
Changes:
- Implements tag format validation: patch releases (X.Y.Z where Z>0) must have a language suffix, while full releases (X.Y.0) cannot
- Refactors Rakefile by splitting into modular per-language task files (from PR #16979) to support language-specific release workflows
- Updates pre-release and release workflows to parse language-specific tags and conditionally skip Selenium Manager, browser pins, CDP updates, and GitHub release creation for patch releases
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/pre-release.yml |
Adds tag parsing logic with language detection and validation; conditionally skips global update jobs for patch releases |
.github/workflows/release.yml |
Filters publish and docs matrix jobs by detected language; skips GitHub release, nightly, and mirror jobs for patch releases |
.github/workflows/update-documentation.yml |
Updates language parameter mappings from abbreviations (rb, py, node) to full names (ruby, python, javascript) |
Rakefile |
Loads language-specific rake files into namespaced tasks with full-name aliases; adds prep_release, update_cdp, and lint tasks |
rake_tasks/*.rake |
New modular task files for each language (java, ruby, python, node, dotnet, rust, grid, appium) |
rake_tasks/common.rb |
Shared SeleniumRake module with utilities for version bumping, changelog generation, and package verification |
scripts/update_cdp.py |
Updates file path reference from Rakefile to rake_tasks/java.rake |
rb/.rubocop.yml |
Adds rake_tasks/ directory to Rubocop exclusions |
rb/BUILD.bazel |
Adds rake_tasks/ to linting arguments |
BUILD.bazel |
Updates rakefile filegroup to include all rake task files |
c8e78d9 to
0ee8540
Compare
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Latest suggestions up to e51cd5a
Previous suggestionsSuggestions up to commit dc85c51
Suggestions up to commit 9d66c84
Suggestions up to commit 41e69bd
✅ Suggestions up to commit 0ee8540
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
.github/workflows/release.yml:196
- The update-version job should only run for full releases, not for patch releases. This job depends on reset-version and should follow the same conditional logic. Add a conditional check to skip this job for patch releases:
Change line 190 to:
needs: [prepare, reset-version, unrestrict-trunk]
if: needs.prepare.outputs.language == 'all'
update-version:
name: Push Nightly Versions
needs: [prepare, reset-version, unrestrict-trunk]
uses: ./.github/workflows/commit-changes.yml
with:
artifact-name: version-reset
commit-message: "[build] Reset versions to nightly after ${{ needs.prepare.outputs.tag }} release"
secrets:
SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}
16119ad to
24e8c1f
Compare
|
Did a major rework off of other recently merged branches |
9742c98 to
912e90e
Compare
Add support for releasing individual language bindings with tags like selenium-4.28.1-ruby. Patch releases (version X.Y.Z where Z > 0) require a language suffix and skip: - Selenium Manager/Rust release - Browser, CDP, manager, and multitool updates - GitHub release creation - Nightly reset and mirror update Full releases (X.Y.0) continue to release all languages and components. Creates a reusable parse-release-tag.yml workflow to validate tags and extract version/language information for both pre-release and release workflows. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add BINDINGS constant with valid language names - Add parse_tag method to validate and parse release tags - Update release_updates task to accept tag and handle both full/patch releases Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use grouped redirects in parse-release-tag.yml (SC2129) - Use bash parameter expansion instead of sed (SC2001) - Use conditional run expression instead of job-level if with matrix context - Remove matrix filter from docs job (let all run, only relevant ones have updates) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ce42548 to
e51cd5a
Compare
User description
Binding specific releases should work exactly the same as a full release now.
Whether Minor release or Patch release, kick off the pre-release workflow and specify the tagname
and the script should do the rest. Once the PR is up, merge it, release workflow will start,
and Bob should be your uncle.
🔗 Related Issues
Builds on #16997 (consolidated pre-release workflow)
Both minor releases and patch releases have the same CI procees:
💥 What does this PR do?
Enable patch releases for individual language bindings
Instead of passing language and version, you pass the exact tagname you want (e.g.,
selenium-4.28.1-ruby).Tag format and validation:
selenium-4.30.0,selenium-4.28.1-ruby,selenium-4.28.1-python, etc.Pre-release workflow for patches:
Release workflow changes:
Skip GitHub release creation for patch releasesnightly reset andmirror update for patch releases🔧 Implementation Notes
Both pre-release and release workflows call the reusable workflow for consistent parsing of tag name
Uses full language names in workflow matrix (
ruby,python,javascript,java,dotnet)Release workflow extracts tag from PR branch name created by pre-relese workflow
Updated
release_updatesRake task accepts tag (e.g.,selenium-4.28.1-ruby) and runs appropriate tasks💡 Additional Considerations
Who wants to try it???
🔄 Types of changes
*hopefully
PR Type
Enhancement
Description
Enable per-language patch releases (e.g.,
selenium-4.28.1-ruby) without full releaseParse and validate release tags with language suffix support
Skip Rust/SM, browser pins, CDP updates for patch releases
Filter publish/docs matrix to selected language only
Make version tasks invoke their own update tasks automatically
Diagram Walkthrough
flowchart LR A["Release Tag Input<br/>selenium-4.28.1-ruby"] --> B["Parse Tag Job"] B --> C{Language<br/>Suffix?} C -->|Patch Release| D["Extract Language<br/>ruby/python/java/etc"] C -->|Full Release| E["Language = all"] D --> F["Skip Rust/SM/Browser/CDP"] E --> G["Run All Updates"] F --> H["Per-Language Version<br/>& Changelog Tasks"] G --> I["All Component Updates"] H --> J["Filtered Publish Matrix"] I --> K["Full Publish Matrix"]File Walkthrough
java.rake
Invoke update task after version bumprake_tasks/java.rake
java:updatetask after version bumpnode.rake
Invoke update task after version bumprake_tasks/node.rake
node:updatetask after version bumppre-release.yml
Add tag parsing and per-language release support.github/workflows/pre-release.yml
versioninput withtaginput supporting language suffixesparse-tagjob to extract version, language, and validate tagformat
(Z=0) cannot
releases
all:versionandall:changelogsreleases
release_updatetoupdate_multitooldirect callrelease.yml
Filter release jobs by language and skip for patch releases.github/workflows/release.yml
preparejob to parse tag and extract language suffixpublishmatrix to run only for selected languagegithub-releasejob for patch releases (language != 'all')nightlyandmirrorjobs for patch releasesverifytask instead ofall:verifyversion nightlytask instead ofall:version nightlyfull names (python, ruby, javascript)
update-documentation.yml
Use full language names in documentation workflow.github/workflows/update-documentation.yml
instead of abbreviations
Rakefile
Remove release_update wrapper taskRakefile
release_updatewrapper task that only calledupdate_multitoolupdate_multitooldirectly