-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[build] Split Rakefile into per-language task files #16979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 40108b9
Previous suggestions✅ Suggestions up to commit ac29f0c
✅ Suggestions up to commit a2ac5b7
✅ Suggestions up to commit 08841ce
✅ Suggestions up to commit fb43c38
✅ Suggestions up to commit 5d81dcf
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this 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 refactors the monolithic Rakefile (~1600 lines) into modular, per-language task files to improve maintainability and organization. The refactoring creates a shared SeleniumRake module for common utilities and loads language-specific tasks into namespaces with aliases for backward compatibility.
Changes:
- Split Rakefile into 9 focused task files organized by language/component
- Introduced
rake_tasks/common.rbwith shared utilities (version management, changelog generation, package verification) - Created namespace-based loading with aliases (e.g.,
rb/ruby,py/python,node/js/javascript) to maintain backward compatibility - Added aggregation tasks in
all:*namespace for cross-language operations
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| Rakefile | Reduced from ~1600 to ~294 lines; loads per-language tasks into namespaces; maintains legacy task aliases |
| rake_tasks/common.rb | New shared SeleniumRake module with version bumping, changelog generation, and package verification utilities |
| rake_tasks/java.rake | Java-specific tasks: build, release, package, verify, docs, changelogs, version, lint, install, Maven dependency management |
| rake_tasks/python.rake | Python-specific tasks: build, release, verify, docs, changelogs, version, lint, install, local_dev |
| rake_tasks/ruby.rake | Ruby-specific tasks: build, release, verify, docs, changelogs, version, lint, install, gem pinning, local_dev |
| rake_tasks/node.rake | Node/JavaScript-specific tasks: build, release, verify, docs, changelogs, version, lint, install, pnpm dependency management |
| rake_tasks/dotnet.rake | .NET-specific tasks: build, package, release, verify, docs, changelogs, version, lint, install, paket dependency management |
| rake_tasks/rust.rake | Rust/Selenium Manager tasks: build, update, changelogs, version, lint, pin |
| rake_tasks/grid.rake | Grid server tasks: build, package, release |
| rake_tasks/appium.rake | iOS driver atoms build task for Appium integration |
5d81dcf to
42c4b1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
36ef4a4 to
5124840
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
85f2b38 to
1fc865e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
840fea6 to
08841ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 11 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
b52e0e4 to
a2ac5b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Reorganize the monolithic Rakefile into separate files: - rake_tasks/common.rb - Shared SeleniumRake module - rake_tasks/java.rake - Java binding tasks - rake_tasks/python.rake - Python binding tasks - rake_tasks/ruby.rake - Ruby binding tasks - rake_tasks/node.rake - JavaScript/Node binding tasks - rake_tasks/dotnet.rake - .NET binding tasks - rake_tasks/rust.rake - Selenium Manager tasks - rake_tasks/grid.rake - Grid tasks Each file is loaded into its namespace(s) with aliases: - rb/ruby, py/python, node/js/javascript Also removes remaining dead code: - rake_tasks/selenium_rake/ utilities (browsers, checks, formatters, generators) - rake_tasks/rake/ and rake_tasks/bazel/ extensions - rake_tasks/python.rb - .git-fixfiles - cpp/iedriverserver/build.desc
40108b9 to
18622c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
User description
With the CrazyFun code gone (#16972), and the removal of all the outdated Rake code (#16978), what is the point of Rake now?
The idea is to wrap the common features for each binding into its namespace (and an
allnamespace to run it for all bindings)The build and release process is different for each language, and which bazel targets are needed for everything is different.
Rather than remembering and referencing each different bazel command in the CI and shell scripts to do file manipulation,
we're using bundled jruby to orchestrate this behavior outside the workflow files.
For our CI, that means being able to do
all:release, and follow up withjava:release, etc depending on what is needed.To make it more clear and obvious, this PR is going to break up the Rakefile so that each binding gets its own file
to define the features, so it is easy to see which file/language you're looking at.
Another advantage to this is that we can load these with different namespaces so they are effectively aliased.
No more needing to javascript --> node conversions in workflows.
💥 What does this PR do?
Split the monolithic Rakefile (~1600 lines) into per-language task files.
New Files:
rake_tasks/common.rbrake_tasks/java.rakerake_tasks/python.rakerake_tasks/ruby.rakerake_tasks/node.rakerake_tasks/dotnet.rakerake_tasks/rust.rakerake_tasks/grid.rakerake_tasks/appium.rakeNamespace Loading:
🔧 Implementation Notes
publish-maven→java:release)all:*aggregation tasks iterate over language namespaces*:lint,*:check_credentials,*:install💡 Additional Considerations
We can greatly simplify the CI workflows in several places
Verification:
🔄 Types of changes
PR Type
Enhancement
Description
Refactored monolithic Rakefile (~1600 lines) into modular per-language task files for improved maintainability and clarity
Created 9 new language-specific rake files:
java.rake,python.rake,ruby.rake,node.rake,dotnet.rake,rust.rake,grid.rake,appium.rake, and sharedcommon.rbImplemented namespace loading with language aliases (rb/ruby, py/python, node/js/javascript) for backward compatibility
Extracted language-specific build, release, and package automation tasks:
Created shared
SeleniumRakeutility module for common operations: version bumping, changelog generation, and package verificationAdded new top-level tasks:
prep_release,lint,update_cdp, andauthorsPreserved legacy task aliases for CI compatibility (e.g.,
publish-maven→java:release)Simplified main Rakefile to focus on global tasks, bazel rules, and namespace aggregation
Diagram Walkthrough
File Walkthrough
10 files
java.rake
Java language-specific Rake tasks and release automationrake_tasks/java.rake
monolithic Rakefile
staged releases
generation, and dependency pinning
git history
ruby.rake
Ruby language-specific Rake tasks and gem release workflowrake_tasks/ruby.rake
gem installation
generation, and changelog updates
python.rake
Python language-specific Rake tasks and PyPI release automationrake_tasks/python.rake
version support
Sphinx, and changelog management
dotnet.rake
.NET language-specific Rake tasks and NuGet release workflowrake_tasks/dotnet.rake
releases to GitHub Packages
and changelog updates
node.rake
Node.js language-specific Rake tasks and npm release automationrake_tasks/node.rake
tasks
management
generation, and changelog management
common.rb
Shared utilities module for cross-language release operationsrake_tasks/common.rb
SeleniumRakefor common release and buildoperations
standard releases across all languages
language-specific formatting
registries
rust.rake
Rust language-specific Rake tasks for Selenium Managerrake_tasks/rust.rake
tasks
CARGO_BAZEL_REPINversioning pattern
grid.rake
Grid server-specific Rake tasks and packaging workflowrake_tasks/grid.rake
for GitHub releases
java_versionhelper for consistent versioningappium.rake
Appium iOS driver atoms build task definitionrake_tasks/appium.rake
targeting iOS platform
Rakefile
Split monolithic Rakefile into modular per-language task filesRakefile
task files loaded within namespaces
rake files (
rake_tasks/*.rake)@gitvariable withSeleniumRake.gitclass variable forbetter encapsulation
grid, and appium with language aliases (rb/ruby, py/python,
node/js/javascript)
namespace aggregation
prep_release,lint,update_cdp, andauthorspublish-maven→java:release)all:linttask to iterate over language-specific linterswith skip support