mirror of
https://github.com/apache/airflow.git
synced 2026-11-04 07:12:48 +00:00
* 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
90 lines
3.6 KiB
YAML
90 lines
3.6 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: Additional CI image checks
|
|
on: # yamllint disable-line rule:truthy
|
|
workflow_call:
|
|
inputs:
|
|
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
|
|
branch:
|
|
description: "Branch used to run the CI jobs in (main/v*_*_test)."
|
|
required: true
|
|
type: string
|
|
default-python-version:
|
|
description: "Which version of python should be used by default"
|
|
required: true
|
|
type: string
|
|
upgrade-to-newer-dependencies:
|
|
description: "Whether to upgrade to newer dependencies (true/false)"
|
|
required: true
|
|
type: string
|
|
skip-prek-hooks:
|
|
description: "Whether to skip prek hooks (true/false)"
|
|
required: true
|
|
type: string
|
|
latest-versions-only:
|
|
description: "Whether to run only latest versions (true/false)"
|
|
required: true
|
|
type: string
|
|
debug-resources:
|
|
description: "Whether to debug resources (true/false)"
|
|
required: true
|
|
type: string
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
# Check that the image builds quickly from the registry cache. This build is slow from
|
|
# scratch, so we only run it on regular PRs.
|
|
check-that-image-builds-quickly:
|
|
# A PR that touches install_os_dependencies.sh or scripts/docker/keys misses the cache for the
|
|
# layer that builds Python from source, which takes 11-18 minutes for Python 3.11+ on hosted runners.
|
|
timeout-minutes: 35
|
|
name: Check that image builds quickly
|
|
runs-on: ${{ format(fromJSON(inputs.runners)[0], '8+16', '32+64') }}
|
|
env:
|
|
UPGRADE_TO_NEWER_DEPENDENCIES: false
|
|
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
|
|
PYTHON_VERSION: "${{ inputs.default-python-version }}"
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_USERNAME: ${{ github.actor }}
|
|
VERBOSE: "true"
|
|
PLATFORM: ${{ inputs.platform }}
|
|
if: inputs.branch == 'main'
|
|
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:
|
|
persist-credentials: false
|
|
- name: "Install Breeze"
|
|
uses: ./.github/actions/breeze
|
|
- name: "Check that image builds quickly"
|
|
# Synchronize to be a little bit shorter than above timeout-minutes to make sure that
|
|
# if the build takes too long the job will fail with logs. 33 minutes * 60 s = 1980 seconds
|
|
run: breeze shell --max-time 1980 --platform "${PLATFORM}"
|