This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push:
new bf0d412531 Make PROD image building works in non-main PRs (#41480)
(#41484)
bf0d412531 is described below
commit bf0d412531e099ecb918beb04287d30b72dc5682
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Aug 14 19:12:49 2024 +0200
Make PROD image building works in non-main PRs (#41480) (#41484)
The PROD image building fails currently in non-main because it
attempts to build source provider packages rather than use them from
PyPi when PR is run against "v-test" branch.
This PR fixes it:
* PROD images in non-main-targetted build will pull providers from
PyPI rather than build them
* they use PyPI constraints to install the providers
* they use UV - which should speed up building of the images
(cherry picked from commit 4d5f1c42a7873329b1b6b8b9b39db2c3033b46df)
---
.github/workflows/build-images.yml | 4 ++--
.github/workflows/ci.yml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build-images.yml
b/.github/workflows/build-images.yml
index bd10e73aac..1256fd2f0d 100644
--- a/.github/workflows/build-images.yml
+++ b/.github/workflows/build-images.yml
@@ -241,14 +241,14 @@ jobs:
pull-request-target: "true"
is-committer-build: ${{ needs.build-info.outputs.is-committer-build }}
push-image: "true"
- use-uv: ${{ needs.build-info.outputs.default-branch == 'main' && 'true'
|| 'false' }}
+ use-uv: "true"
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 }}
branch: ${{ needs.build-info.outputs.default-branch }}
constraints-branch: ${{ needs.build-info.outputs.constraints-branch }}
- build-provider-packages: "true"
+ build-provider-packages: ${{ needs.build-info.outputs.default-branch ==
'main' }}
upgrade-to-newer-dependencies: ${{
needs.build-info.outputs.upgrade-to-newer-dependencies }}
chicken-egg-providers: ${{
needs.build-info.outputs.chicken-egg-providers }}
docker-cache: ${{ needs.build-info.outputs.docker-cache }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a19879ea17..4e1db2a14e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -541,7 +541,7 @@ jobs:
default-python-version: ${{
needs.build-info.outputs.default-python-version }}
branch: ${{ needs.build-info.outputs.default-branch }}
push-image: "true"
- use-uv: ${{ needs.build-info.outputs.default-branch == 'main' && 'true'
|| 'false' }}
+ use-uv: "true"
build-provider-packages: ${{ needs.build-info.outputs.default-branch ==
'main' }}
upgrade-to-newer-dependencies: ${{
needs.build-info.outputs.upgrade-to-newer-dependencies }}
chicken-egg-providers: ${{
needs.build-info.outputs.chicken-egg-providers }}