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

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6e419001d3 Use constraints from current CI image to install providers 
for tests (#36143)
6e419001d3 is described below

commit 6e419001d3dd512cb01bc42bdfa8738c289e2754
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sat Dec 9 20:12:34 2023 +0100

    Use constraints from current CI image to install providers for tests 
(#36143)
    
    We were using constraints from GitHub repository "constraints-main"
    branch when installing and testing providers in main. Hewever,
    when we are testing provider in their "main" form, we should use
    the constraints that were used in the current build. In case we are
    upgrading the constraints, constraints from main are different than
    the one CI image build - and we should use those.
    
    Instead of getting the constraints from main, we are using the
    CI image to generate the constraints to "/files/constraints*" and
    when installing providers we point to those constraints instead
    of using the "main" constraints.
---
 .github/workflows/ci.yml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a679f24b17..bf86efe5b3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -762,6 +762,11 @@ jobs:
         run: >
           breeze release-management generate-issue-content-providers
           --only-available-in-dist --disable-progress
+      - name: "Generate source constraints from CI image"
+        shell: bash
+        run: >
+          breeze release-management generate-constraints
+          --airflow-constraints-mode constraints-source-providers
       - name: "Install and verify all provider packages and airflow via wheel 
files"
         run: >
           breeze release-management verify-provider-packages
@@ -769,7 +774,8 @@ jobs:
           --package-format wheel
           --use-airflow-version wheel
           --airflow-constraints-reference default
-          --providers-constraints-reference constraints-main
+          --providers-constraints-location
+          
/files/constraints-${{env.PYTHON_MAJOR_MINOR_VERSION}}/constraints-source-providers-${{env.PYTHON_MAJOR_MINOR_VERSION}}.txt
         if: needs.build-info.outputs.affected-providers-list-as-string == ''
         env:
           AIRFLOW_SKIP_CONSTRAINTS: "${{ 
needs.build-info.outputs.upgrade-to-newer-dependencies }}"
@@ -780,7 +786,8 @@ jobs:
           --package-format wheel
           --use-airflow-version wheel
           --airflow-constraints-reference default
-          --providers-constraints-reference constraints-main
+          --providers-constraints-location
+          
/files/constraints-${{env.PYTHON_MAJOR_MINOR_VERSION}}/constraints-source-providers-${{env.PYTHON_MAJOR_MINOR_VERSION}}.txt
         if: needs.build-info.outputs.affected-providers-list-as-string != ''
         env:
           AIRFLOW_SKIP_CONSTRAINTS: "${{ 
needs.build-info.outputs.upgrade-to-newer-dependencies }}"
@@ -2006,7 +2013,7 @@ jobs:
           ref: ${{ steps.constraints-branch.outputs.branch }}
           persist-credentials: true
           fetch-depth: 0
-      - name: "Download constraints from the constraints preview"
+      - name: "Download constraints from the constraints generated by build CI 
image"
         uses: actions/download-artifact@v3
         with:
           name: constraints

Reply via email to