You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/28 13:13:33 UTC

[GitHub] [airflow] potiuk opened a new pull request #22568: Fix caching strategy for image builds

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


   Change caching strategy for image builds. We used "registry" but we
   switch to "inline" which is better because we do not need to
   have separate "cache" tag for the image, caching metadata
   is stored in the image manifests, which means that for the build
   we can use the cache in the image itself when we build image locally.
   
   This also fixes '--link' layers the images if cache is not available.
   
   Previously we changed the ownership of the scripts and .local folder
   to be airflow user but this was not really needed and even harmful as
   those scripts could be modified by `airflow` user (even by mistake).
   
   This caused problems when the scripts were used from the cache,
   because when --link is used to copy the layers the user might
   not be created yet. It turns out that you shoud never have
   --link and --chown for the user that is created in previous steps.
   
   The scripts are now owned by root users and the ".local" layer
   that should be owned by the airflow user is now copied without
   --link flag.
   
   <!--
   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/main/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/main/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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #22568: Fix caching for image builds

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #22568:
URL: https://github.com/apache/airflow/pull/22568#issuecomment-1081838628


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #22568: Fix caching for image builds

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #22568:
URL: https://github.com/apache/airflow/pull/22568#issuecomment-1081844713


   Random integration error. Merging and rebuilding cache now.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #22568: Fix caching for image builds

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #22568:
URL: https://github.com/apache/airflow/pull/22568


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #22568: Fix caching strategy for image builds

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #22568:
URL: https://github.com/apache/airflow/pull/22568#issuecomment-1080635686


   @mik-laj - it turned out that `--link` can't be joined with `--chown` because when the layers copied directly from cache can then be copied even before the `airflow` user has been  created :) 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #22568: Fix caching for image builds

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #22568:
URL: https://github.com/apache/airflow/pull/22568#issuecomment-1081826345


   > @mik-laj - Actually, it tunred out that `--link` breaks caching completely and I can't get it working with `--link`. I removed the `--link` ones.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org