Skip to content

Conversation

@titusfortner
Copy link
Member

@titusfortner titusfortner commented Jan 1, 2026

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?

  • Sets avoid stats to false by default, sets it to true when build is stamped (for release)

💡 Additional Considerations

We're currently building for releases with cargo, so this toggle won't apply

🔄 Types of changes

  • New feature (non-breaking change which adds functionality and tests!)

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

flowchart LR
  A["Development Build"] -->|"avoid_stats feature disabled"| B["Stats Enabled"]
  C["Stamped/Release Build"] -->|"avoid_stats feature enabled"| D["Stats Disabled"]
  E["CI Workflow"] -->|"Remove SE_AVOID_STATS env var"| F["Use Feature Flag Instead"]
Loading

File Walkthrough

Relevant files
Enhancement
config.rs
Make avoid_stats default conditional on feature flag         

rust/src/config.rs

  • Changed avoid_stats default from false to conditional based on
    avoid_stats feature flag
  • Uses cfg!(feature = "avoid_stats") to determine default behavior at
    compile time
+1/-1     
Configuration changes
BUILD.bazel
Add conditional feature flag based on build stamp               

rust/BUILD.bazel

  • Added crate_features selection based on build stamp status
  • Enables avoid_stats feature for non-stamped builds
  • Disables feature for stamped/release builds
+4/-0     
Cargo.toml
Define avoid_stats Cargo feature flag                                       

rust/Cargo.toml

  • Added new [features] section with avoid_stats feature definition
  • Feature is empty and used only for conditional compilation
+3/-0     
bazel.yml
Remove hardcoded stats environment variable from CI           

.github/workflows/bazel.yml

  • Removed hardcoded SE_AVOID_STATS: true environment variable from CI
    jobs
  • Stats behavior now controlled by build feature flag instead
+0/-1     

@selenium-ci selenium-ci added B-build Includes scripting, bazel and CI integrations C-rust Rust code is mostly Selenium Manager B-manager Selenium Manager labels Jan 1, 2026
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

Copy link
Member

@cgoldberg cgoldberg left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations B-manager Selenium Manager C-rust Rust code is mostly Selenium Manager Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants