sadpandajoe commented on code in PR #45755:
URL: https://github.com/apache/superset/pull/45755#discussion_r4412011181
##########
scripts/docker-build-extra-flags.sh:
##########
@@ -77,7 +84,22 @@ case "$BUILD_PRESET" in
;;
esac
+case "$PLATFORM" in
+ ""|linux/amd64) ;;
+ linux/arm64) CACHE_REF="${CACHE_REF}-arm64" ;;
+ *)
+ echo "Unsupported platform for the docker cache ref: $PLATFORM" >&2
+ exit 1
+ ;;
+esac
+
EXTRA_FLAGS="--cache-from=type=registry,ref=$CACHE_REF $EXTRA_FLAGS"
+# The release build compiles linux/arm64 and linux/amd64 in one job without a
+# platform, but the unsuffixed ref is now written only by the native amd64
+# publish; read the arm64 ref too so the arm64 half is not a cold build.
+if [ "$BUILD_MODE" = "release" ] && [ -z "$PLATFORM" ]; then
+ EXTRA_FLAGS="--cache-from=type=registry,ref=${CACHE_REF}-arm64 $EXTRA_FLAGS"
Review Comment:
This `release` + no-platform branch is the only thing keeping the arm64 half
of a release build from starting cold, but nothing in `docker-command-check`
exercises it: `assert_platform_cache_refs` only runs in `ci` mode and
`assert_release_tag` checks tags, Python version and Chromium. If this branch
is dropped or its mode test drifts, every check stays green and release builds
quietly lose the arm64 cache input. Could `assert_release_tag` also assert that
the `release` flags contain both the unsuffixed and `-arm64` `--cache-from`
refs (and that a `linux/amd64` platform argument does not add the `-arm64` one)?
--
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]