potiuk opened a new pull request #14347:
URL: https://github.com/apache/airflow/pull/14347


   After GHCR change, github image caching for python images was
   broken. GHCR requires each image that we push to it to be
   tagged with "org.opencontainers.image.source" label to point
   to the right project repository. Otherwise it will not appear
   in the repository images and we will not be able to manage
   permissions of the image.
   
   So we'v been extending the python base image with appropriate
   label, but it was not in all places necessary. As the result.
   the builds in CI were usign different images than the cache
   image in DockerHub, which in turn caused full image rebuilds
   ALWAYS. By implementing this change we make sure tha the the
   "airflow-tainted" python images - including the label.
   
   All images (when using breeze) are now built using such
   airflow-tainted image which in turn should give5 up to 5-8
   minutes saving on building the images job per each job (CI
   and production)
   
   The change implements the following behaviours:
   
   1) When image is built on CI or locally without
      UPGRADE_TO_NEWER_DEPENDENCIES flag and without
      FORCE_PULL_IMAGES flag -t the latest image from the
      GitHub Registry or DockerHub registry is used.
   
   2) When both FORCE_PULL_IMAGES and UPGRADE_TO_NEWER_DEPENDENCY
      are set to something different than "false" - the latest Python
      images are used - they are pulled first and tagged appropriately.
   
   This way - always when UPGRADE_TO_NEWER_DEPENDENCIES are set (also
   when master pushes are done) - such builds will use latest version
   of python base images published on DockerHub.
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to