-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rust] only collect stats on stamped builds #16826
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 ✨No code suggestions found for the PR. |
cgoldberg
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.
I was testing with a locally built selenium manager and noticed it was sending stats to plausible.
That's probably not ideal, but will this skip stats for any 3rd party builds? Do we really want to skip those?
Some package managers (Anaconda) build their own versions of Selenium Manager from source. Some Linux distros (Fedora, etc) do the same. Also, some Linux distros build their own packages for Selenium bindings (at least they do for Python) that includes building Selenium Manager. I usually don't reccomend people use these packages over the official releases, but they do exist and are pretty widely available. Debian, Fedora, and Arch all build it for their repos, and that ends up being available for a ton of derivative distros like Ubuntu and Linux Mint.
User description
I was testing with a locally built selenium manager and noticed it was sending stats to plausible. Not a huge deal in the scheme of things, but easy enough to toggle it by default.
💥 What does this PR do?
💡 Additional Considerations
We're currently building for releases with cargo, so this toggle won't apply
🔄 Types of changes
PR Type
Enhancement
Description
Disable stats collection by default in development builds
Enable stats only for stamped/release builds via feature flag
Remove hardcoded SE_AVOID_STATS environment variable from CI
Add Cargo feature flag for conditional stats behavior
Diagram Walkthrough
File Walkthrough
config.rs
Make avoid_stats default conditional on feature flagrust/src/config.rs
avoid_statsdefault fromfalseto conditional based onavoid_statsfeature flagcfg!(feature = "avoid_stats")to determine default behavior atcompile time
BUILD.bazel
Add conditional feature flag based on build stamprust/BUILD.bazel
crate_featuresselection based on build stamp statusavoid_statsfeature for non-stamped buildsCargo.toml
Define avoid_stats Cargo feature flagrust/Cargo.toml
[features]section withavoid_statsfeature definitionbazel.yml
Remove hardcoded stats environment variable from CI.github/workflows/bazel.yml
SE_AVOID_STATS: trueenvironment variable from CIjobs