This is an automated email from the ASF dual-hosted git repository.
shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f49bce025a8 Optimize UI and Playwright dependency caching (#73183)
f49bce025a8 is described below
commit f49bce025a8a553c8e9f2a5684a688bc69a89eed
Author: Yossi Eliaz <[email protected]>
AuthorDate: Mon Sep 28 09:26:59 2026 +0300
Optimize UI and Playwright dependency caching (#73183)
Co-authored-by: Shahar Epstein <[email protected]>
---
.github/workflows/basic-tests.yml | 41 +++++---------------------------------
.github/workflows/ui-e2e-tests.yml | 21 ++++++++++++++-----
2 files changed, 21 insertions(+), 41 deletions(-)
diff --git a/.github/workflows/basic-tests.yml
b/.github/workflows/basic-tests.yml
index f6fa7c6144a..7ff13294e1c 100644
--- a/.github/workflows/basic-tests.yml
+++ b/.github/workflows/basic-tests.yml
@@ -201,50 +201,19 @@ jobs:
with:
node-version: 24
cache: 'pnpm'
- cache-dependency-path: 'airflow-core/src/airflow/**/pnpm-lock.yaml'
- - name: "Restore eslint cache (ui)"
- # yamllint disable-line rule:line-length
- uses:
apache/infrastructure-actions/stash/restore@61dcea11f19e2bbe1263f14d72235e8da17d3ad0
# restore/v1.0.0
- with:
- path: airflow-core/src/airflow/ui/node_modules/
- # yamllint disable-line rule:line-length
- key: cache-ui-node-modules-v1-${{ runner.os }}-${{
hashFiles('airflow-core/src/airflow/ui/**/pnpm-lock.yaml') }}
- id: restore-eslint-cache-ui
+ cache-dependency-path: |
+ airflow-core/src/airflow/ui/pnpm-lock.yaml
+
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/pnpm-lock.yaml
+ # setup-node already caches pnpm's package store. Recreate node_modules
rather than
+ # transferring another archive that excludes pnpm's hidden .pnpm
directory by default.
- run: cd airflow-core/src/airflow/ui && pnpm install --frozen-lockfile
- run: cd airflow-core/src/airflow/ui && pnpm test
env:
FORCE_COLOR: 2
- - name: "Save eslint cache (ui)"
- uses:
apache/infrastructure-actions/stash/save@61dcea11f19e2bbe1263f14d72235e8da17d3ad0
# save/v1.0.0
- with:
- path: airflow-core/src/airflow/ui/node_modules/
- key: cache-ui-node-modules-v1-${{ runner.os }}-${{
hashFiles('airflow/ui/**/pnpm-lock.yaml') }}
- if-no-files-found: 'error'
- retention-days: '2'
- if: steps.restore-eslint-cache-ui.outputs.stash-hit != 'true'
- - name: "Restore eslint cache (simple auth manager UI)"
- # yamllint disable-line rule:line-length
- uses:
apache/infrastructure-actions/stash/restore@61dcea11f19e2bbe1263f14d72235e8da17d3ad0
# restore/v1.0.0
- with:
- path:
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/node_modules/
- key: >
- cache-simple-am-ui-node-modules-v1-
- ${{ runner.os }}-${{
hashFiles('airflow/api_fastapi/auth/managers/simple/ui/**/pnpm-lock.yaml') }}
- id: restore-eslint-cache-simple-am-ui
- run: cd airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui
&& pnpm install --frozen-lockfile
- run: cd airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui
&& pnpm test
env:
FORCE_COLOR: 2
- - name: "Save eslint cache (ui)"
- uses:
apache/infrastructure-actions/stash/save@61dcea11f19e2bbe1263f14d72235e8da17d3ad0
# save/v1.0.0
- with:
- path:
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/node_modules/
- key: >
- cache-simple-am-ui-node-modules-v1-
- ${{ runner.os }}-${{
hashFiles('airflow/api_fastapi/auth/managers/simple/ui/**/pnpm-lock.yaml') }}
- if-no-files-found: 'error'
- retention-days: '2'
- if: steps.restore-eslint-cache-simple-am-ui.outputs.stash-hit != 'true'
check-translation-completness:
timeout-minutes: 15
diff --git a/.github/workflows/ui-e2e-tests.yml
b/.github/workflows/ui-e2e-tests.yml
index 307b3b9af17..b55ec044562 100644
--- a/.github/workflows/ui-e2e-tests.yml
+++ b/.github/workflows/ui-e2e-tests.yml
@@ -129,20 +129,31 @@ jobs:
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 #
v7.0.0
with:
node-version: 24
+ cache: 'pnpm'
+ cache-dependency-path: |
+ airflow-core/src/airflow/ui/pnpm-lock.yaml
+
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/pnpm-lock.yaml
+ - name: "Install UI dependencies"
+ working-directory: airflow-core/src/airflow/ui
+ run: pnpm install --frozen-lockfile
- name: "Compile UI assets (for image build fallback)"
if: github.event_name == 'workflow_dispatch'
run: |
cd airflow-core/src/airflow/ui
- pnpm install --frozen-lockfile
pnpm build
cd ../api_fastapi/auth/managers/simple/ui
pnpm install --frozen-lockfile
pnpm build
- - name: "Install Playwright browsers and dependencies"
+ # `breeze testing ui-e2e-tests` installs the browser itself but without
`--with-deps`,
+ # so the runner's OS packages have to be installed here.
+ - name: "Install selected Playwright browser and dependencies"
+ working-directory: airflow-core/src/airflow/ui
run: |
- cd airflow-core/src/airflow/ui
- pnpm install --frozen-lockfile
- pnpm exec playwright install --with-deps
+ if [ "${BROWSER}" = "all" ]; then
+ pnpm exec playwright install --with-deps
+ else
+ pnpm exec playwright install --with-deps "${BROWSER}"
+ fi
- name: "Test UI e2e tests"
run: breeze testing ui-e2e-tests --browser "$BROWSER"
env: