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/11/02 23:06:13 UTC

(airflow) branch main updated: Fix `pip` version in the main PROD image of Airflow (#35387)

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

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new db012ac5de Fix `pip` version in the main PROD image of Airflow (#35387)
db012ac5de is described below

commit db012ac5de1d65e40ca75b80c9e15e1c5ac4b224
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Fri Nov 3 00:06:06 2023 +0100

    Fix `pip` version in the main PROD image of Airflow (#35387)
    
    We are fixing ``pip`` version during the CI building process to
    install Airflow - in both CI and PROD image, and it is used to
    run Airflow. However in PROD image we are copying the `.local`
    folder with installed airflow and this folder does not contain
    `pip` as `pip` is installed in the main environment. As result
    the verison of `pip` in the final image was different than the
    one fixed by the build process.
    
    This did not have too bad consequences as `pip` generally works
    even with older versions and the base images have rather recent
    version of `pip` preinstalled, however for consistency we should
    upgrade `pip` to latest version after copying the .local folder.
---
 Dockerfile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Dockerfile b/Dockerfile
index ff50615d43..5297a4f6b6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1533,6 +1533,9 @@ RUN sed --in-place=.bak "s/secure_path=\"/secure_path=\"\/.venv\/bin:/" /etc/sud
 
 ARG AIRFLOW_VERSION
 
+COPY --from=scripts install_pip_version.sh /scripts/docker/
+RUN bash /scripts/docker/install_pip_version.sh
+
 # See https://airflow.apache.org/docs/docker-stack/entrypoint.html#signal-propagation
 # to learn more about the way how signals are handled by the image
 # Also set airflow as nice PROMPT message.