Copilot commented on code in PR #42509:
URL: https://github.com/apache/superset/pull/42509#discussion_r3667914548
##########
.github/workflows/docker.yml:
##########
@@ -130,13 +130,25 @@ jobs:
# repeated --build-arg key, so appending PY_VER here overrides
# supersetbot's pin and keeps the build on the Dockerfile's own
# supported Python version.
+ #
+ # The "py311"/"py312" presets exist specifically to pin a
+ # *different* PY_VER than "dev"/"lean" (that's the whole point of
+ # those two presets), so they're excluded from this override.
+ # Without this exclusion, the PY_VER above clobbers theirs too
+ # (same last-value-wins rule), making "py311"/"py312" silently
+ # build the exact same image as "lean".
+ EXTRA_FLAGS="--build-arg INCLUDE_CHROMIUM=false --tag $IMAGE_TAG"
+ if [ "$BUILD_PRESET" != "py311" ] && [ "$BUILD_PRESET" != "py312" ];
then
+ EXTRA_FLAGS="--build-arg PY_VER=3.11.14-slim-trixie $EXTRA_FLAGS"
+ fi
Review Comment:
This exclusion list is easy to forget to update when new Python-pin presets
get added (e.g., `py313`), which could reintroduce the same silent-clobbering
problem. Consider flipping the logic to an allowlist of presets that should
receive the override (e.g., `dev|lean`) via a `case` statement or a small
helper condition, so new `py*` presets default to *not* being overridden unless
explicitly intended.
--
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]