actions / runner-images

GitHub Actions runner images
MIT License
9.82k stars 3.01k forks source link

Don't allow browsers to mismatch with their corresponding drivers when updating images #10336

Closed danielhjacobs closed 1 week ago

danielhjacobs commented 1 month ago

Description

Looking at https://github.com/actions/runner-images/blob/ubuntu22/20240721.1/images/ubuntu/Ubuntu2204-Readme.md#browsers-and-drivers, Ubuntu 22.04 version 20240721.1 uses Microsoft Edge 126.0.2592.113 and Microsoft Edge WebDriver 126.0.2592.102. A job running on that image, after trying to download Edgedriver from https://msedgedriver.azureedge.net/126.0.2592.113/edgedriver_linux64.zip, failed with the message "End of central directory not found". It tried to download that version of Edgedriver because that's the Edge version it has installed.

I'd also say that the problem is slightly on Edgedriver for lagging behind official releases, but that will happen, and when it does, it would be better if the installed browser didn't update in the image.

Platforms affected

Runner images affected

Image version and build link

20240721.1.0

https://github.com/ruffle-rs/ruffle/actions/runs/10068053329/job/27832705746

Is it regression?

Yes - https://github.com/actions/runner-images/blob/ubuntu22/20240714.1/images/ubuntu/Ubuntu2204-Readme.md#browsers-and-drivers has matching versions for Edge and EdgeDriver

Expected behavior

The version of Edge being used should match the version of EdgeDriver being used.

Actual behavior

They do not.

Repro steps

1) Run an action that runs with this image. 2) Try to use EdgeDriver with wdio for tests

danielhjacobs commented 1 month ago

Also though, there is an EdgeDriver issue unrelated to this repo. The Linux release is lagging behind; https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/: https://msedgewebdriverstorage.z22.web.core.windows.net/?prefix=126.0.2592.113/. It released the same day for the last version: https://msedgewebdriverstorage.z22.web.core.windows.net/?prefix=126.0.2592.102/.

hemanthmanga commented 1 month ago

@danielhjacobs Thank you for bringing this issue to us. We will look into this issue and will update.

danielhjacobs commented 1 month ago

To go over the problems that lead to this issue:

This repo has a script which installs Microsoft Edge stable from https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/. The current Microsoft Edge stable there is 127.0.2651.74.

That script then gets the major version of the installed Edge release and pulls Edgedriver from https://msedgedriver.azureedge.net/LATESTRELEASE${edge_version_major}_LINUX. The latest 127 release with a Linux version is 127.0.2651.72.

That causes a version mismatch between the installed Edge version and the installed EdgeDriver.

With that version mismatch, apparently wdio fails when running tests on Edge.

I did open https://github.com/MicrosoftEdge/EdgeWebDriver/issues/156 as well.

danielhjacobs commented 1 month ago

I opened https://github.com/webdriverio/webdriverio/issues/13251 as well. I don't really care whether EdgeWebDriver, this repo, or wdio fix this issue, but someone needs to do so.

danielhjacobs commented 1 month ago

https://github.com/actions/runner-images/blob/ubuntu22/20240721.1/images/ubuntu/Ubuntu2204-Readme.md#environment-variables-1 sets the EDGEWEBDRIVER environment variable

But this is using the EDGEDRIVER_VERSION environment variable:

https://github.com/webdriverio-community/node-edgedriver/blob/7b2b44946f422b86e4c937d277f412a380394a1c/src/install.ts#L24

hemanthmanga commented 2 weeks ago

Hi @danielhjacobs Its Auto-generated for versions of browsers with their corresponding drivers during Image deployments, If we try to match the browser version with corresponding driver but still with the upcoming image deployments the versions will be mismatched again, Hence the need to set the environment cannot be implemented at our end,Customers can do it do it via DRIVER_VERSION=$(msedgedriver --version) in their workflows. Thanks.

hemanthmanga commented 1 week ago

Hi @danielhjacobs, Since we haven’t received a response, we’ll assume your issue is resolved and will close this issue for now. Thank you.