selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[dotnet][rb][java][js][py] Automated Browser Version Update

Open selenium-ci opened this issue 1 year ago • 4 comments

This is an automated pull request to update pinned browsers and drivers

Merge after verify the new browser versions properly passing the tests and no bugs need to be filed

selenium-ci avatar Jun 20 '24 00:06 selenium-ci

PR Reviewer Guide 🔍

⏱️ Estimated effort to review [1-5] 2
🧪 Relevant tests No
🔒 Security concerns No
⚡ Key issues to review None

qodo-code-review[bot] avatar Jun 20 '24 00:06 qodo-code-review[bot]

PR Code Suggestions ✨

CategorySuggestion                                                                                                                                    Score
Maintainability
Use a variable for the version number to avoid hardcoding it multiple times

Consider using a variable for the version number to avoid hardcoding it multiple times,
which will make future updates easier and reduce the risk of errors.

common/repositories.bzl [14]

-url = "https://ftp.mozilla.org/pub/firefox/releases/127.0.1/linux-x86_64/en-US/firefox-127.0.1.tar.bz2",
+version = "127.0.1"
+url = f"https://ftp.mozilla.org/pub/firefox/releases/{version}/linux-x86_64/en-US/firefox-{version}.tar.bz2",
 
  • [ ] Apply this suggestion <!-- /improve --apply_suggestion=0 -->
Suggestion importance[1-10]: 7

Why: Using a variable for the version number is a good practice for maintainability and reducing errors during updates. This suggestion directly addresses a repeated pattern in the PR.

7
Enhancement
Add a retry mechanism for downloading the archives to handle transient network issues

Consider adding a retry mechanism for downloading the archives to handle transient network
issues more gracefully.

common/repositories.bzl [14]

 url = "https://ftp.mozilla.org/pub/firefox/releases/127.0.1/linux-x86_64/en-US/firefox-127.0.1.tar.bz2",
+# Add retry mechanism for downloading the archive
 
  • [ ] Apply this suggestion <!-- /improve --apply_suggestion=1 -->
Suggestion importance[1-10]: 6

Why: Adding a retry mechanism is a practical enhancement for handling network instability. This suggestion is relevant given the context of downloading files from external sources.

6
Security
Add a comment to verify the SHA256 hash after downloading the file to ensure integrity

Consider adding a comment or a mechanism to verify the integrity of the downloaded files,
such as checking the SHA256 hash after download, to ensure that the files have not been
tampered with.

common/repositories.bzl [14-15]

 url = "https://ftp.mozilla.org/pub/firefox/releases/127.0.1/linux-x86_64/en-US/firefox-127.0.1.tar.bz2",
-sha256 = "57564e6219f8f79418ba49d1e7a6edf44f8e253f777d0ae7de7dbff200c3d5f4",
+sha256 = "57564e6219f8f79418ba49d1e7a6edf44f8e253f777d0ae7de7dbff200c3d5f4",  # Ensure to verify this SHA256 hash after download
 
  • [ ] Apply this suggestion <!-- /improve --apply_suggestion=2 -->
Suggestion importance[1-10]: 5

Why: The suggestion is valid as it enhances security by verifying the integrity of downloads. However, the existing code already includes SHA256 hashes which serve this purpose, so the added comment might be somewhat redundant.

5
Best practice
Ensure consistency of URLs and SHA256 hashes across all platforms

Ensure that the URLs and SHA256 hashes are updated consistently across all platforms to
avoid mismatches and potential issues during the build process.

common/repositories.bzl [14-15]

 url = "https://ftp.mozilla.org/pub/firefox/releases/127.0.1/linux-x86_64/en-US/firefox-127.0.1.tar.bz2",
-sha256 = "57564e6219f8f79418ba49d1e7a6edf44f8e253f777d0ae7de7dbff200c3d5f4",
+sha256 = "57564e6219f8f79418ba49d1e7a6edf44f8e253f777d0ae7de7dbff200c3d5f4",  # Ensure consistency across all platforms
 
  • [ ] Apply this suggestion <!-- /improve --apply_suggestion=3 -->
Suggestion importance[1-10]: 5

Why: The suggestion emphasizes consistency, which is important. However, the PR already shows consistent updates across different platforms, making this suggestion somewhat unnecessary in this context.

5

qodo-code-review[bot] avatar Jun 20 '24 00:06 qodo-code-review[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 57.46%. Comparing base (72e3a61) to head (9be1518). Report is 5 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #14158   +/-   ##
=======================================
  Coverage   57.46%   57.46%           
=======================================
  Files          89       89           
  Lines        5549     5549           
  Branches      228      228           
=======================================
  Hits         3189     3189           
  Misses       2132     2132           
  Partials      228      228           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 20 '24 00:06 codecov[bot]

CI Failure Feedback 🧐

(Checks updated until commit https://github.com/SeleniumHQ/selenium/commit/0c8c9824243cf981cbb534d00464e730ed7a26c7)

Action: .NET / Browser Tests / Browser Tests

Failed stage: Run Bazel [❌]

Failed test name: ElementFindingTest-chrome, ElementFindingTest-firefox

Failure summary:

The action failed because two tests, ElementFindingTest-chrome and ElementFindingTest-firefox,
failed to execute. The specific reasons for the failures are:

  • Both tests encountered an error related to the path length when attempting to start the test
    process.
  • The error message indicates that the path could not be shortened enough to be used as an executable
    path.
  • This issue is likely due to the Windows operating system's limitations on path length.
  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Microsoft Windows Server 2022
    ...
    
    737:  [32m[1,169 / 2,105][0m Generating v126 DevTools Protocol bindings for .NET; 7s local ... (4 actions running)
    738:  [32m[1,170 / 2,105][0m Generating v126 DevTools Protocol bindings for .NET; 8s local ... (4 actions, 3 running)
    739:  [32m[1,170 / 2,105][0m Generating v126 DevTools Protocol bindings for .NET; 9s local ... (4 actions running)
    740:  [32m[1,171 / 2,105][0m Generating v126 DevTools Protocol bindings for .NET; 10s local ... (4 actions running)
    741:  [32m[1,172 / 2,105][0m Generating v126 DevTools Protocol bindings for .NET; 11s local ... (4 actions running)
    742:  [32m[1,174 / 2,105][0m Generating v126 DevTools Protocol bindings for .NET; 12s local ... (4 actions running)
    743:  [32m[1,175 / 2,105][0m Generating v126 DevTools Protocol bindings for .NET; 13s local ... (4 actions running)
    744:  [32mINFO: [0mFrom Building java/src/org/openqa/selenium/remote/libapi-class.jar (69 source files):
    745:  java\src\org\openqa\selenium\remote\ErrorHandler.java:46: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    746:  private final ErrorCodes errorCodes;
    747:  ^
    748:  java\src\org\openqa\selenium\remote\ErrorHandler.java:60: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    749:  this.errorCodes = new ErrorCodes();
    750:  ^
    751:  java\src\org\openqa\selenium\remote\ErrorHandler.java:68: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    752:  public ErrorHandler(ErrorCodes codes, boolean includeServerErrors) {
    753:  ^
    754:  java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    755:  ErrorCodes errorCodes = new ErrorCodes();
    756:  ^
    757:  java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    758:  ErrorCodes errorCodes = new ErrorCodes();
    759:  ^
    760:  java\src\org\openqa\selenium\remote\ProtocolHandshake.java:181: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    761:  response.setStatus(ErrorCodes.SUCCESS);
    762:  ^
    763:  java\src\org\openqa\selenium\remote\ProtocolHandshake.java:182: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    764:  response.setState(ErrorCodes.SUCCESS_STRING);
    765:  ^
    766:  java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:53: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    767:  new ErrorCodes().toStatus((String) rawError, Optional.of(tuple.getStatusCode())));
    768:  ^
    769:  java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:56: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    770:  new ErrorCodes().getExceptionType((String) rawError);
    771:  ^
    772:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:44: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    773:  private final ErrorCodes errorCodes = new ErrorCodes();
    774:  ^
    775:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:44: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    776:  private final ErrorCodes errorCodes = new ErrorCodes();
    777:  ^
    778:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:55: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    779:  int status = response.getStatus() == ErrorCodes.SUCCESS ? HTTP_OK : HTTP_INTERNAL_ERROR;
    780:  ^
    781:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:101: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    782:  response.setStatus(ErrorCodes.UNKNOWN_COMMAND);
    783:  ^
    784:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:103: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    785:  response.setStatus(ErrorCodes.UNHANDLED_ERROR);
    786:  ^
    787:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:124: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    788:  response.setStatus(ErrorCodes.SUCCESS);
    789:  ^
    790:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:125: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    791:  response.setState(errorCodes.toState(ErrorCodes.SUCCESS));
    792:  ^
    793:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:131: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    794:  response.setState(errorCodes.toState(ErrorCodes.SUCCESS));
    795:  ^
    796:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:70: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    797:  private final ErrorCodes errorCodes = new ErrorCodes();
    798:  ^
    799:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:70: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    800:  private final ErrorCodes errorCodes = new ErrorCodes();
    801:  ^
    802:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:93: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    803:  response.setStatus(ErrorCodes.UNKNOWN_COMMAND);
    804:  ^
    805:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:98: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    806:  response.setStatus(ErrorCodes.UNHANDLED_ERROR);
    807:  ^
    808:  java\src\org\openqa\selenium\remote\codec\w3c\W3CHttpResponseCodec.java:145: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    809:  response.setStatus(ErrorCodes.SUCCESS);
    ...
    
    968:  [32m[2,103 / 2,105][0m Compiling ElementFindingTest-chrome; 1s local ... (2 actions running)
    969:  [32m[2,105 / 2,107][0m [Prepa] Testing //dotnet/test/common:ElementFindingTest-firefox ... (2 actions, 0 running)
    970:  [32m[2,105 / 2,107][0m [Prepa] Testing //dotnet/test/common:ElementFindingTest-firefox; 6s ... (2 actions, 0 running)
    971:  [31m[1mFAIL: [0m//dotnet/test/common:ElementFindingTest-chrome (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild-ST-8fd7485a76d3/testlogs/dotnet/test/common/ElementFindingTest-chrome/test.log)
    972:  [31m[1mFAIL: [0m//dotnet/test/common:ElementFindingTest-firefox (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild-ST-8fd7485a76d3/testlogs/dotnet/test/common/ElementFindingTest-firefox/test.log)
    973:  [32mINFO: [0mFrom Testing //dotnet/test/common:ElementFindingTest-firefox:
    974:  ==================== Test output for //dotnet/test/common:ElementFindingTest-firefox:
    975:  [32mINFO: [0mFrom Testing //dotnet/test/common:ElementFindingTest-chrome:
    976:  ERROR(tools/test/windows/tw.cc:1302) ERROR: src/main/native/windows/process.cc(95): WaitableProcess::Create(D:\_bazel\execroot\_main\bazel-out\x64_windows-fastbuild-ST-8fd7485a76d3\bin\dotnet\test\common\ElementFindingTest-firefox\net8.0\WebDriver.Common.Tests.dll.bat.runfiles\_main\dotnet\test\common\ElementFindingTest-firefox\net8.0\WebDriver.Common.Tests.dll.bat): ERROR: src/main/native/windows/util.cc(292): AsExecutablePathForCreateProcess(D:\_bazel\execroot\_main\bazel-out\x64_windows-fastbuild-ST-8fd7485a76d3\bin\dotnet\test\common\ElementFindingTest-firefox\net8.0\WebDriver.Common.Tests.dll.bat.runfiles\_main\dotnet\test\common\ElementFindingTest-firefox\net8.0\WebDriver.Common.Tests.dll.bat): ERROR: src/main/native/windows/util.cc(262): GetShortPathNameW(\\?\D:\_bazel\execroot\_main\bazel-out\x64_windows-fastbuild-ST-8fd7485a76d3\bin\dotnet\test\common\ElementFindingTest-firefox\net8.0\WebDriver.Common.Tests.dll.bat.runfiles\_main\dotnet\test\common\ElementFindingTest-firefox\net8.0\WebDriver.Common.Tests.dll.bat): cannot shorten the path enough
    977:  ERROR(tools/test/windows/tw.cc:1479) Failed to start test process (arg: D:\_bazel\execroot\_main\bazel-out\x64_windows-fastbuild-ST-8fd7485a76d3\bin\dotnet\test\common\ElementFindingTest-firefox\net8.0\WebDriver.Common.Tests.dll.bat.runfiles\_main\dotnet\test\common\ElementFindingTest-firefox\net8.0\WebDriver.Common.Tests.dll.bat)
    978:  ================================================================================
    979:  ==================== Test output for //dotnet/test/common:ElementFindingTest-chrome:
    980:  ERROR(tools/test/windows/tw.cc:1302) ERROR: src/main/native/windows/process.cc(95): WaitableProcess::Create(D:\_bazel\execroot\_main\bazel-out\x64_windows-fastbuild-ST-8fd7485a76d3\bin\dotnet\test\common\ElementFindingTest-chrome\net8.0\WebDriver.Common.Tests.dll.bat.runfiles\_main\dotnet\test\common\ElementFindingTest-chrome\net8.0\WebDriver.Common.Tests.dll.bat): ERROR: src/main/native/windows/util.cc(292): AsExecutablePathForCreateProcess(D:\_bazel\execroot\_main\bazel-out\x64_windows-fastbuild-ST-8fd7485a76d3\bin\dotnet\test\common\ElementFindingTest-chrome\net8.0\WebDriver.Common.Tests.dll.bat.runfiles\_main\dotnet\test\common\ElementFindingTest-chrome\net8.0\WebDriver.Common.Tests.dll.bat): ERROR: src/main/native/windows/util.cc(262): GetShortPathNameW(\\?\D:\_bazel\execroot\_main\bazel-out\x64_windows-fastbuild-ST-8fd7485a76d3\bin\dotnet\test\common\ElementFindingTest-chrome\net8.0\WebDriver.Common.Tests.dll.bat.runfiles\_main\dotnet\test\common\ElementFindingTest-chrome\net8.0\WebDriver.Common.Tests.dll.bat): cannot shorten the path enough
    981:  ERROR(tools/test/windows/tw.cc:1479) Failed to start test process (arg: D:\_bazel\execroot\_main\bazel-out\x64_windows-fastbuild-ST-8fd7485a76d3\bin\dotnet\test\common\ElementFindingTest-chrome\net8.0\WebDriver.Common.Tests.dll.bat.runfiles\_main\dotnet\test\common\ElementFindingTest-chrome\net8.0\WebDriver.Common.Tests.dll.bat)
    982:  ================================================================================
    983:  [32mINFO: [0mFound 2 test targets...
    984:  [32mINFO: [0mElapsed time: 402.903s, Critical Path: 105.71s
    985:  [32mINFO: [0m2107 processes: 816 internal, 489 local, 802 worker.
    986:  [32mINFO: [0mBuild completed, 2 tests FAILED, 2107 total actions
    987:  //dotnet/test/common:ElementFindingTest-chrome                           [0m[31m[1mFAILED[0m in 0.1s
    988:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild-ST-8fd7485a76d3/testlogs/dotnet/test/common/ElementFindingTest-chrome/test.log
    989:  //dotnet/test/common:ElementFindingTest-firefox                          [0m[31m[1mFAILED[0m in 0.1s
    990:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild-ST-8fd7485a76d3/testlogs/dotnet/test/common/ElementFindingTest-firefox/test.log
    991:  Executed 2 out of 2 tests: [0m[31m[1m2 fail locally[0m.
    992:  [0m
    993:  ##[error]Process completed with exit code 1.
    
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check. The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    qodo-code-review[bot] avatar Jun 20 '24 00:06 qodo-code-review[bot]