This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v2-10-stable
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v2-10-stable by this push:
     new 535f27b137 Make PROD image building works in non-main PRs (#41480) 
(#41484) (#41623)
535f27b137 is described below

commit 535f27b1373a14839767f5abe767472ad9377b86
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Aug 20 21:22:27 2024 +0200

    Make PROD image building works in non-main PRs (#41480) (#41484) (#41623)
    
    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)
    (cherry picked from commit bf0d412531e099ecb918beb04287d30b72dc5682)
---
 .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 68aa51bf86..a1fa32e3ad 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 }}

Reply via email to