Skip to content

Try caching playwright browsers download #33557

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

Closed
wants to merge 10 commits into from
Closed

Try caching playwright browsers download #33557

wants to merge 10 commits into from

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Jun 15, 2021

No description provided.

@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jun 15, 2021
@HaoK
Copy link
Member Author

HaoK commented Jun 15, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@HaoK HaoK force-pushed the haok/pwcache branch 2 times, most recently from caf55eb to cc5a930 Compare July 15, 2021 01:12
@HaoK
Copy link
Member Author

HaoK commented Jul 15, 2021

/azp-run

@HaoK
Copy link
Member Author

HaoK commented Jul 15, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@HaoK
Copy link
Member Author

HaoK commented Jul 15, 2021

@dotnet/aspnet-build does anyone know why only this PR seems to fail with this error? I added some azure magic to try and cache our playwright browsers, but it shouldn't affect the mac os test leg at all... I've tried like 4-5+ times now

Error: Failed find: ENOENT: no such file or directory, lstat '/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/Versions'

@wtgodbe
Copy link
Member

wtgodbe commented Jul 16, 2021

Very weird, I'm not sure. Could be an AzDO issue w/ the PublishTestResults task, maybe @riarenas knows?

@riarenas
Copy link
Member

I haven't seen any ongoing issues with the publish test results task, so at the very least it's not a known issue. I would give it another try, and if it's consistently failing, we can raise an ICM.

@dotnet/dnceng for visibility.

@MattGal
Copy link
Member

MattGal commented Jul 16, 2021

If you scroll up to the "run build.sh" stage there's lots of restore failures (new variant, same problem) in that stage. It's possible this incomplete restore has some impact?

  Determining projects to restore...
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.csharp/index.json'.
  An error occurred while sending the request.
    Unable to read data from the transport connection: Connection reset by peer.
    Connection reset by peer
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.extensions.dependencyinjection/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9c2ea29a-00e0-4bae-b470-161fdab1f360/nuget/v3/flat2/microsoft.extensions.options/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host

inputs:
key: 'pw | "$(Agent.OS)" | eng/versions.props'
restoreKeys: |
pw | "$(Agent.OS)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why fallback to whatever Playwright version has been cached❔ Suggest leaving restoreKeys out

cacheHitVar: CACHE_PLAYWRIGHT_HIT
displayName: Cache playwright browsers
- script: npm i -D playwright
condition: ne(variables['CACHE_PLAYWRIGHT_HIT'], 'true')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the Helix test job need Playwright❔ Suggest leaving this job alone

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well the quarantined version of helix will need it, and eventually the real one too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we do Playwright installation on the Helix agents❔ I could understand this if the installations were uploaded from the build agents.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now it does it both on the helix machines but also as part of local builds/tests since the developer workflow is a thing too, generally it doesn't look like our builds are factored in a way that makes it easy to optionally install dependencies. I had to do some magic with conditional compilation for that to work on helix, so its possible but currently we aren't setup to easily stop installing playwright on builds

@@ -659,6 +661,17 @@ stages:
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
- task: Cache@2
inputs:
key: 'pw | "$(Agent.OS)" | eng/versions.props'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eng/Versions.props doesn't list the npm package version for Playwright. I'm not sure where the version is stored. @javiercn❔ If we just use the latest, caching would be a Bad Thing:tm:.

@HaoK HaoK force-pushed the haok/pwcache branch 2 times, most recently from 9b290f4 to b3fa42b Compare July 26, 2021 17:15
@HaoK
Copy link
Member Author

HaoK commented Aug 4, 2021

@MattGal I'm still seeing an error with restore due to this 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/7d9f5c21-0d79-403f-bfe3-9a4506529760/nuget/v3/flat2/netstandard.library/index.json' not existing, is something bad cached in this PR maybe?

@MattGal
Copy link
Member

MattGal commented Aug 9, 2021

@MattGal I'm still seeing an error with restore due to this 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/7d9f5c21-0d79-403f-bfe3-9a4506529760/nuget/v3/flat2/netstandard.library/index.json' not existing, is something bad cached in this PR maybe?

I've been OOF, taking a look.

@MattGal
Copy link
Member

MattGal commented Aug 9, 2021

@HaoK I'm happy to look at whatever but I need a link, the only runs I can quickly find are failing just for ENOENT: no such file or directory, lstat '/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/Versions'

@HaoK
Copy link
Member Author

HaoK commented Aug 9, 2021

Yeah that's my question, I constantly get those errors only, and its just specific to this PR where you said before it was a "(new variant, same problem)"

@HaoK
Copy link
Member Author

HaoK commented Aug 9, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@HaoK HaoK closed this Sep 29, 2021
@HaoK HaoK deleted the haok/pwcache branch October 1, 2021 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants