This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch fix-bullseye-prod-build in repository https://gitbox.apache.org/repos/asf/airflow.git
commit c3ec192eee2b3fa6825e6a6d85ebb8ae191a1f49 Author: Jarek Potiuk <[email protected]> AuthorDate: Mon Nov 6 20:52:43 2023 +0100 Fix Bullseye PROD build step The Bullseye PRD build step in `main` is failing after switching to bookworm - for two reasons: 1) The CI image used to build packages is pulled using bullseye TAG 2) The bullseye tag is wrong - containing `"` This PR fixes that by: * separating out CI image pull for the build from composite action to build production image * fixing the tag * updates names of job and steps to show clearly Bullseye --- .github/actions/build-prod-images/action.yml | 7 ------- .github/workflows/build-images.yml | 9 +++++++++ .github/workflows/ci.yml | 24 +++++++++++++++++++++--- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/actions/build-prod-images/action.yml b/.github/actions/build-prod-images/action.yml index c42c170f6c..74667f0de1 100644 --- a/.github/actions/build-prod-images/action.yml +++ b/.github/actions/build-prod-images/action.yml @@ -25,19 +25,12 @@ inputs: runs: using: "composite" steps: - - name: "Install Breeze" - uses: ./.github/actions/breeze - name: "Regenerate dependencies in case they was modified manually so that we can build an image" shell: bash run: | pip install rich>=12.4.4 pyyaml python scripts/ci/pre_commit/pre_commit_update_providers_dependencies.py if: env.UPGRADE_TO_NEWER_DEPENDENCIES != 'false' - - name: "Pull CI image for PROD build: ${{ env.PYTHON_VERSIONS }}:${{ env.IMAGE_TAG }}" - shell: bash - run: breeze ci-image pull --tag-as-latest - env: - PYTHON_MAJOR_MINOR_VERSION: "3.8" - name: "Cleanup dist and context file" shell: bash run: rm -fv ./dist/* ./docker-context-files/* diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 749aa58312..952ece5fe8 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -299,6 +299,15 @@ jobs: mv -v "target-airflow/dev" "." rm -rfv ".github/actions" mv -v "target-airflow/.github/actions" ".github" + - name: "Install Breeze" + uses: ./.github/actions/breeze + - name: > + Pull CI image for PROD build: + ${{ steps.selective-checks.outputs.default-python-version }}:${{ env.IMAGE_TAG }}" + shell: bash + run: breeze ci-image pull --tag-as-latest + env: + PYTHON_MAJOR_MINOR_VERSION: ${{ steps.selective-checks.outputs.default-python-version }} - name: > Build PROD Images ${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37af50d25d..206762d953 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -415,6 +415,15 @@ jobs: ref: ${{ needs.build-info.outputs.targetCommitSha }} persist-credentials: false if: needs.build-info.outputs.in-workflow-build == 'true' + - name: "Install Breeze" + uses: ./.github/actions/breeze + - name: > + Pull CI image for PROD build: + ${{ steps.selective-checks.outputs.default-python-version }}:${{ env.IMAGE_TAG }}" + shell: bash + run: breeze ci-image pull --tag-as-latest + env: + PYTHON_MAJOR_MINOR_VERSION: ${{ steps.selective-checks.outputs.default-python-version }} - name: > Build PROD Images ${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}} @@ -431,7 +440,7 @@ jobs: build-prod-images-bullseye: timeout-minutes: 80 name: > - ${{needs.build-info.outputs.build-job-description}} PROD images + ${{needs.build-info.outputs.build-job-description}} Bullseye PROD images ${{needs.build-info.outputs.all-python-versions-list-as-string}} runs-on: ${{fromJSON(needs.build-info.outputs.runs-on)}} needs: [build-info, build-ci-images, generate-constraints] @@ -454,8 +463,17 @@ jobs: ref: ${{ needs.build-info.outputs.targetCommitSha }} persist-credentials: false submodules: recursive + - name: "Install Breeze" + uses: ./.github/actions/breeze + - name: > + Pull CI image for PROD build: + ${{ steps.selective-checks.outputs.default-python-version }}:${{ env.IMAGE_TAG }}" + shell: bash + run: breeze ci-image pull --tag-as-latest + env: + PYTHON_MAJOR_MINOR_VERSION: ${{ steps.selective-checks.outputs.default-python-version }} - name: > - Build PROD Images Bullseye + Build Bullseye PROD Images ${{needs.build-info.outputs.all-python-versions-list-as-string}}:${{env.IMAGE_TAG}} uses: ./.github/actions/build-prod-images with: @@ -468,7 +486,7 @@ jobs: DEBIAN_VERSION: "bullseye" # Do not override the "bookworm" image - just push a new bullseye image # TODO: improve caching for that build - IMAGE_TAG: bullseye-"${{ github.event.pull_request.head.sha || github.sha }}" + IMAGE_TAG: "bullseye-${{ github.event.pull_request.head.sha || github.sha }}" run-breeze-tests: timeout-minutes: 10
