You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/08/27 15:55:06 UTC

[airflow] branch v2-7-test updated (3b2fdaab29 -> b3bb92a461)

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

potiuk pushed a change to branch v2-7-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


 discard 3b2fdaab29 Use PyPI constraints for PROD image in non-main branch
     new b3bb92a461 Use PyPI constraints for PROD image in non-main branch (#33789)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3b2fdaab29)
            \
             N -- N -- N   refs/heads/v2-7-test (b3bb92a461)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[airflow] 01/01: Use PyPI constraints for PROD image in non-main branch (#33789)

Posted by po...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b3bb92a461b2d72d859b49c84468ed6f8c230340
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Aug 27 17:12:20 2023 +0200

    Use PyPI constraints for PROD image in non-main branch (#33789)
    
    When we are building PROD image in CI for non main branch, we are
    installing providers from PyPI rather than building them locally
    from sources. Therefore we should use `PyPI` constraints for
    such builds not the "source" constraints (they might differ).
    
    This PR adds two steps:
    
    * In the CI build, when we do not build providers we generate
      PyPI constraints additionally to source constraints
    * In the PROD build we use the PyPI constraints in case we
      do not build providers locally
    
    (cherry picked from commit f9276f0597d5ad91c98d0db36d16d799ee2d4f21)
---
 .github/actions/build-ci-images/action.yml   |  8 +++++++-
 .github/actions/build-prod-images/action.yml | 12 +++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/.github/actions/build-ci-images/action.yml b/.github/actions/build-ci-images/action.yml
index d43a425284..415819008c 100644
--- a/.github/actions/build-ci-images/action.yml
+++ b/.github/actions/build-ci-images/action.yml
@@ -34,12 +34,18 @@ runs:
     - name: "Build & Push AMD64 CI images ${{ env.IMAGE_TAG }} ${{ env.PYTHON_VERSIONS }}"
       shell: bash
       run: breeze ci-image build --push --tag-as-latest --run-in-parallel --upgrade-on-failure
-    - name: "Show dependencies to be upgraded"
+    - name: "Generate source constraints"
       shell: bash
       run: >
         breeze release-management generate-constraints --run-in-parallel
         --airflow-constraints-mode constraints-source-providers
       if: env.UPGRADE_TO_NEWER_DEPENDENCIES != 'false'
+    - name: "Generate PyPI constraints"
+      shell: bash
+      run: >
+        breeze release-management generate-constraints --run-in-parallel
+        --airflow-constraints-mode constraints
+      if: env.UPGRADE_TO_NEWER_DEPENDENCIES != 'false' and ${{ inputs.build-provider-packages != 'true' }}
     - name: "Print dependency upgrade summary"
       shell: bash
       run: |
diff --git a/.github/actions/build-prod-images/action.yml b/.github/actions/build-prod-images/action.yml
index feac8c2ef2..1223b5a7f1 100644
--- a/.github/actions/build-prod-images/action.yml
+++ b/.github/actions/build-prod-images/action.yml
@@ -62,7 +62,7 @@ runs:
         name: constraints
         path: ./docker-context-files
       if: env.UPGRADE_TO_NEWER_DEPENDENCIES != 'false'
-    - name: "Build & Push PROD images ${{ env.IMAGE_TAG }}:${{ env.PYTHON_VERSIONS }}"
+    - name: "Build & Push PROD images with source providers ${{ env.IMAGE_TAG }}:${{ env.PYTHON_VERSIONS }}"
       shell: bash
       run: >
         breeze prod-image build --tag-as-latest --run-in-parallel --push
@@ -70,6 +70,16 @@ runs:
         --use-constraints-for-context-packages
       env:
         COMMIT_SHA: ${{ github.sha }}
+      if: ${{ inputs.build-provider-packages == 'true' }}
+    - name: "Build & Push PROD images with PyPi providers ${{ env.IMAGE_TAG }}:${{ env.PYTHON_VERSIONS }}"
+      shell: bash
+      run: >
+        breeze prod-image build --tag-as-latest --run-in-parallel --push
+        --install-packages-from-context --airflow-constraints-mode constraints
+        --use-constraints-for-context-packages
+      env:
+        COMMIT_SHA: ${{ github.sha }}
+      if: ${{ inputs.build-provider-packages != 'true' }}
     - name: "Fix ownership"
       shell: bash
       run: breeze ci fix-ownership