Skip to content
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

[grid]: Add node sessionTimeout to Grid status #14582

Merged
merged 2 commits into from
Oct 13, 2024
Merged

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Oct 9, 2024

User description

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

This fixes the error could be seen in Router

14:34:02.743 DEBUG [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "ae96e0f38177224400652cd98e04ccc0","eventTime": 1728484442651231843,
"eventName": "exception","attributes": {"exception.message": "Error or timeout while getting Distributor status: null","exception.stacktrace": "java.util.concurrent.TimeoutException
	at java.base\u002fjava.util.concurrent.FutureTask.get(FutureTask.java:204)
	at org.openqa.selenium.grid.router.GridStatusHandler.execute(GridStatusHandler.java:80)
	at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:192)
	at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
	at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:360)
	at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
	at org.openqa.selenium.grid.router.Router.execute(Router.java:87)
	at org.openqa.selenium.grid.web.EnsureSpecCompliantResponseHeaders.lambda$apply$0(EnsureSpecCompliantResponseHeaders.java:34)
	at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63
	at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:360)
	at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
	at org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)
	at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
	at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
	at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
	at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
	at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)
	at java.base\u002fjava.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base\u002fjava.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base\u002fjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base\u002fjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base\u002fjava.lang.Thread.run(Thread.java:840)\n","exception.type": "java.util.concurrent.TimeoutException","http.flavor": 1,"http.host": "selenium-router.selenium:4444","http.method": "GET","http.scheme": "HTTP","http.status_code": 200,"http.target": "\u002fstatus","http.user_agent": "curl\u002f8.5.0","logger": "org.openqa.selenium.grid.router.GridStatusHandler"}}

Node config --session-timeout reflect to Grid status as below

{
  "value": {
    "ready": true,
    "message": "Selenium Grid ready.",
    "nodes": [
      {
        "availability": "UP",
        "externalUri": "http://10.148.0.2:5555",
        "heartbeatPeriod": 60000,
        "maxSessions": 8,
        "nodeId": "6ec93a50-ab9e-4d4a-8aff-4ec8722bdf5a",
        "osInfo": {
          "arch": "amd64",
          "name": "Linux",
          "version": "6.8.0-1015-gcp"
        },
        "sessionTimeout": 720000,

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

enhancement, bug fix


Description

  • Enhanced the Grid and Node classes to include session timeout information, improving the ability to manage session durations.
  • Fixed a bug by ensuring that the session timeout is non-null when initializing a Node.
  • Updated the GridStatusHandler to include session timeout in the node status response, providing more detailed node information.

Changes walkthrough 📝

Relevant files
Enhancement
Grid.java
Include session timeout in Grid node information                 

java/src/org/openqa/selenium/grid/graphql/Grid.java

  • Added retrieval of session timeout from node status.
  • Enhanced node information with session timeout.
  • +1/-0     
    Node.java
    Add session timeout field to Node class                                   

    java/src/org/openqa/selenium/grid/graphql/Node.java

  • Added sessionTimeout field to Node class.
  • Updated constructor to include session timeout.
  • Provided getter for session timeout.
  • +8/-0     
    GridStatusHandler.java
    Include session timeout in Grid status response                   

    java/src/org/openqa/selenium/grid/router/GridStatusHandler.java

    • Added session timeout to the node status response.
    +1/-0     
    Bug fix
    Node.java
    Ensure session timeout is non-null in Node                             

    java/src/org/openqa/selenium/grid/node/Node.java

    • Changed session timeout requirement to non-null.
    +1/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    qodo-merge-pro bot commented Oct 9, 2024

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Potential Bug
    The change from Require.positive("Session timeout", sessionTimeout) to Require.nonNull("Node session timeout", sessionTimeout) might allow zero or negative session timeout values, which could lead to unexpected behavior.

    Code Consistency
    The sessionTimeout is added to the Node constructor, but it's not clear if this change is consistently applied across all Node creation points in the codebase.

    Copy link
    Contributor

    qodo-merge-pro bot commented Oct 9, 2024

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Ensure the session timeout is both non-null and positive

    Instead of using Require.nonNull() for the session timeout, consider using
    Require.positive() to ensure that the timeout is not only non-null but also a
    positive duration. This maintains the previous behavior while also ensuring the
    timeout is valid.

    java/src/org/openqa/selenium/grid/node/Node.java [129]

    -this.sessionTimeout = Require.nonNull("Node session timeout", sessionTimeout);
    +this.sessionTimeout = Require.positive("Node session timeout", sessionTimeout);
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: This suggestion is highly relevant as it maintains the previous behavior of ensuring the session timeout is positive, while also ensuring it is non-null. This change enhances the robustness and correctness of the code.

    9
    Possible issue
    Add a null check for the session timeout to prevent potential NullPointerExceptions

    Consider adding a null check for status.getSessionTimeout() before passing it to the
    Node constructor. This ensures that even if the session timeout is not available,
    the Node object can still be created without throwing a NullPointerException.

    java/src/org/openqa/selenium/grid/graphql/Grid.java [95-104]

     new Node(
         status.getNodeId(),
         status.getExternalUri(),
         status.getAvailability(),
         status.getMaxSessionCount(),
    -    status.getSessionTimeout(),
    +    status.getSessionTimeout() != null ? status.getSessionTimeout() : Duration.ZERO,
         status.getSlots().size(),
         stereotypes,
         sessions,
         status.getVersion(),
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion addresses a potential NullPointerException by adding a null check for the session timeout. This is a critical enhancement, as it ensures robustness in the code when the session timeout is not available.

    8
    Possible bug
    Add a null check before accessing the session timeout to prevent potential exceptions

    Add a null check before calling toMillis() on the session timeout. This prevents
    potential NullPointerExceptions if the session timeout is not set for some reason.

    java/src/org/openqa/selenium/grid/router/GridStatusHandler.java [144]

    -.put("sessionTimeout", node.getSessionTimeout().toMillis())
    +.put("sessionTimeout", node.getSessionTimeout() != null ? node.getSessionTimeout().toMillis() : null)
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion effectively prevents a potential NullPointerException by adding a null check before calling toMillis(). This is an important improvement for handling cases where the session timeout might not be set.

    8

    💡 Need additional feedback ? start a PR chat

    Copy link
    Contributor

    qodo-merge-pro bot commented Oct 9, 2024

    CI Failure Feedback 🧐

    (Checks updated until commit d4fbc9f)

    Action: Ruby / Remote Tests (edge, windows) / Remote Tests (edge, windows)

    Failed stage: Run Bazel [❌]

    Failed test name: Selenium::WebDriver::Remote::Driver errors when not set

    Failure summary:

    The action failed because the test Selenium::WebDriver::Remote::Driver errors when not set did not
    pass. The test expected a Selenium::WebDriver::Error::WebDriverError with the message "You must
    enable downloads in order to work with downloadable files." However, it received a
    Selenium::WebDriver::Error::UnknownError indicating that the downloads file system could not be
    found for the session id.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Microsoft Windows Server 2022
    ...
    
    677:  ^
    678:  �[32m[2,054 / 3,139]�[0m Extracting npm package @babel/[email protected]; 1s local, disk-cache ... (4 actions, 3 running)
    679:  �[32m[2,074 / 3,139]�[0m Extracting npm package @babel/[email protected]; 2s local, disk-cache ... (4 actions, 3 running)
    680:  �[32m[2,253 / 3,139]�[0m Extracting npm package @babel/[email protected]; 1s local, disk-cache ... (3 actions, 2 running)
    681:  �[32m[2,468 / 3,139]�[0m Extracting npm package @mui/[email protected]_796748879; 0s disk-cache ... (4 actions, 1 running)
    682:  �[32m[2,684 / 3,139]�[0m Extracting npm package @mui/[email protected]_796748879; 1s disk-cache ... (4 actions, 0 running)
    683:  �[32m[2,890 / 3,139]�[0m Extracting npm package @mui/[email protected]_796748879; 2s disk-cache ... (4 actions, 0 running)
    684:  �[32mINFO: �[0mFrom Building java/src/org/openqa/selenium/remote/libapi-class.jar (71 source files):
    685:  java\src\org\openqa\selenium\remote\ErrorHandler.java:46: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    686:  private final ErrorCodes errorCodes;
    687:  ^
    688:  java\src\org\openqa\selenium\remote\ErrorHandler.java:60: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    689:  this.errorCodes = new ErrorCodes();
    690:  ^
    691:  java\src\org\openqa\selenium\remote\ErrorHandler.java:68: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    692:  public ErrorHandler(ErrorCodes codes, boolean includeServerErrors) {
    693:  ^
    694:  java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    695:  ErrorCodes errorCodes = new ErrorCodes();
    696:  ^
    697:  java\src\org\openqa\selenium\remote\Response.java:97: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    698:  ErrorCodes errorCodes = new ErrorCodes();
    699:  ^
    700:  java\src\org\openqa\selenium\remote\ProtocolHandshake.java:181: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    701:  response.setStatus(ErrorCodes.SUCCESS);
    702:  ^
    703:  java\src\org\openqa\selenium\remote\ProtocolHandshake.java:182: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    704:  response.setState(ErrorCodes.SUCCESS_STRING);
    705:  ^
    706:  java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:53: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    707:  new ErrorCodes().toStatus((String) rawError, Optional.of(tuple.getStatusCode())));
    708:  ^
    709:  java\src\org\openqa\selenium\remote\W3CHandshakeResponse.java:56: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    710:  new ErrorCodes().getExceptionType((String) rawError);
    711:  ^
    712:  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
    713:  private final ErrorCodes errorCodes = new ErrorCodes();
    714:  ^
    715:  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
    716:  private final ErrorCodes errorCodes = new ErrorCodes();
    717:  ^
    718:  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
    719:  int status = response.getStatus() == ErrorCodes.SUCCESS ? HTTP_OK : HTTP_INTERNAL_ERROR;
    720:  ^
    721:  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
    722:  response.setStatus(ErrorCodes.UNKNOWN_COMMAND);
    723:  ^
    724:  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
    725:  response.setStatus(ErrorCodes.UNHANDLED_ERROR);
    726:  ^
    727:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:117: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    728:  response.setStatus(ErrorCodes.SUCCESS);
    729:  ^
    730:  java\src\org\openqa\selenium\remote\codec\AbstractHttpResponseCodec.java:118: warning: [removal] ErrorCodes in org.openqa.selenium.remote has been deprecated and marked for removal
    731:  response.setState(errorCodes.toState(ErrorCodes.SUCCESS));
    732:  ^
    733:  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
    734:  response.setState(errorCodes.toState(ErrorCodes.SUCCESS));
    735:  ^
    736:  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
    737:  private final ErrorCodes errorCodes = new ErrorCodes();
    738:  ^
    739:  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
    740:  private final ErrorCodes errorCodes = new ErrorCodes();
    741:  ^
    742:  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
    743:  response.setStatus(ErrorCodes.UNKNOWN_COMMAND);
    744:  ^
    745:  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
    746:  response.setStatus(ErrorCodes.UNHANDLED_ERROR);
    747:  ^
    748:  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
    749:  response.setStatus(ErrorCodes.SUCCESS);
    ...
    
    849:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/LocalPharmacyRounded.d.ts; 102s disk-cache ... (4 actions, 1 running)
    850:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/LoginTwoTone.d.ts; 103s disk-cache ... (4 actions, 1 running)
    851:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/LunchDiningTwoTone.d.ts; 104s disk-cache ... (4 actions, 1 running)
    852:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/MarkEmailRead.js, 676 B / 676 B; 105s disk-cache ... (4 actions, 1 running)
    853:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/MenuOpenOutlined.d.ts; 106s disk-cache ... (4 actions, 1 running)
    854:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/MobileOffRounded.d.ts; 107s disk-cache ... (4 actions, 1 running)
    855:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/MonitorWeightOutlined.d.ts; 108s disk-cache ... (4 actions, 1 running)
    856:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/MovieFilterSharp.d.ts, 48 B / 48 B; 109s disk-cache ... (4 actions, 1 running)
    857:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/NearbyErrorRounded.d.ts; 110s disk-cache ... (4 actions, 1 running)
    ...
    
    884:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/SyncDisabledRounded.js, 1.1 KiB / 1.1 KiB; 139s disk-cache ... (4 actions, 1 running)
    885:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/TextFields.js; 140s disk-cache ... (4 actions, 1 running)
    886:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/ThumbDownOffAltSharp.js; 141s disk-cache ... (4 actions, 1 running)
    887:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/TransgenderOutlined.js; 142s disk-cache ... (4 actions, 1 running)
    888:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/TwentyThreeMpRounded.d.ts; 143s disk-cache ... (4 actions, 1 running)
    889:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/VerticalShadesClosed.d.ts; 144s disk-cache ... (4 actions, 1 running)
    890:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/ViewModuleTwoTone.d.ts; 145s disk-cache ... (4 actions, 1 running)
    891:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/WaterDrop.d.ts; 146s disk-cache ... (4 actions, 1 running)
    892:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_796748879/node_modules/@mui/icons-material/WifiTetheringErrorTwoTone.js; 147s disk-cache ... (4 actions, 1 running)
    ...
    
    896:  �[32m[3,065 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_724305784/node_modules/@mui/material/modern/TableContainer/TableContainer.js; 152s disk-cache ... (4 actions, 1 running)
    897:  �[32m[3,067 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_724305784/node_modules/@mui/material/node/List/index.js; 153s disk-cache ... (4 actions, 0 running)
    898:  �[32m[3,067 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_724305784/node_modules/@mui/material/Stack/Stack.js, 2.8 KiB / 2.8 KiB; 154s disk-cache ... (4 actions, 1 running)
    899:  �[32m[3,067 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]_724305784/node_modules/@mui/material/themeCssVarsAugmentation/index.d.ts; 155s disk-cache ... (4 actions, 1 running)
    900:  �[32m[3,067 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]/node_modules/@popperjs/core/dist/esm/dom-utils/getLayoutRect.js; 156s disk-cache ... (4 actions, 1 running)
    901:  �[32m[3,067 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/@[email protected]/node_modules/@popperjs/core/lib/utils/getAltAxis.d.ts; 157s disk-cache ... (4 actions, 1 running)
    902:  �[32m[3,067 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/[email protected]/node_modules/clsx/dist/lite.mjs; 158s disk-cache ... (4 actions, 1 running)
    903:  �[32m[3,067 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/[email protected]/node_modules/dom-helpers/cjs/offsetParent.js; 159s disk-cache ... (4 actions, 1 running)
    904:  �[32m[3,067 / 3,139]�[0m Splitting Javascript ../../../javascript/grid-ui/src/index.tsx [esbuild]; Downloading node_modules/.aspect_rules_js/[email protected]/node_modules/graphql/error/syntaxError.d.ts; 160s disk-cache ... (4 actions, 1 running)
    ...
    
    1135:  �[32m[3,160 / 3,163]�[0m 21 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 135s local, disk-cache ... (3 actions running)
    1136:  �[32m[3,161 / 3,163]�[0m 22 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 136s local, disk-cache ... (2 actions running)
    1137:  �[32m[3,161 / 3,163]�[0m 22 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 146s local, disk-cache ... (2 actions running)
    1138:  �[32m[3,161 / 3,163]�[0m 22 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 156s local, disk-cache ... (2 actions running)
    1139:  �[32m[3,162 / 3,163]�[0m 23 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 158s local, disk-cache
    1140:  �[32m[3,162 / 3,163]�[0m 23 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 167s local, disk-cache
    1141:  �[32m[3,162 / 3,163]�[0m 23 / 29 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote; 184s local, disk-cache
    1142:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver/remote:driver-edge-remote (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test.log)
    1143:  �[31m�[1mFAILED: �[0m//rb/spec/integration/selenium/webdriver/remote:driver-edge-remote (Summary)
    ...
    
    1158:  Selenium::WebDriver::Remote::Driver
    1159:  exposes session_id
    1160:  exposes remote status
    1161:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
    1162:  uses a default file detector
    1163:  lists downloads
    1164:  downloads a file
    1165:  deletes downloadable files
    1166:  errors when not set (FAILED - 1)
    1167:  Failures:
    1168:  1) Selenium::WebDriver::Remote::Driver errors when not set
    1169:  Failure/Error:
    1170:  expect {
    1171:  driver.downloadable_files
    1172:  }.to raise_exception(Error::WebDriverError,
    1173:  'You must enable downloads in order to work with downloadable files.')
    1174:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: 42cac03... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
    1175:  Driver info: driver.version: unknown> with backtrace:
    1176:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1177:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1183:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
    1184:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1185:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
    1186:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
    1187:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
    1188:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1189:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1190:  Finished in 22.44 seconds (files took 0.75718 seconds to load)
    1191:  7 examples, 1 failure
    1192:  Failed examples:
    1193:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
    ...
    
    1205:  Selenium::WebDriver::Remote::Driver
    1206:  exposes session_id
    1207:  exposes remote status
    1208:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
    1209:  uses a default file detector
    1210:  lists downloads
    1211:  downloads a file
    1212:  deletes downloadable files
    1213:  errors when not set (FAILED - 1)
    1214:  Failures:
    1215:  1) Selenium::WebDriver::Remote::Driver errors when not set
    1216:  Failure/Error:
    1217:  expect {
    1218:  driver.downloadable_files
    1219:  }.to raise_exception(Error::WebDriverError,
    1220:  'You must enable downloads in order to work with downloadable files.')
    1221:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: 16d8594... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
    1222:  Driver info: driver.version: unknown> with backtrace:
    1223:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1224:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1230:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
    1231:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1232:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
    1233:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
    1234:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
    1235:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1236:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1237:  Finished in 20.79 seconds (files took 0.68197 seconds to load)
    1238:  7 examples, 1 failure
    1239:  Failed examples:
    1240:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
    ...
    
    1252:  Selenium::WebDriver::Remote::Driver
    1253:  exposes session_id
    1254:  exposes remote status
    1255:  Request#[] is deprecated and will be removed in a future version of Rack. Please use request.params[] instead
    1256:  uses a default file detector
    1257:  lists downloads
    1258:  downloads a file
    1259:  deletes downloadable files
    1260:  errors when not set (FAILED - 1)
    1261:  Failures:
    1262:  1) Selenium::WebDriver::Remote::Driver errors when not set
    1263:  Failure/Error:
    1264:  expect {
    1265:  driver.downloadable_files
    1266:  }.to raise_exception(Error::WebDriverError,
    1267:  'You must enable downloads in order to work with downloadable files.')
    1268:  expected Selenium::WebDriver::Error::WebDriverError with "You must enable downloads in order to work with downloadable files.", got #<Selenium::WebDriver::Error::UnknownError: Cannot find downloads file system for session id: 19752c4... os.arch: 'amd64', os.version: '10.0', java.version: '17.0.11'
    1269:  Driver info: driver.version: unknown> with backtrace:
    1270:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1271:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1277:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:67:in `call'
    1278:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1279:  # ./rb/lib/selenium/webdriver/remote/features.rb:62:in `downloadable_files'
    1280:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_file_downloads.rb:27:in `downloadable_files'
    1281:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:87:in `block (3 levels) in <module:Remote>'
    1282:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1283:  # ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:86:in `block (2 levels) in <module:Remote>'
    1284:  Finished in 21.67 seconds (files took 0.67143 seconds to load)
    1285:  7 examples, 1 failure
    1286:  Failed examples:
    1287:  rspec ./rb/spec/integration/selenium/webdriver/remote/driver_spec.rb:84 # Selenium::WebDriver::Remote::Driver errors when not set
    1288:  ================================================================================
    1289:  �[32m[3,163 / 3,164]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 0s disk-cache
    1290:  �[32m[3,163 / 3,164]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote
    1291:  �[32m[3,163 / 3,164]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 1s local, disk-cache
    1292:  �[32m[3,163 / 3,164]�[0m 24 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote; 14s local, disk-cache
    1293:  �[32m[3,164 / 3,165]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 0s disk-cache
    1294:  �[32m[3,164 / 3,165]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote
    1295:  �[32m[3,164 / 3,165]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 1s local, disk-cache
    1296:  �[32m[3,164 / 3,165]�[0m 25 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-edge-remote; 87s local, disk-cache
    1297:  �[32m[3,165 / 3,166]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 0s disk-cache
    1298:  �[32m[3,165 / 3,166]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote
    1299:  �[32m[3,165 / 3,166]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 1s local, disk-cache
    1300:  �[32m[3,165 / 3,166]�[0m 26 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote; 14s local, disk-cache
    1301:  �[32m[3,166 / 3,167]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 0s disk-cache
    1302:  �[32m[3,166 / 3,167]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote
    1303:  �[32m[3,166 / 3,167]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 1s local, disk-cache
    1304:  �[32m[3,166 / 3,167]�[0m 27 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote; 14s local, disk-cache
    1305:  �[32m[3,167 / 3,168]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 0s disk-cache
    1306:  �[32m[3,167 / 3,168]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote
    1307:  �[32m[3,167 / 3,168]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 1s local, disk-cache
    1308:  �[32m[3,167 / 3,168]�[0m 28 / 29 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-edge-remote; 14s local, disk-cache
    1309:  �[32mINFO: �[0mFound 29 test targets...
    1310:  �[32mINFO: �[0mElapsed time: 1628.050s, Critical Path: 749.72s
    1311:  �[32mINFO: �[0m2889 processes: 1509 disk cache hit, 1180 internal, 171 local, 29 worker.
    1312:  �[32mINFO: �[0mBuild completed, 1 test FAILED, 2889 total actions
    1313:  //rb/spec/integration/selenium/webdriver:action_builder-edge-remote      �[0m�[32mPASSED�[0m in 33.8s
    1314:  //rb/spec/integration/selenium/webdriver:bidi-edge-remote                �[0m�[32mPASSED�[0m in 14.5s
    1315:  //rb/spec/integration/selenium/webdriver:devtools-edge-remote            �[0m�[32mPASSED�[0m in 87.9s
    1316:  //rb/spec/integration/selenium/webdriver:driver-edge-remote              �[0m�[32mPASSED�[0m in 33.7s
    1317:  //rb/spec/integration/selenium/webdriver:element-edge-remote             �[0m�[32mPASSED�[0m in 29.6s
    1318:  //rb/spec/integration/selenium/webdriver:error-edge-remote               �[0m�[32mPASSED�[0m in 14.8s
    ...
    
    1333:  //rb/spec/integration/selenium/webdriver/bidi:browsing_context-edge-remote �[0m�[32mPASSED�[0m in 14.5s
    1334:  //rb/spec/integration/selenium/webdriver/bidi:log_inspector-edge-remote  �[0m�[32mPASSED�[0m in 14.4s
    1335:  //rb/spec/integration/selenium/webdriver/bidi:script-edge-remote         �[0m�[32mPASSED�[0m in 14.5s
    1336:  //rb/spec/integration/selenium/webdriver/edge:driver-edge-remote         �[0m�[32mPASSED�[0m in 34.0s
    1337:  //rb/spec/integration/selenium/webdriver/edge:options-edge-remote        �[0m�[32mPASSED�[0m in 21.3s
    1338:  //rb/spec/integration/selenium/webdriver/edge:profile-edge-remote        �[0m�[32mPASSED�[0m in 15.0s
    1339:  //rb/spec/integration/selenium/webdriver/edge:service-edge-remote        �[0m�[32mPASSED�[0m in 22.0s
    1340:  //rb/spec/integration/selenium/webdriver/remote:element-edge-remote      �[0m�[32mPASSED�[0m in 16.5s
    1341:  //rb/spec/integration/selenium/webdriver/remote:driver-edge-remote       �[0m�[31m�[1mFAILED�[0m in 3 out of 3 in 29.7s
    1342:  Stats over 3 runs: max = 29.7s, min = 28.0s, avg = 28.7s, dev = 0.7s
    1343:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test.log
    1344:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test_attempts/attempt_1.log
    1345:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/remote/driver-edge-remote/test_attempts/attempt_2.log
    1346:  Executed 29 out of 29 tests: 28 tests pass and �[0m�[31m�[1m1 fails locally�[0m.
    1347:  There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
    1348:  �[0m
    1349:  ##[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.

    @VietND96 VietND96 force-pushed the fix-node-status branch 2 times, most recently from 836e903 to 600e63f Compare October 11, 2024 07:05
    @VietND96 VietND96 changed the title [grid]: Distributor could not get session timeout from RemoteNode status [grid]: Add node sessionTimeout to Grid status Oct 11, 2024
    Copy link

    codecov bot commented Oct 11, 2024

    Codecov Report

    All modified and coverable lines are covered by tests ✅

    Project coverage is 57.78%. Comparing base (57f8398) to head (600e63f).
    Report is 804 commits behind head on trunk.

    Additional details and impacted files
    @@            Coverage Diff             @@
    ##            trunk   #14582      +/-   ##
    ==========================================
    - Coverage   58.48%   57.78%   -0.70%     
    ==========================================
      Files          86       89       +3     
      Lines        5270     5609     +339     
      Branches      220      245      +25     
    ==========================================
    + Hits         3082     3241     +159     
    - Misses       1968     2123     +155     
    - Partials      220      245      +25     

    ☔ View full report in Codecov by Sentry.
    📢 Have feedback on the report? Share it here.

    @VietND96 VietND96 merged commit f9ffaa2 into trunk Oct 13, 2024
    26 of 29 checks passed
    @VietND96 VietND96 deleted the fix-node-status branch October 13, 2024 09:20
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants