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 2024/09/02 18:00:54 UTC

(airflow) branch use-emulation-for-releasing-images updated (53a0f17d4b -> 94301dc7b4)

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

potiuk pushed a change to branch use-emulation-for-releasing-images
in repository https://gitbox.apache.org/repos/asf/airflow.git


    omit 53a0f17d4b Switch to using emulation for image building
     new 94301dc7b4 Switch to using emulation for image building

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   (53a0f17d4b)
            \
             N -- N -- N   refs/heads/use-emulation-for-releasing-images (94301dc7b4)

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:
 .github/workflows/release_dockerhub_image.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


(airflow) 01/01: Switch to using emulation for image building

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

potiuk pushed a commit to branch use-emulation-for-releasing-images
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 94301dc7b4376e8e6d54ea1b35e9a0b51f6e461b
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon Sep 2 19:22:36 2024 +0200

    Switch to using emulation for image building
    
    Until we can use ARM hardware to build images with the new ARC
    architecture https://github.com/apache/airflow/issues/41935
    we switch image building to emulated builds. They are 10x slower
    but it's better than nothing.
---
 .github/workflows/release_dockerhub_image.yml | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/release_dockerhub_image.yml b/.github/workflows/release_dockerhub_image.yml
index d45aa2c4be..c06a6cf91a 100644
--- a/.github/workflows/release_dockerhub_image.yml
+++ b/.github/workflows/release_dockerhub_image.yml
@@ -102,15 +102,29 @@ jobs:
         run: breeze ci free-space --answer yes
       - name: "Cleanup dist and context file"
         run: rm -fv ./dist/* ./docker-context-files/*
-      - name: "Start ARM instance"
-        run: ./scripts/ci/images/ci_start_arm_instance_and_connect_to_docker.sh
-        if: github.repository == 'apache/airflow'
       - name: "Login to hub.docker.com"
         run: >
           echo ${{ secrets.DOCKERHUB_TOKEN }} |
           docker login --password-stdin --username ${{ secrets.DOCKERHUB_USER }}
       - name: Login to ghcr.io
         run: echo "${{ env.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
+      - name: "Install emulation support and buildx plugin"
+        # yamllint disable rule:line-length
+        run: |
+          sudo apt-get update
+          sudo apt-get install ca-certificates curl
+          sudo install -m 0755 -d /etc/apt/keyrings
+          sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
+          sudo chmod a+r /etc/apt/keyrings/docker.asc
+
+          # Add the repository to Apt sources:
+          echo \
+          "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
+          $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
+          sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+          sudo apt-get update
+          sudo apt install docker-buildx-plugin
+          docker run --privileged --rm tonistiigi/binfmt --install all
       - name: "Prepare chicken-eggs provider packages"
         # In case of provider packages which use latest dev0 version of providers, we should prepare them
         # from the source code, not from the PyPI because they have apache-airflow>=X.Y.Z dependency
@@ -148,9 +162,6 @@ jobs:
           --limit-python ${{ matrix.python-version }} --slim-images
         env:
           COMMIT_SHA: ${{ github.sha }}
-      - name: "Stop ARM instance"
-        run: ./scripts/ci/images/ci_stop_arm_instance.sh
-        if: always() && github.repository == 'apache/airflow'
       - name: >
           Verify regular AMD64 image: ${{ github.event.inputs.airflowVersion }}, ${{ matrix.python-version }}
         run: >