[OpenScreen] Update script to support Windows sender laptops [chromium/src : main]

0 views
Skip to first unread message

Bailey Myers-Morgan (Gerrit)

unread,
Nov 12, 2025, 6:48:04 PMNov 12
to Zijie He, chromium...@chromium.org, feature-me...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Zijie He

Bailey Myers-Morgan added 1 comment

Patchset-level comments
File-level comment, Patchset 17 (Latest):
Bailey Myers-Morgan . resolved

Note that the failed builder is still expected: As you can see both builders are failing on "sink not found", which is unrelated to the script (and an improvement from the previous state).

Open in Gerrit

Related details

Attention is currently required from:
  • Zijie He
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I69c599d88304e8b840de0c87182ad004a262ee66
Gerrit-Change-Number: 7139760
Gerrit-PatchSet: 17
Gerrit-Owner: Bailey Myers-Morgan <bmyers...@google.com>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-Attention: Zijie He <zij...@google.com>
Gerrit-Comment-Date: Wed, 12 Nov 2025 23:47:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Zijie He (Gerrit)

unread,
Nov 12, 2025, 8:32:20 PMNov 12
to Bailey Myers-Morgan, chromium...@chromium.org, feature-me...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Bailey Myers-Morgan

Zijie He voted and added 3 comments

Votes added by Zijie He

Code-Review+1

3 comments

File chrome/test/media_router/performance/openscreen_cast_performance_test.py
Line 179, Patchset 17 (Latest): key_path = os.path.expanduser('~/.ssh/id_ed25519')
ssh_command = [
Zijie He . unresolved

I think this is not necessary since you are connecting from a linux host to the sender (may be mac or windows). So this command itself is always running on linux.

It's definitely not wrong though.

Line 301, Patchset 17 (Latest): send_ssh_command(args.sender, args.username, download_commands,
Zijie He . unresolved

QQ, does it mean that even on windows, the sender still has the ssh-server installed?

Another question is that do you plan to manage these senders via puppet as well?

Line 500, Patchset 17 (Latest): cleanup_command = (
Zijie He . unresolved

Nit, I think the pattern of SENDER_CHROMEDRIVER_CHECK_CMD is more readable 👍

Open in Gerrit

Related details

Attention is currently required from:
  • Bailey Myers-Morgan
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I69c599d88304e8b840de0c87182ad004a262ee66
    Gerrit-Change-Number: 7139760
    Gerrit-PatchSet: 17
    Gerrit-Owner: Bailey Myers-Morgan <bmyers...@google.com>
    Gerrit-Reviewer: Zijie He <zij...@google.com>
    Gerrit-Attention: Bailey Myers-Morgan <bmyers...@google.com>
    Gerrit-Comment-Date: Thu, 13 Nov 2025 01:32:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Bailey Myers-Morgan (Gerrit)

    unread,
    Nov 13, 2025, 1:20:40 PMNov 13
    to Zijie He, chromium...@chromium.org, feature-me...@chromium.org, mfoltz+wa...@chromium.org

    Bailey Myers-Morgan added 3 comments

    File chrome/test/media_router/performance/openscreen_cast_performance_test.py
    Line 179, Patchset 17: key_path = os.path.expanduser('~/.ssh/id_ed25519')
    ssh_command = [
    Zijie He . resolved

    I think this is not necessary since you are connecting from a linux host to the sender (may be mac or windows). So this command itself is always running on linux.

    It's definitely not wrong though.

    Bailey Myers-Morgan

    This may or may not have fixed a transient issue with locating the .ssh key, so I'm leaving it for now although you're right that it might not be strictly necessary :P

    Line 301, Patchset 17: send_ssh_command(args.sender, args.username, download_commands,
    Zijie He . resolved

    QQ, does it mean that even on windows, the sender still has the ssh-server installed?

    Another question is that do you plan to manage these senders via puppet as well?

    Bailey Myers-Morgan

    Yes the sender has ssh-server installed; no, they're not managed via puppet. The only thing necessary for them is the Chrome Browser which is injected via this script, and they're not live as bots anyways

    Line 500, Patchset 17: cleanup_command = (
    Zijie He . resolved

    Nit, I think the pattern of SENDER_CHROMEDRIVER_CHECK_CMD is more readable 👍

    Bailey Myers-Morgan

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I69c599d88304e8b840de0c87182ad004a262ee66
      Gerrit-Change-Number: 7139760
      Gerrit-PatchSet: 18
      Gerrit-Owner: Bailey Myers-Morgan <bmyers...@google.com>
      Gerrit-Reviewer: Zijie He <zij...@google.com>
      Gerrit-Comment-Date: Thu, 13 Nov 2025 18:20:29 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Zijie He <zij...@google.com>
      satisfied_requirement
      open
      diffy

      Bailey Myers-Morgan (Gerrit)

      unread,
      Nov 13, 2025, 1:58:37 PMNov 13
      to Zijie He, chromium...@chromium.org, feature-me...@chromium.org, mfoltz+wa...@chromium.org

      Bailey Myers-Morgan voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I69c599d88304e8b840de0c87182ad004a262ee66
      Gerrit-Change-Number: 7139760
      Gerrit-PatchSet: 19
      Gerrit-Owner: Bailey Myers-Morgan <bmyers...@google.com>
      Gerrit-Reviewer: Bailey Myers-Morgan <bmyers...@google.com>
      Gerrit-Reviewer: Zijie He <zij...@google.com>
      Gerrit-Comment-Date: Thu, 13 Nov 2025 18:58:28 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Nov 13, 2025, 2:52:57 PMNov 13
      to Bailey Myers-Morgan, Zijie He, chromium...@chromium.org, feature-me...@chromium.org, mfoltz+wa...@chromium.org

      Chromium LUCI CQ submitted the change with unreviewed changes

      Unreviewed changes

      17 is the latest approved patch-set.
      The change was submitted with unreviewed changes in the following files:

      ```
      The name of the file: chrome/test/media_router/performance/openscreen_cast_performance_test.py
      Insertions: 23, Deletions: 17.

      @@ -229,21 +229,24 @@
      with urllib.request.urlopen(CFT_JSON_URL) as url:
      data = json.loads(url.read().decode())

      - platform = ''
      - if sender_os == 'mac':
      - platform = 'mac-arm64'
      - elif sender_os == 'win':
      - platform = 'win64'
      + platform = {
      + 'mac': (
      + 'mac-arm64'
      + ),
      + 'win': (
      + 'win64'
      + ),
      + }

      for v in reversed(data['versions']):
      if not version or v['version'] == version:
      chrome_url = None
      driver_url = None
      for download in v['downloads']['chrome']:
      - if download['platform'] == platform:
      + if download['platform'] == platform[sender_os]:
      chrome_url = download['url']
      for download in v['downloads']['chromedriver']:
      - if download['platform'] == platform:
      + if download['platform'] == platform[sender_os]:
      driver_url = download['url']
      if chrome_url and driver_url:
      logging.info("Found URLs for version %s", v['version'])
      @@ -432,7 +435,9 @@
      if args.sender_os == 'mac':
      binary_path = (f'{remote_app_path}/Contents/MacOS/Google Chrome for '
      'Testing')
      - logging.info("Setting binary_location to: %s", binary_path)
      + logging.info(
      + "Mac OS detected. Setting binary_location to: %s",
      + binary_path)
      elif args.sender_os == 'win':
      logging.info(
      "Windows OS detected. Setting binary_location to: %s",
      @@ -490,14 +495,12 @@
      tunnel_proc.terminate()
      logging.info("Terminated tunnel.")

      - if args.sender_os == 'mac':
      - cleanup_command = (
      + cleanup_command = {
      + 'mac': (
      f"rm -rf /tmp/chrome-mac-arm64 /tmp/chromedriver-mac-arm64 "
      f"/tmp/*.zip"
      - )
      - elif args.sender_os == 'win':
      - logging.info("Windows OS detected. Implementing cleanup.")
      - cleanup_command = (
      + ),
      + 'win': (
      f'powershell -Command "'
      f'Remove-Item -Path C:\\Windows\\Temp\\*.zip -ErrorAction '
      f'SilentlyContinue; '
      @@ -509,8 +512,11 @@
      f'C:\\Windows\\Temp\\chromedriver_verbose.log -ErrorAction '
      f'SilentlyContinue'
      f'"'
      - )
      - send_ssh_command(args.sender, args.username, cleanup_command)
      + ),
      + }
      +
      + send_ssh_command(args.sender, args.username,
      + cleanup_command[args.sender_os])
      logging.info("Cleaned up tmp files on remote machine.")

      def enable_tab_mirroring(driver):
      @@ -526,7 +532,7 @@
      """
      driver.get(CAST_URL)

      - wait = WebDriverWait(driver, 300) # Wait up to 300 seconds for the element
      + wait = WebDriverWait(driver, 300)
      button = wait.until(
      ec.element_to_be_clickable((By.XPATH, CAST_BTN_XPATH)))
      button.click()
      ```

      Change information

      Commit message:
      [OpenScreen] Update script to support Windows sender laptops
      Bug: 443790198
      Change-Id: I69c599d88304e8b840de0c87182ad004a262ee66
      Commit-Queue: Bailey Myers-Morgan <bmyers...@google.com>
      Reviewed-by: Zijie He <zij...@google.com>
      Cr-Commit-Position: refs/heads/main@{#1544376}
      Files:
      • M chrome/test/media_router/performance/openscreen_cast_performance_test.py
      Change size: L
      Delta: 1 file changed, 192 insertions(+), 83 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Zijie He
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I69c599d88304e8b840de0c87182ad004a262ee66
      Gerrit-Change-Number: 7139760
      Gerrit-PatchSet: 20
      Gerrit-Owner: Bailey Myers-Morgan <bmyers...@google.com>
      Gerrit-Reviewer: Bailey Myers-Morgan <bmyers...@google.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages