You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2022/08/04 23:57:37 UTC

[spark] branch master updated: [SPARK-39974][INFRA] Create separate static image tag for infra cache

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

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new e9e8dcb25fe [SPARK-39974][INFRA] Create separate static image tag for infra cache
e9e8dcb25fe is described below

commit e9e8dcb25fe1f5c0d925852c8af5e06ce0935684
Author: Yikun Jiang <yi...@gmail.com>
AuthorDate: Fri Aug 5 08:57:12 2022 +0900

    [SPARK-39974][INFRA] Create separate static image tag for infra cache
    
    ### What changes were proposed in this pull request?
    Create separate static image tag for infra static image
    
    ### Why are the changes needed?
    Currently, we put the **static image** and **cache** together in same tag like [`ghcr.io/apache/spark/apache-spark-github-action-image-cache:master`](https://github.com/apache/spark/pkgs/container/spark%2Fapache-spark-github-action-image-cache/versions).
    
    Cache and static image occupy separate different image hash and same image tags. this bring some problem in below cases:
    - **Debug job with static docker images**, they have to find hash. If use cache directly, will raise something like:
    ```
    yikun-x86:~# docker run -ti ghcr.io/yikun/apache-spark-github-action-image-cache:master
    Unable to find image 'ghcr.io/yikun/apache-spark-github-action-image-cache:master' locally
    master: Pulling from yikun/apache-spark-github-action-image-cache
    docker: no matching manifest for linux/amd64 in the manifest list entries.
    ```
    
    - **Use static image in CI**, such as for some reason we want to switch static image temporarily.
    - **Easy to see history for last cache**, such as system deps/lib.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    - Local test: https://github.com/Yikun/spark/pull/144, and static image tag push [passed](https://github.com/Yikun/spark/runs/7664266955?check_suite_focus=true#step:6:212)
    - Run static image:
    ```
    rootyikun-x86:~# docker run -ti ghcr.io/yikun/apache-spark-github-action-image-cache:master-static
    Unable to find image 'ghcr.io/yikun/apache-spark-github-action-image-cache:master-static' locally
    master-static: Pulling from yikun/apache-spark-github-action-image-cache
    Digest: sha256:5198fd8111c925b7c92d04427268bcb0e5574bb72cef09808076595f3372bf7b
    Status: Downloaded newer image for ghcr.io/yikun/apache-spark-github-action-image-cache:master-static
    root3550e09e0e93:/# exit
    ```
    
    Closes #37402 from Yikun/patch-32.
    
    Authored-by: Yikun Jiang <yi...@gmail.com>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 .github/workflows/build_infra_images_cache.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build_infra_images_cache.yml b/.github/workflows/build_infra_images_cache.yml
index c35b34e201e..bd5685f69b0 100644
--- a/.github/workflows/build_infra_images_cache.yml
+++ b/.github/workflows/build_infra_images_cache.yml
@@ -49,7 +49,7 @@ jobs:
         with:
           context: ./dev/infra/
           push: true
-          tags: ghcr.io/apache/spark/apache-spark-github-action-image-cache:${{ github.ref_name }}
+          tags: ghcr.io/apache/spark/apache-spark-github-action-image-cache:${{ github.ref_name }}-static
           cache-from: type=registry,ref=ghcr.io/apache/spark/apache-spark-github-action-image-cache:${{ github.ref_name }}
           cache-to: type=registry,ref=ghcr.io/apache/spark/apache-spark-github-action-image-cache:${{ github.ref_name }},mode=max
       - name: Image digest


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org