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/10/17 11:45:12 UTC

[airflow] branch move-early-constrints-generation-to-separate-steps updated (ed8282fad2 -> c158122ad6)

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

potiuk pushed a change to branch move-early-constrints-generation-to-separate-steps
in repository https://gitbox.apache.org/repos/asf/airflow.git


    omit ed8282fad2 Move constraints generation to separate job in CI workflow
     new c158122ad6 Move constraints generation to separate job in CI workflow

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   (ed8282fad2)
            \
             N -- N -- N   refs/heads/move-early-constrints-generation-to-separate-steps (c158122ad6)

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:
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[airflow] 01/01: Move constraints generation to separate job in CI workflow

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

potiuk pushed a commit to branch move-early-constrints-generation-to-separate-steps
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit c158122ad60e631c6d642b789cb87fa3b204b979
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon Oct 16 16:49:08 2023 +0200

    Move constraints generation to separate job in CI workflow
    
    We generate constraints for preview right after images are build, in
    order to be able to see the output and to diagnose which dependencies
    have been updated later in the process.
    
    So far we were doing it in CI workflow and When constraints generation
    failed however (for example because pip backtracking takes a log ot
    time), it faied build image workflow and did not allow tests to
    complete.
    
    This PR extracts constraint generation to CI separate job which
    does not block tests from running in case constraints generation
    fails or times out.
    
    It also moves out the steps from the composite action which allows
    to better see which step failed and allows to see the constraints
    used in each job more easily.
---
 .github/actions/build-ci-images/action.yml | 24 -------------
 .github/workflows/ci.yml                   | 54 ++++++++++++++++++++++++++++++
 setup.py                                   |  2 +-
 3 files changed, 55 insertions(+), 25 deletions(-)

diff --git a/.github/actions/build-ci-images/action.yml b/.github/actions/build-ci-images/action.yml
index 81825f9a79..e93b2f4e71 100644
--- a/.github/actions/build-ci-images/action.yml
+++ b/.github/actions/build-ci-images/action.yml
@@ -34,30 +34,6 @@ 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: "Generate source constraints"
-      shell: bash
-      run: >
-        breeze release-management generate-constraints --run-in-parallel
-        --airflow-constraints-mode constraints-source-providers
-#    - name: "Generate PyPI constraints"
-#      shell: bash
-#      run: >
-#        breeze release-management generate-constraints --run-in-parallel
-#        --airflow-constraints-mode constraints
-#      if: ${{ inputs.build-provider-packages != 'true' }}
-    - name: "Print dependency upgrade summary"
-      shell: bash
-      run: |
-        for PYTHON_VERSION in ${{ env.PYTHON_VERSIONS }}; do
-          echo "Summarizing Python $PYTHON_VERSION"
-          cat "files/constraints-${PYTHON_VERSION}/*.md" >> $GITHUB_STEP_SUMMARY || true
-        done
-    - name: "Upload constraint artifacts"
-      uses: actions/upload-artifact@v3
-      with:
-        name: constraints
-        path: ./files/constraints-*/constraints-*.txt
-        retention-days: 7
     - name: "Fix ownership"
       shell: bash
       run: breeze ci fix-ownership
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ca44ad3199..823a7cee42 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -326,6 +326,60 @@ jobs:
           DEBUG_RESOURCES: ${{needs.build-info.outputs.debug-resources}}
           BUILD_TIMEOUT_MINUTES: 70
 
+  preview-constraints:
+    permissions:
+      contents: read
+    timeout-minutes: 20
+    continue-on-error: true
+    name: >
+      Preview constraints
+      ${{needs.build-info.outputs.all-python-versions-list-as-string}}
+    runs-on: "${{needs.build-info.outputs.runs-on}}"
+    needs: [build-info, build-ci-images]
+    if: needs.build-info.outputs.upgrade-to-newer-dependencies != 'false'
+    env:
+      RUNS_ON: "${{ needs.build-info.outputs.runs-on }}"
+      PYTHON_VERSIONS: ${{needs.build-info.outputs.all-python-versions-list-as-string}}
+    steps:
+      - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+        uses: actions/checkout@v3
+        with:
+          persist-credentials: false
+      - name: >
+          Prepare breeze & CI image: ${{needs.build-info.outputs.default-python-version}}:${{env.IMAGE_TAG}}
+        uses: ./.github/actions/prepare_breeze_and_image
+      - name: "Source constraints"
+        shell: bash
+        run: >
+          breeze release-management generate-constraints --run-in-parallel
+          --airflow-constraints-mode constraints-source-providers || true
+        env:
+          DEBUG_RESOURCES: ${{needs.build-info.outputs.debug-resources}}
+      - name: "PyPI constraints"
+        shell: bash
+        timeout-minutes: 10
+        run: >
+          breeze release-management generate-constraints --run-in-parallel
+          --airflow-constraints-mode constraints || true
+        env:
+          DEBUG_RESOURCES: ${{needs.build-info.outputs.debug-resources}}
+      - name: "Dependency upgrade summary"
+        shell: bash
+        run: |
+          for PYTHON_VERSION in ${{ env.PYTHON_VERSIONS }}; do
+            echo "Summarizing Python $PYTHON_VERSION"
+            cat "files/constraints-${PYTHON_VERSION}/*.md" >> $GITHUB_STEP_SUMMARY || true
+          done
+      - name: "Upload constraint artifacts"
+        uses: actions/upload-artifact@v3
+        with:
+          name: constraints
+          path: ./files/constraints-*/constraints-*.txt
+          retention-days: 7
+      - name: "Fix ownership"
+        run: breeze ci fix-ownership
+        if: always()
+
   build-prod-images:
     timeout-minutes: 80
     name: >
diff --git a/setup.py b/setup.py
index d3aee366f9..cd1a56626d 100644
--- a/setup.py
+++ b/setup.py
@@ -1042,4 +1042,4 @@ def do_setup() -> None:
 
 
 if __name__ == "__main__":
-    do_setup()  # comment
+    do_setup()  # comment to trigger upgrade to newer dependencies