Skip to content
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

Update hatch_build.py #302

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ jobs:
outputs:
image-tag: ${{ github.event.pull_request.head.sha || github.sha }}
python-versions: ${{ steps.selective-checks.outputs.python-versions }}
upgrade-to-newer-dependencies: ${{ steps.selective-checks.outputs.upgrade-to-newer-dependencies }}
all-python-versions-list-as-string: >-
${{ steps.selective-checks.outputs.all-python-versions-list-as-string }}
python-versions-list-as-string: ${{ steps.selective-checks.outputs.python-versions-list-as-string }}
default-python-version: ${{ steps.selective-checks.outputs.default-python-version }}
upgrade-to-newer-dependencies: ${{ steps.selective-checks.outputs.upgrade-to-newer-dependencies }}
run-tests: ${{ steps.selective-checks.outputs.run-tests }}
run-kubernetes-tests: ${{ steps.selective-checks.outputs.run-kubernetes-tests }}
ci-image-build: ${{ steps.selective-checks.outputs.ci-image-build }}
Expand All @@ -81,7 +80,6 @@ jobs:
github.event.pull_request.head.sha ||
github.sha
}}"
if: github.repository == 'apache/airflow'
steps:
- name: "Cleanup repo"
shell: bash
Expand Down Expand Up @@ -168,17 +166,14 @@ jobs:
needs: [build-info]
uses: ./.github/workflows/ci-image-build.yml
# Only run this it if the PR comes from fork, otherwise build will be done "in-PR-workflow"
if: |
needs.build-info.outputs.ci-image-build == 'true' &&
github.event.pull_request.head.repo.full_name != 'apache/airflow'
if: needs.build-info.outputs.ci-image-build == 'true'
with:
runs-on: '["ubuntu-22.04"]'
do-build: ${{ needs.build-info.outputs.ci-image-build }}
target-commit-sha: ${{ needs.build-info.outputs.target-commit-sha }}
pull-request-target: "true"
is-committer-build: ${{ needs.build-info.outputs.is-committer-build }}
push-image: "true"
upload-constraints: "true"
use-uv: "true"
image-tag: ${{ needs.build-info.outputs.image-tag }}
platform: "linux/amd64"
Expand All @@ -188,18 +183,26 @@ jobs:
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
docker-cache: ${{ needs.build-info.outputs.docker-cache }}

generate-constraints:
name: "Generate constraints"
needs: [build-info, build-ci-images]
uses: ./.github/workflows/generate-constraints.yml
with:
python-versions-list-as-string: ${{ needs.build-info.outputs.python-versions-list-as-string }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}

build-prod-images:
name: Build PROD images
permissions:
contents: read
packages: write
secrets: inherit
needs: [build-info, build-ci-images]
needs: [build-info, generate-constraints]
uses: ./.github/workflows/prod-image-build.yml
# Only run this it if the PR comes from fork, otherwise build will be done "in-PR-workflow"
if: |
needs.build-info.outputs.prod-image-build == 'true' &&
github.event.pull_request.head.repo.full_name != 'apache/airflow'
if: needs.build-info.outputs.prod-image-build == 'true'
with:
runs-on: '["ubuntu-22.04"]'
build-type: "Regular"
Expand All @@ -211,7 +214,6 @@ jobs:
push-image: "true"
use-uv: "true"
image-tag: ${{ needs.build-info.outputs.image-tag }}
ci-image-tag: ${{ needs.build-info.outputs.image-tag }}
platform: "linux/amd64"
python-versions: ${{ needs.build-info.outputs.python-versions }}
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/ci-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ on: # yamllint disable-line rule:truthy
required: false
default: "true"
type: string
upload-constraints:
description: "Whether to upload constraints artifacts"
default: "false"
type: string
debian-version:
description: "Base Debian distribution to use for the build (bookworm/bullseye)"
type: string
Expand Down Expand Up @@ -216,17 +212,3 @@ ${{ inputs.do-build == 'true' && inputs.image-tag || '' }}"
- name: "Stop ARM instance"
run: ./scripts/ci/images/ci_stop_arm_instance.sh
if: always() && inputs.do-build == 'true' && inputs.platform == 'linux/arm64'
- name: "Source constraints: ${{ matrix.python-version }}"
shell: bash
run: >
breeze release-management generate-constraints --python "${{ matrix.python-version }}"
--airflow-constraints-mode constraints-source-providers --answer yes
if: inputs.do-build == 'true' && inputs.upload-constraints == 'true'
- name: "Upload constraint artifacts"
uses: actions/upload-artifact@v4
with:
name: source-constraints-${{ matrix.python-version }}
path: ./files/constraints-*/constraints-source-providers-*.txt
retention-days: 7
if-no-files-found: error
if: inputs.do-build == 'true' && inputs.upload-constraints == 'true'
51 changes: 22 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ jobs:
image-tag: ${{ needs.build-info.outputs.image-tag }}
platform: "linux/amd64"
python-versions: ${{ needs.build-info.outputs.python-versions }}
upload-constraints: "true"
branch: ${{ needs.build-info.outputs.default-branch }}
use-uv: "true"
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
Expand Down Expand Up @@ -254,43 +253,38 @@ jobs:
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}

static-checks-mypy-and-constraints-generation:
name: "Static checks, mypy and constraints generation"

generate-constraints:
name: "Generate constraints"
needs: [build-info, wait-for-ci-images]
uses: ./.github/workflows/static-checks-mypy-and-constraints-generation.yml
uses: ./.github/workflows/generate-constraints.yml
if: needs.build-info.outputs.ci-image-build == 'true'
with:
python-versions-list-as-string: ${{ needs.build-info.outputs.python-versions-list-as-string }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}

static-checks-mypy-docs:
name: "Static checks, mypy, docs"
needs: [build-info, wait-for-ci-images]
uses: ./.github/workflows/static-checks-mypy-docs.yml
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
python-versions-list-as-string: ${{ needs.build-info.outputs.python-versions-list-as-string }}
branch: ${{ needs.build-info.outputs.default-branch }}
canary-run: ${{ needs.build-info.outputs.canary-run }}
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
docs-list-as-string: ${{ needs.build-info.outputs.docs-list-as-string }}
latest-versions-only: ${{ needs.build-info.outputs.latest-versions-only }}
basic-checks-only: ${{ needs.build-info.outputs.basic-checks-only }}
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
skip-pre-commits: ${{ needs.build-info.outputs.skip-pre-commits }}
chicken-egg-providers: ${{ needs.build-info.outputs.chicken-egg-providers }}
ci-image-build: ${{ needs.build-info.outputs.ci-image-build }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}

docs:
name: "Docs"
uses: ./.github/workflows/docs.yml
needs: [build-info, wait-for-ci-images]
permissions:
contents: read
packages: read
secrets: inherit
if: >
needs.build-info.outputs.docs-build == 'true' &&
needs.build-info.outputs.latest-versions-only != 'true'
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
default-branch: ${{ needs.build-info.outputs.default-branch }}
docs-list-as-string: ${{ needs.build-info.outputs.docs-list-as-string }}
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
canary-run: ${{ needs.build-info.outputs.canary-run }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}

providers:
name: "Provider checks"
Expand Down Expand Up @@ -475,7 +469,7 @@ jobs:
name: >
${{ needs.build-info.outputs.in-workflow-build == 'true' && 'Build' || 'Skip building' }}
PROD images in-workflow
needs: [build-info, build-ci-images]
needs: [build-info, build-ci-images, generate-constraints]
uses: ./.github/workflows/prod-image-build.yml
permissions:
contents: read
Expand All @@ -491,7 +485,6 @@ jobs:
do-build: ${{ needs.build-info.outputs.in-workflow-build }}
upload-package-artifact: "true"
image-tag: ${{ needs.build-info.outputs.image-tag }}
ci-image-tag: ${{ needs.build-info.outputs.image-tag }}
platform: "linux/amd64"
python-versions: ${{ needs.build-info.outputs.python-versions }}
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
Expand Down Expand Up @@ -549,7 +542,7 @@ jobs:

additional-prod-image-tests:
name: "Additional PROD image tests"
needs: [build-info, wait-for-prod-images, static-checks-mypy-and-constraints-generation]
needs: [build-info, wait-for-prod-images, generate-constraints]
uses: ./.github/workflows/additional-prod-image-tests.yml
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
Expand Down Expand Up @@ -591,16 +584,16 @@ jobs:
secrets: inherit
needs:
- build-info
- docs
- generate-constraints
- wait-for-ci-images
- wait-for-prod-images
- static-checks-mypy-docs
- tests-sqlite
- tests-mysql
- tests-postgres
- tests-non-db
- tests-special
- tests-integration
- static-checks-mypy-and-constraints-generation
uses: ./.github/workflows/finalize-tests.yml
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
Expand Down
130 changes: 0 additions & 130 deletions .github/workflows/docs.yml

This file was deleted.

Loading