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 2021/08/10 20:36:32 UTC

[airflow] 21/22: Install providers from sources in prod image only on main (#17458)

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

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

commit 0948366ba47bc9bb529fb1c5c33f1a451426a923
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sat Aug 7 22:47:48 2021 +0200

    Install providers from sources in prod image only on main (#17458)
    
    When we build production image during test in main, we install
    providers from current sources, to make sure that all the tests
    including Helm Chart/Kubernetes tests are using latest sources for
    providers.
    
    However, when we build the prod image during v* branches, we
    want to build the production image using latest released providers
    instead, because this will be the way it will be built shortly when
    we release it. We do not run providers test not helm chart tests in
    this branch so it is more important to build the image in the way it
    will be built for releases - we run verification then and install
    dependencies in the very same way it will be done during release.
    
    (cherry picked from commit 5790f72c663596711a344e4c0e5f1036159d7190)
---
 .github/workflows/build-images.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml
index c2a9054..729d13f 100644
--- a/.github/workflows/build-images.yml
+++ b/.github/workflows/build-images.yml
@@ -74,6 +74,7 @@ jobs:
       image-build: ${{ steps.dynamic-outputs.outputs.image-build }}
       cacheDirective: ${{ steps.dynamic-outputs.outputs.cacheDirective }}
       targetBranch: ${{ steps.dynamic-outputs.outputs.targetBranch }}
+      defaultBranch: ${{ steps.selective-checks.outputs.default-branch }}
     steps:
       # Retrieve it to be able to determine which files has changed in the incoming commit of the PR
       # we checkout the target commit and it's parent to be able to compare them
@@ -231,6 +232,8 @@ jobs:
       CHECK_IF_BASE_PYTHON_IMAGE_UPDATED: >
         ${{ github.event_name == 'pull_request_target' && 'false' || 'true' }}
       VERSION_SUFFIX_FOR_PYPI: ".dev0"
+      INSTALL_PROVIDERS_FROM_SOURCES: >
+        ${{ needs.build-info.outputs.defaultBranch == 'main' && 'true' || 'false' }}
     steps:
       - name: Set envs
         # Set pull image tag for CI image build, in order to pull the image pushed