You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2025/09/24 22:11:36 UTC

(superset) branch fix-dockerfile-duckdb-arg-scope created (now b2129b4277)

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

elizabeth pushed a change to branch fix-dockerfile-duckdb-arg-scope
in repository https://gitbox.apache.org/repos/asf/superset.git


      at b2129b4277 fix: Move LOAD_EXAMPLES_DUCKDB ARG to global scope in Dockerfile

This branch includes the following new commits:

     new b2129b4277 fix: Move LOAD_EXAMPLES_DUCKDB ARG to global scope in Dockerfile

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(superset) 01/01: fix: Move LOAD_EXAMPLES_DUCKDB ARG to global scope in Dockerfile

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elizabeth pushed a commit to branch fix-dockerfile-duckdb-arg-scope
in repository https://gitbox.apache.org/repos/asf/superset.git

commit b2129b4277dc3a4ba30c3280412e75c038f330ee
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Wed Sep 24 15:10:30 2025 -0700

    fix: Move LOAD_EXAMPLES_DUCKDB ARG to global scope in Dockerfile
    
    This fixes an issue where the LOAD_EXAMPLES_DUCKDB build argument was
    being ignored during multi-stage Docker builds, causing showtime
    ephemeral environments to fail loading examples.
    
    Problem: The ARG was declared inside the python-common stage, making it
    unavailable when passed via --build-arg to the showtime target.
    
    Solution: Move the ARG declaration to global scope (before any FROM) and
    re-declare it in the python-common stage where it's used. This follows
    Docker's multi-stage build ARG scope rules.
    
    This fix ensures that when showtime builds with:
      docker buildx build --build-arg LOAD_EXAMPLES_DUCKDB=true --target showtime
    
    The DuckDB examples file will actually be downloaded during the build.
    
    🤖 Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <no...@anthropic.com>
---
 Dockerfile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 1b689c2319..8a3598a283 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -26,6 +26,9 @@ ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64}
 # Include translations in the final build
 ARG BUILD_TRANSLATIONS="false"
 
+# Build arg to pre-populate examples DuckDB file
+ARG LOAD_EXAMPLES_DUCKDB="false"
+
 ######################################################################
 # superset-node-ci used as a base for building frontend assets and CI
 ######################################################################
@@ -143,8 +146,8 @@ RUN if [ "${BUILD_TRANSLATIONS}" = "true" ]; then \
 ######################################################################
 FROM python-base AS python-common
 
-# Build arg to pre-populate examples DuckDB file
-ARG LOAD_EXAMPLES_DUCKDB="false"
+# Re-declare build arg to receive it in this stage
+ARG LOAD_EXAMPLES_DUCKDB
 
 ENV SUPERSET_HOME="/app/superset_home" \
     HOME="/app/superset_home" \