owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
445 stars 156 forks source link

[QA] download chromium in Ci only after updating playwright #11921

Open ScharfViktor opened 4 days ago

ScharfViktor commented 4 days ago

I noticed that we download chromium every pipeline which is unnecessary and inefficient.

Screenshot 2024-11-18 at 10 36 15

https://playwright.dev/docs/browsers#chromium

chromium update comes out quite often, but playwright uses the latest stable versions of browsers in its update, so if we don't update playwright for a long time we are using an old browser.

So we need to:

cc @saw-jan

ScharfViktor commented 4 days ago

in the ocisCI we don't install chromium because owncloudci/nodejs:20 has chrome https://github.com/owncloud-ci/nodejs/blob/1f6b1263a5439e1954281a910d5a613048d64911/v20/Dockerfile.amd64#L29 and e2e tests use this chrome

pascalwengerter commented 4 days ago

in the ocisCI we don't install chromium because owncloudci/nodejs:20 has chrome https://github.com/owncloud-ci/nodejs/blob/1f6b1263a5439e1954281a910d5a613048d64911/v20/Dockerfile.amd64#L29 and e2e tests use this chrome

Came here to point this out 🙌🏽

ScharfViktor commented 3 days ago
  • [ ] automatically check for playwright updates and update playwright to use the fresh browser version

this is half done @saw-jan bot renovate periodically checks and updates playwright. here is example https://github.com/owncloud/web/pull/11802

amrita-shrestha commented 1 day ago

Remaining Task:

Currently, the owncloudci-nodejs image (owncloud-ci/nodejs) installs the google-chrome-stable_current_amd64.deb package, which is used in the end-to-end (e2e) testing pipeline. However, only the design-system-build-and-tests pipeline uses the Playwright Chromium, which gets cached during each build via the playwright-install step-piepline (part of the cache-pnpm pipeline).

Goal:

Solution

@saw-jan @ScharfViktor does this approach align with your expectations?

ScharfViktor commented 1 day ago

@saw-jan @ScharfViktor does this approach align with your expectations?

yes, correct

  • check the cached Chromium version, compare it with the latest version

A small nuance: we need no latest chromium, but the one that supports installed playwright version https://playwright.dev/docs/release-notes#browser-versions if we use Playwright 1.49 -> we need chromium 131.0.6778.33