alekseyolg commented on code in PR #25422:
URL: https://github.com/apache/superset/pull/25422#discussion_r1341572149
##########
.github/workflows/docker_build_push.sh:
##########
@@ -43,29 +43,35 @@ cat<<EOF
- ${REPO_NAME}:${LATEST_TAG}
EOF
+CACHE_FROM="--cache-from=type=registry,ref=apache/superset:cache"
if [ -z "${DOCKERHUB_TOKEN}" ]; then
# Skip if secrets aren't populated -- they're only visible for actions
running in the repo (not on forks)
echo "Skipping Docker push"
# By default load it back
DOCKER_ARGS="--load"
- ARCHITECTURE_FOR_BUILD="linux/amd64 linux/arm64"
else
# Login and push
docker logout
docker login --username "${DOCKERHUB_USER}" --password "${DOCKERHUB_TOKEN}"
DOCKER_ARGS="--push"
- ARCHITECTURE_FOR_BUILD="linux/amd64,linux/arm64"
+ CACHE_TO="--cache-to type=registry,mode=max,ref=apache/superset:cache"
Review Comment:
The new cache will only be uploaded to Dockerhub after the doc is added to
the master branch. Tests for pull requests will be collected much faster due to
the presence of a cache, since only what has changed will need to be collected.
Thus, this will significantly increase the speed of building the image and will
allow you to use the ARM64 architecture for supersets in the future, as I tried
and the current image based on the ARM64 architecture takes more than an hour
to build due to the fact that many libraries need to be compiled, unlike AMD64.
Or we switch to using the arm64 architecture and wait for all tests to complete
for approximately 1.25 hours, which in my opinion is too long.
Actually, because of this, I came up with the idea of giving the superset
to use the cache for assembly.
##########
.github/workflows/docker_build_push.sh:
##########
@@ -43,29 +43,35 @@ cat<<EOF
- ${REPO_NAME}:${LATEST_TAG}
EOF
+CACHE_FROM="--cache-from=type=registry,ref=apache/superset:cache"
if [ -z "${DOCKERHUB_TOKEN}" ]; then
# Skip if secrets aren't populated -- they're only visible for actions
running in the repo (not on forks)
echo "Skipping Docker push"
# By default load it back
DOCKER_ARGS="--load"
- ARCHITECTURE_FOR_BUILD="linux/amd64 linux/arm64"
else
# Login and push
docker logout
docker login --username "${DOCKERHUB_USER}" --password "${DOCKERHUB_TOKEN}"
DOCKER_ARGS="--push"
- ARCHITECTURE_FOR_BUILD="linux/amd64,linux/arm64"
+ CACHE_TO="--cache-to type=registry,mode=max,ref=apache/superset:cache"
Review Comment:
The new cache will only be uploaded to Dockerhub after the doc is added to
the master branch. Tests for pull requests will be collected much faster due to
the presence of a cache, since only what has changed will need to be collected.
Thus, this will significantly increase the speed of building the image and will
allow you to use the ARM64 architecture for supersets in the future, as I tried
and the current image based on the ARM64 architecture takes more than an hour
to build due to the fact that many libraries need to be compiled, unlike AMD64.
Or we switch to using the arm64 architecture and wait for all tests to complete
for approximately 1.25 hours, which in my opinion is too long.
Actually, because of this, I came up with the idea of giving the superset
to use the cache for assembly.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]