SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.77k stars 8.2k forks source link

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

Closed selenium-ci closed 3 months ago

selenium-ci commented 3 months ago

User description

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


PR Type

Enhancement, Other


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
repositories.bzl
Update browser and driver versions and checksums                 

common/repositories.bzl
  • Updated the URL and SHA256 checksum for mac_edge package.
  • Removed the linux_edge package definition.
  • Updated the URL and SHA256 checksum for linux_edgedriver package.
  • Updated the URL and SHA256 checksum for mac_edgedriver package.
  • +7/-29   

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    codiumai-pr-agent-pro[bot] commented 3 months ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review: 2 ๐Ÿ”ต๐Ÿ”ตโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก Key issues to review

    URL Verification
    Ensure that the new URLs for packages and drivers are correct and accessible. Checksum Verification
    Verify that the new SHA256 checksums match the files at the specified URLs to ensure file integrity.
    codiumai-pr-agent-pro[bot] commented 3 months ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Verify the accuracy of URLs and SHA256 hashes, and ensure file paths in the 'move' dictionary are correct ___ **Ensure that the URL and SHA256 hash for the 'mac_edge' package are correct and that
    the file path in the 'move' dictionary matches the actual structure of the
    downloaded package. This is crucial to avoid runtime errors due to incorrect file
    paths or corrupted downloads due to hash mismatches.** [common/repositories.bzl [124-130]](https://github.com/SeleniumHQ/selenium/pull/14331/files#diff-25d82cd18102fed27d3202000e1f1b3a56a85ad2848236d91989cd30a3952401R124-R130) ```diff +pkg_archive( + name = "mac_edge", + url = "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/dd910ebc-f59d-4ea2-b18b-81a8a163e54f/MicrosoftEdge-127.0.2651.86.pkg", + sha256 = "67893bc929315ae6798d93ccce5386c81e8f5b544b14ba31c8ddcaea401f2ced", + move = { + "MicrosoftEdge-127.0.2651.86.pkg/Payload/Microsoft Edge.app": "Edge.app", + }, + build_file_content = """ - ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 8 Why: Verifying the accuracy of URLs, SHA256 hashes, and file paths is crucial for preventing runtime errors and ensuring the integrity of the downloaded files. This suggestion addresses a significant potential issue.
    8
    Maintainability
    Use a variable for the version number in URLs and hashes to simplify updates and maintain consistency ___ **Consider using a variable for the version number '127.0.2651.74' in the URL and
    SHA256 hash for 'linux_edgedriver' to ensure consistency and ease future updates.
    This will help in maintaining the code and reduce the chances of errors during
    updates.** [common/repositories.bzl [145-147]](https://github.com/SeleniumHQ/selenium/pull/14331/files#diff-25d82cd18102fed27d3202000e1f1b3a56a85ad2848236d91989cd30a3952401R145-R147) ```diff +version = "127.0.2651.74" http_archive( name = "linux_edgedriver", - url = "https://msedgedriver.azureedge.net/127.0.2651.74/edgedriver_linux64.zip", + url = "https://msedgedriver.azureedge.net/" + version + "/edgedriver_linux64.zip", sha256 = "5689b970f61abb98fa1147cac8daf8b7c6604862345f449ed7bc432f61ee6ab3", build_file_content = """ ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: Using a variable for the version number improves maintainability and reduces the risk of errors during updates. This is a good practice for code consistency and future-proofing.
    7
    codiumai-pr-agent-pro[bot] commented 3 months ago

    CI Failure Feedback ๐Ÿง

    (Checks updated until commit https://github.com/SeleniumHQ/selenium/commit/52564495478ae400042dcdcf94024a2bd0f22aa1)

    **Action:** .NET / Browser Tests / Browser Tests
    **Failed stage:** [Run Bazel](https://github.com/SeleniumHQ/selenium/actions/runs/10207879199/job/28243490645) [โŒ]
    **Failed test name:** ElementFindingTest-firefox, ElementFindingTest-chrome
    **Failure summary:** The action failed because two tests, ElementFindingTest-firefox and ElementFindingTest-chrome,
    failed to execute. The failure was due to the following reasons:
  • The test process could not be started because the executable path could not be shortened enough.
  • This issue occurred in the WaitableProcess::Create function in the process.cc file and the
    AsExecutablePathForCreateProcess function in the util.cc file.
  • Specifically, the GetShortPathNameW function failed to shorten the path for the test executables.
  • Relevant error logs: ```yaml 1: ##[group]Operating System 2: Microsoft Windows Server 2022 ... 696: [1,157 / 2,105] Calculating 712 JavaScript deps to javascript/atoms/deps.js; 14s local ... (4 actions running) 697: [1,158 / 2,105] Compiling src/google/protobuf/compiler/csharp/csharp_field_base.cc [for tool]; 2s local ... (4 actions running) 698: [1,160 / 2,105] Compiling src/google/protobuf/compiler/csharp/csharp_field_base.cc [for tool]; 3s local ... (4 actions running) 699: [1,162 / 2,105] Action java/src/org/openqa/selenium/manager/libmanager-module.jar; 1s local ... (4 actions, 3 running) 700: [1,163 / 2,105] Action java/src/org/openqa/selenium/manager/libmanager-module.jar; 2s local ... (4 actions, 2 running) 701: [1,165 / 2,105] Compiling src/google/protobuf/util/internal/protostream_objectwriter.cc [for tool]; 1s local ... (4 actions, 3 running) 702: [1,166 / 2,105] Compiling src/google/protobuf/util/internal/protostream_objectwriter.cc [for tool]; 2s local ... (4 actions running) 703: INFO: From Building java/src/org/openqa/selenium/remote/libapi-class.jar (69 source files): 704: java\src\org\openqa\selenium\remote\ErrorHandler.java:46: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 705: private final ErrorCodes errorCodes; 706: ^ 707: java\src\org\openqa\selenium\remote\ErrorHandler.java:60: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 708: this.errorCodes = new ErrorCodes(); 709: ^ 710: java\src\org\openqa\selenium\remote\ErrorHandler.java:68: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 711: public ErrorHandler(ErrorCodes codes, boolean includeServerErrors) { 712: ^ 713: java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 714: ErrorCodes errorCodes = new ErrorCodes(); 715: ^ 716: java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 717: ErrorCodes errorCodes = new ErrorCodes(); 718: ^ 719: java\src\org\openqa\selenium\remote\ProtocolHandshake.java:181: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 720: response.setStatus(ErrorCodes.SUCCESS); 721: ^ 722: java\src\org\openqa\selenium\remote\ProtocolHandshake.java:182: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 723: response.setState(ErrorCodes.SUCCESS_STRING); 724: ^ 725: java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:53: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 726: new ErrorCodes().toStatus((String) rawError, Optional.of(tuple.getStatusCode()))); 727: ^ 728: java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:56: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal 729: new ErrorCodes().getExceptionType((String) rawError); 730: ^ 731: 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 732: private final ErrorCodes errorCodes = new ErrorCodes(); 733: ^ 734: 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 735: private final ErrorCodes errorCodes = new ErrorCodes(); 736: ^ 737: 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 738: int status = response.getStatus() == ErrorCodes.SUCCESS ? HTTP_OK : HTTP_INTERNAL_ERROR; 739: ^ 740: 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 741: response.setStatus(ErrorCodes.UNKNOWN_COMMAND); 742: ^ 743: 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 744: response.setStatus(ErrorCodes.UNHANDLED_ERROR); 745: ^ 746: 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 747: response.setStatus(ErrorCodes.SUCCESS); 748: ^ 749: 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 750: response.setState(errorCodes.toState(ErrorCodes.SUCCESS)); 751: ^ 752: 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 753: response.setState(errorCodes.toState(ErrorCodes.SUCCESS)); 754: ^ 755: 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 756: private final ErrorCodes errorCodes = new ErrorCodes(); 757: ^ 758: 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 759: private final ErrorCodes errorCodes = new ErrorCodes(); 760: ^ 761: 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 762: response.setStatus(ErrorCodes.UNKNOWN_COMMAND); 763: ^ 764: 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 765: response.setStatus(ErrorCodes.UNHANDLED_ERROR); 766: ^ 767: 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 768: response.setStatus(ErrorCodes.SUCCESS); ... 885: [1,581 / 2,105] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/labs/useragent:util; 0s worker ... (4 actions, 3 running) 886: [1,587 / 2,105] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/i18n:datetimepatternsext; 1s worker ... (4 actions, 3 running) 887: [1,595 / 2,105] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/iter:iter; 0s worker ... (4 actions running) 888: [1,603 / 2,105] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/net:wrapperxmlhttpfactory; 0s worker ... (4 actions, 3 running) 889: [1,643 / 2,105] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/crypt:aes; 0s worker ... (4 actions running) 890: [1,699 / 2,105] [Prepa] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/html:safehtml 891: [1,720 / 2,105] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/useragent:flash; 0s worker ... (4 actions, 3 running) 892: [1,748 / 2,105] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/net:jsloader; 0s worker ... (4 actions, 2 running) 893: [1,773 / 2,105] Checking 1 JS files in @@io_bazel_rules_closure//closure/library/fs:error; 0s worker ... (4 actions, 3 running) ... 926: [2,105 / 2,105] checking cached actions 927: [2,105 / 2,107] [Prepa] Testing //dotnet/test/common:ElementFindingTest-firefox ... (2 actions, 0 running) 928: [2,105 / 2,107] [Prepa] Testing //dotnet/test/common:ElementFindingTest-chrome; 4s ... (2 actions, 0 running) 929: FAIL: //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) 930: FAIL: //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) 931: INFO: From Testing //dotnet/test/common:ElementFindingTest-chrome: 932: ==================== Test output for //dotnet/test/common:ElementFindingTest-chrome: 933: INFO: From Testing //dotnet/test/common:ElementFindingTest-firefox: 934: 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 935: 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) 936: ================================================================================ 937: ==================== Test output for //dotnet/test/common:ElementFindingTest-firefox: 938: 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 939: 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) 940: ================================================================================ 941: INFO: Found 2 test targets... 942: INFO: Elapsed time: 458.041s, Critical Path: 107.83s 943: INFO: 2107 processes: 816 internal, 489 local, 802 worker. 944: INFO: Build completed, 2 tests FAILED, 2107 total actions 945: //dotnet/test/common:ElementFindingTest-chrome FAILED in 0.1s 946: D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild-ST-8fd7485a76d3/testlogs/dotnet/test/common/ElementFindingTest-chrome/test.log 947: //dotnet/test/common:ElementFindingTest-firefox FAILED in 0.1s 948: D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild-ST-8fd7485a76d3/testlogs/dotnet/test/common/ElementFindingTest-firefox/test.log 949: Executed 2 out of 2 tests: 2 fail locally. 950:  951: ##[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](https://pr-agent-docs.codium.ai/tools/ci_feedback/).