-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
report language version to plausible #16733
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
base: trunk
Are you sure you want to change the base?
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 ✨Explore these optional code suggestions:
|
||||||||||||
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
27f55ff to
d441159
Compare
nvborisenko
left a comment
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.
Please elaborate motivation, and most likely we propose good solution in .NET. CC @RenderMichael
| { | ||
| StringBuilder argsBuilder = new StringBuilder(arguments); | ||
| argsBuilder.Append(" --language-binding csharp"); | ||
| #if NET8_0_OR_GREATER |
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.
Original motivation was:
how many people using the latest version of Selenium
This code doesn't include the version of Selenium binding.
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.
Selenium Manager sets the Selenium version since the versions are in sync: https://github.com/SeleniumHQ/selenium/blob/selenium-4.39.0/rust/src/main.rs#L227
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.
Plausible analytics are here: https://plausible.io/manager.selenium.dev
navigate to custom properties at the bottom to see specifics.
The reason for the PR is specifically Java, if 50% of our users are still on Java 11, then we aren't going to want to require a move to Java 17, etc
For .NET this means seeing how many people are still using .NET Framework vs NET 6/7 vs NET 8/9/10
Seems reasonable, let's think more about it.
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.
what is your concern?
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.
OK, it is not about Selenium version, accepted. I propose to see the final output for all bindings and align the format, I mean python 3.14 or PyThoN_3_14. What is our preference?
Interesting, do we really want to see TFM (net8.0, netstandard2.0)? Or runtime version would be enough?..
PS: We can easily implement all variants.
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.
As far as capturing TFM, I was thinking it would be useful to know if someone is targeting netstandard2, even if they are using Net 8 or something. Not essential, but the info was right there, so I figured we'd capture it and it only 3x the values at most.
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.
@RenderMichael {Environment.Version.Major} seems sufficient to me (and limits the number of combinations with TFM). Is there something about the minor version that would give us extra insight?
The goal is to provide understanding about how we focus/update support. We changed targets a couple years ago pretty much blind, and if we had this info it would have made it more obvious what the tradeoffs were.
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.
The minor version is relevant for the .NET Standard 2.0 target. For example, there exists .NET Core 3.0 and .NET Core 3.1 (likewise 2.0 and 2.1, but adoption was so low and only from bleeding-edge folks back that it's completely irrelevant).
The much more relevant examples are on .NET Framework. .NET Standard 2.0 covers 4.7, 4.7.1, 4.7.2, 4.8, and 4.8.1 (as well 4.6.2 but Selenium targets that directly) source. Environment.Version.Major will not give us the information we need there. I don't think Version.Minor will either, actually, given what this outputs on 4.7.2.
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.
I found some guidance mentioning that Environment.Version is not the way to go here https://learn.microsoft.com/en-us/dotnet/framework/install/how-to-determine-which-versions-are-installed#the-environmentversion-property
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.
|
@nvborisenko The reason for the PR is specifically Java, if 50% of our users are still on Java 11, then we aren't going to want to require a move to Java 17, etc For .NET this means seeing how many people are still using .NET Framework vs NET 6/7 vs NET 8/9/10 |
Co-authored-by: Michael Render <render.michael@gmail.com>


User description
Note: this PR includes the code from #16736 to get the tests to pass
🔗 Related Issues
Implements #16731
💥 What does this PR do?
Each language obtains version to send to selenium manager
Selenium Manager reports to Plausible
🔧 Implementation Notes
The only nonstandard one is that .NET reports both the target framework and the Runtime Version:
🔄 Types of changes
PR Type
Enhancement
Description
Add language version reporting to Selenium Manager across all bindings
Java reports runtime feature version via Runtime.version().feature()
.NET reports target framework and runtime version with conditional compilation
JavaScript reports Node.js version via process.versions.node
Python reports major.minor version via sys.version_info
Ruby reports version via RUBY_VERSION constant
Rust infrastructure updated to parse and forward language-version argument
Diagram Walkthrough
File Walkthrough
10 files
Add Java runtime version reportingAdd .NET framework and runtime version reportingAdd Node.js version reportingAdd Python version reportingAdd Ruby version reportingAdd language_binding_version field to configAdd getter/setter for language binding versionAdd language-version CLI argument parsingAdd lang_version to stats metadata structuresAdd lang_version field to Props struct