Skip to content

Conversation

navin772
Copy link
Member

@navin772 navin772 commented Jul 1, 2025

User description

🔗 Related Issues

💥 What does this PR do?

Allows bazel to use pinned browsers in CI so the tests run against the latest browsers specified in repositories.bzl file.

GitHub runners don't get the latest stable browser immediately after release, it usually takes a few weeks. This hinders development since tests don't pass.

🔧 Implementation Notes

💡 Additional Considerations

🔄 Types of changes

  • Bug fix (backwards compatible)
  • New feature (non-breaking change which adds functionality and tests!)

PR Type

Enhancement


Description

  • Add --pin_browsers=true flag to Python CI tests

  • Ensures tests run against latest browsers from repositories.bzl

  • Fixes CI failures due to delayed browser updates on GitHub runners


Changes diagram

flowchart LR
  A["GitHub CI Runners"] --> B["Python Tests"]
  B --> C["Bazel Test Commands"]
  C --> D["Add --pin_browsers=true"]
  D --> E["Use Latest Browsers"]
Loading

Changes walkthrough 📝

Relevant files
Configuration changes
ci-python.yml
Add pinned browsers flag to CI tests                                         

.github/workflows/ci-python.yml

  • Added --pin_browsers=true flag to all bazel test commands
  • Applied to both browser integration tests and Safari tests
  • Ensures CI uses pinned browser versions from repositories.bzl
  • +3/-3     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @selenium-ci selenium-ci added the B-build Includes scripting, bazel and CI integrations label Jul 1, 2025
    Copy link
    Contributor

    qodo-merge-pro bot commented Jul 1, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ❌

    5678 - Not compliant

    Non-compliant requirements:

    • Fix ChromeDriver ConnectFailure error on Ubuntu 16.04.4 with Chrome 65.0.3325.181 and ChromeDriver 2.35
    • Resolve connection refused errors that occur after first ChromeDriver instantiation
    • Ensure multiple ChromeDriver instances can be created without connection errors

    1234 - Not compliant

    Non-compliant requirements:

    • Fix JavaScript execution in link href on click() method for Firefox
    • Ensure click() triggers JavaScript in href attributes (regression from 2.47.1 to 2.48.0)
    • Restore functionality that worked in Selenium 2.47.1 but broke in 2.48.0/2.48.2

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    @navin772 navin772 requested a review from VietND96 July 1, 2025 11:42
    Copy link
    Contributor

    qodo-merge-pro bot commented Jul 1, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @navin772 navin772 requested a review from cgoldberg July 1, 2025 11:42
    @diemol
    Copy link
    Member

    diemol commented Jul 1, 2025

    Python tests already use the pinned browsers in the RBE workflow. Why do we need this?

    @navin772
    Copy link
    Member Author

    navin772 commented Jul 1, 2025

    @diemol the integration tests don't use the pinned browsers. They use the default browsers which github runner comes with. This is not for RBE, they already use the pinned browsers.

    For example, currently github runners are using chrome 137 but RBE is using 138 which is latest stable.

    Copy link
    Contributor

    @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 can't think of any reason why we would want to stay on older browsers if new ones are available, so LGTM.

    @navin772
    Copy link
    Member Author

    navin772 commented Jul 1, 2025

    To verify this, I ran the Python Integration tests with pinned browser in this PR which should only pass in chrome 138.

    Earlier it was failing (see this commit) because CI used chrome 137.

    @diemol
    Copy link
    Member

    diemol commented Jul 1, 2025

    OK, we can try it. But then let's do it for all languages. Otherwis,e we keep doing things differently.

    @navin772
    Copy link
    Member Author

    navin772 commented Jul 1, 2025

    Dotnet already uses it.
    Ruby uses it for linux/macos, but not for windows (is there a known issue with windows?)
    Java doesn't uses pinned browsers, I will add it in this PR and see if everything goes well.

    @navin772 navin772 changed the title [py][ci]: use pinned browsers in CI [py][java][ci]: use pinned browsers in CI Jul 1, 2025
    @navin772 navin772 changed the title [py][java][ci]: use pinned browsers in CI [py][java][rb][ci]: use pinned browsers in CI Jul 1, 2025
    @navin772
    Copy link
    Member Author

    navin772 commented Jul 1, 2025

    @diemol I have updated the CI for java and ruby also.

    Only 1 test is failing for java FedCM which is expected. I see that the tests were ignored in this commit but later removed here after adding the test to .skipped-tests but it is only respected by RBE tests not browser tests, so I will add those back here.

    @navin772 navin772 requested a review from diemol July 1, 2025 15:51
    @navin772
    Copy link
    Member Author

    navin772 commented Jul 1, 2025

    Any idea why adding Ignore to the tests still result in the test getting executed/failed?

    @navin772
    Copy link
    Member Author

    navin772 commented Jul 2, 2025

    Disabled the FedCM tests to resolve the issue.

    @navin772 navin772 merged commit f787770 into SeleniumHQ:trunk Jul 2, 2025
    58 of 59 checks passed
    @navin772 navin772 deleted the ci-use-pinned-browsers branch July 2, 2025 10:55
    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 Review effort 1/5
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants