Files
Jarek Potiuk d17f121363 Widen the Spot pool for RunsOn runners: more families, capacity-optimized, size ranges (#75822)
* Let RunsOn x64 runners use more instance families for Spot

Generated-by: Claude Opus 5

* Take RunsOn Spot runners from capacity-optimized pools

Generated-by: Claude Opus 5

* Let RunsOn runners take Spot from up to twice the requested size

Generated-by: Claude Opus 5
2026-10-27 22:43:27 +01:00

188 lines
6.9 KiB
YAML

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: UI End-to-End Tests
permissions:
contents: read
on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
workflow-name:
description: "Name of the test"
type: string
required: true
runners:
description: "The array of labels (in json form) determining runners."
type: string
default: '["ubuntu-24.04"]'
platform:
description: "Platform for the build - 'linux/amd64' or 'linux/arm64'"
type: string
default: 'linux/amd64'
default-python-version:
description: "Which version of python should be used by default"
type: string
default: '3.11'
use-uv:
description: "Whether to use uv to build the image (true/false)"
type: string
default: 'true'
docker-image-tag:
description: "Tag of the Docker image to test"
type: string
required: true
browser:
description: "Browser to test (chromium, firefox, webkit, all)"
type: string
default: "all"
workflow_call:
inputs:
workflow-name:
description: "Name of the test"
type: string
required: true
runners:
description: "The array of labels (in json form) determining runners."
required: true
type: string
platform:
description: "Platform for the build - 'linux/amd64' or 'linux/arm64'"
required: true
type: string
default-python-version:
description: "Which version of python should be used by default"
required: true
type: string
use-uv:
description: "Whether to use uv to build the image (true/false)"
required: true
type: string
docker-image-tag:
description: "Tag of the Docker image to test"
type: string
default: ""
browser:
description: "Browser to test (chromium, firefox, webkit, all)"
type: string
default: "all"
jobs:
test-ui-e2e-tests:
timeout-minutes: 90
name: ${{ inputs.workflow-name || 'UI E2E Tests' }}
runs-on: ${{ format(fromJSON(inputs.runners || '["ubuntu-24.04"]')[0], '8+16', '32+64') }}
env:
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version || '3.11' }}"
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
VERBOSE: "true"
BROWSER: "${{ inputs.browser || 'all' }}"
PLATFORM: "${{ inputs.platform || 'linux/amd64' }}"
USE_UV: "${{ inputs.use-uv || 'true' }}"
steps:
- name: "Cleanup repo"
shell: bash
run: sudo rm -rf ${GITHUB_WORKSPACE}/*
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 2
persist-credentials: false
- name: "Prepare breeze & PROD image: ${{ env.PYTHON_MAJOR_MINOR_VERSION }}"
uses: ./.github/actions/prepare_breeze_and_image
with:
platform: ${{ inputs.platform }}
image-type: "prod"
python: ${{ env.PYTHON_MAJOR_MINOR_VERSION }}
use-uv: ${{ inputs.use-uv }}
make-mnt-writeable-and-cleanup: true
id: breeze
if: github.event_name != 'workflow_dispatch'
- name: "Install Breeze (manual trigger)"
uses: ./.github/actions/breeze
if: github.event_name == 'workflow_dispatch'
- name: "Setup pnpm"
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
version: 9
run_install: false
- name: "Setup node"
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.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 build
cd ../api_fastapi/auth/managers/simple/ui
pnpm install --frozen-lockfile
pnpm build
# `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: |
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:
DOCKER_IMAGE: "${{ inputs.docker-image-tag || '' }}"
- name: "Upload test results"
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: "playwright-report-${{ env.BROWSER }}"
path: |
airflow-core/src/airflow/ui/playwright-report/
airflow-core/src/airflow/ui/test-results/
retention-days: 7
if-no-files-found: 'warn'
if: always()
- name: "Extract E2E test failures and fixme tests"
run: python3 scripts/ci/extract_e2e_test_results.py
env:
RESULTS_JSON: "airflow-core/src/airflow/ui/test-results/results.json"
OUTPUT_DIR: "e2e-test-report"
BROWSER: "${{ env.BROWSER }}"
RUN_ID: "${{ github.run_id }}"
RUN_ATTEMPT: "${{ github.run_attempt }}"
if: always()
- name: "Upload E2E test report"
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: "e2e-test-report-${{ env.BROWSER }}"
path: e2e-test-report/
retention-days: 14
if-no-files-found: 'warn'
if: always()