Skip to content

Conversation

eschutho
Copy link
Member

@eschutho eschutho commented Sep 25, 2025

Summary

This PR fixes two critical issues preventing DuckDB examples from loading in showtime ephemeral environments:

  1. Docker ARG scope issue: LOAD_EXAMPLES_DUCKDB build argument was being ignored
  2. DuckDB version compatibility: Newer DuckDB versions cause unhashable type: '_duckdb.typing.DuckDBPyType' errors

Problems Fixed

1. Docker Build Argument Scope

Issue: The LOAD_EXAMPLES_DUCKDB ARG was declared inside the python-common stage, making it unavailable when passed via --build-arg to the showtime target in multi-stage builds.

Fix: Move ARG declaration to global scope and re-declare in the stage where it's used.

2. DuckDB Version Compatibility

Issue: Current versions duckdb==1.3.2 and duckdb-engine==0.17.0 have type system compatibility issues with Superset's DuckDB integration, causing connection failures.

Fix: Use proven working versions duckdb==0.10.2 and duckdb-engine==0.12.1 (same as motherduck config).

Testing

Local testing confirms both fixes work:

  • Docker ARG is properly passed through build stages
  • DuckDB connections work without type errors
  • File-based DuckDB connections work correctly

Before/After

Before:

  • Showtime builds ignored LOAD_EXAMPLES_DUCKDB=true → No examples file downloaded
  • DuckDB connections failed with type errors → No examples accessible

After:

  • Docker properly downloads examples.duckdb during build
  • DuckDB connections work correctly
  • Showtime environments can load examples successfully

Impact

This enables showtime ephemeral environments to successfully load and display examples, making them much more useful for testing and demonstration purposes.

🤖 Generated with Claude Code

eschutho and others added 2 commits September 23, 2025 18:12
…ronments

This adds the missing SUPERSET__SQLALCHEMY_EXAMPLES_URI environment variable
to the ECS task definition used by showtime ephemeral environments.

Without this configuration, showtime environments were unable to load examples
because the container didn't know where to find the DuckDB examples file that
was downloaded during Docker build (via LOAD_EXAMPLES_DUCKDB=true).

The URI matches what's used in docker-compose.yml and docker-compose-light.yml,
with read-only access mode for safety in ephemeral environments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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 <[email protected]>
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've completed my review and didn't find any issues.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Sep 25, 2025
@dosubot dosubot bot added the deploy label Sep 25, 2025
@github-actions github-actions bot removed the github_actions Pull requests that update GitHub Actions code label Sep 25, 2025
@eschutho eschutho added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Sep 25, 2025
@github-actions github-actions bot added 🎪 482b710 🚦 building Environment 482b710 status: building 🎪 482b710 📅 2025-09-25T16-51 Environment 482b710 created at 2025-09-25T16-51 🎪 482b710 ⌛ 48h Environment 482b710 expires after 48h 🎪 482b710 🤡 eschutho Environment 482b710 requested by eschutho and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Sep 25, 2025
Copy link
Contributor

🎪 Showtime is building environment on GHA for 482b710

@github-actions github-actions bot added 🎪 482b710 🚦 deploying Environment 482b710 status: deploying 🎪 482b710 🚦 running Environment 482b710 status: running and removed 🎪 482b710 🚦 building Environment 482b710 status: building 🎪 482b710 🚦 deploying Environment 482b710 status: deploying labels Sep 25, 2025
@github-actions github-actions bot added 🎪 482b710 🚦 running Environment 482b710 status: running 🎪 🎯 482b710 Active environment pointer - 482b710 is receiving traffic 🎪 482b710 🌐 44.252.37.116:8080 Environment 482b710 URL: http://44.252.37.116:8080 (click to visit) and removed 🎪 482b710 🚦 running Environment 482b710 status: running 🎪 🎯 482b710 Active environment pointer - 482b710 is receiving traffic labels Sep 25, 2025
Copy link
Contributor

🎪 Showtime deployed environment on GHA for 482b710

Environment: http://44.252.37.116:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

Updated to use duckdb==0.10.2 and duckdb-engine==0.12.1, which are the
same versions used in the motherduck configuration that are known to work
with Superset's DuckDB integration.
@eschutho eschutho changed the title fix: Move LOAD_EXAMPLES_DUCKDB ARG to global scope for showtime builds fix: Enable DuckDB examples loading in showtime ephemeral environments Sep 26, 2025
@github-actions github-actions bot added 🎪 1772412 🚦 building Environment 1772412 status: building 🎪 1772412 📅 2025-09-26T01-32 Environment 1772412 created at 2025-09-26T01-32 🎪 1772412 ⌛ 48h Environment 1772412 expires after 48h 🎪 1772412 🤡 eschutho Environment 1772412 requested by eschutho labels Sep 26, 2025
Copy link
Contributor

🎪 Showtime is building environment on GHA for 1772412

@github-actions github-actions bot added preset-io 🎪 1772412 🚦 deploying Environment 1772412 status: deploying 🎪 1772412 🚦 running Environment 1772412 status: running 🎪 🎯 1772412 Active environment pointer - 1772412 is receiving traffic 🎪 1772412 🌐 54.200.15.21:8080 Environment 1772412 URL: http://54.200.15.21:8080 (click to visit) and removed 🎪 1772412 🚦 building Environment 1772412 status: building 🎪 1772412 🚦 deploying Environment 1772412 status: deploying 🎪 1772412 🚦 running Environment 1772412 status: running 🎪 🎯 1772412 Active environment pointer - 1772412 is receiving traffic 🎪 482b710 📅 2025-09-25T23-25 Environment 482b710 created at 2025-09-25T23-25 🎪 482b710 🌐 44.252.37.116:8080 Environment 482b710 URL: http://44.252.37.116:8080 (click to visit) 🎪 482b710 🤡 eschutho Environment 482b710 requested by eschutho 🎪 482b710 ⌛ 48h Environment 482b710 expires after 48h 🎪 482b710 🚦 running Environment 482b710 status: running labels Sep 26, 2025
Copy link
Contributor

🎪 Showtime deployed environment on GHA for 1772412

Environment: http://54.200.15.21:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy preset-io review:checkpoint Last PR reviewed during the daily review standup size/XS 🎪 1772412 🤡 eschutho Environment 1772412 requested by eschutho 🎪 1772412 🚦 running Environment 1772412 status: running 🎪 1772412 ⌛ 48h Environment 1772412 expires after 48h 🎪 1772412 🌐 54.200.15.21:8080 Environment 1772412 URL: http://54.200.15.21:8080 (click to visit) 🎪 1772412 📅 2025-09-26T01-32 Environment 1772412 created at 2025-09-26T01-32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants