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 (1.x) 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 DuckDB version 1.3.2 has type system changes incompatible with duckdb-engine, causing connection failures.

Fix: Constrain DuckDB core to >=0.10.2,<0.11 while keeping duckdb-engine at current >=0.17.0. Testing confirmed the newer driver works fine with DuckDB 0.10.x.

Version Constraints

# DuckDB 1.x has type system incompatibilities with duckdb-engine.
duckdb = ["duckdb>=0.10.2,<0.11", "duckdb-engine>=0.17.0"]

Rationale:

  • Uses version ranges (not pinned) to allow patch updates
  • Only constrains what's broken (duckdb core 1.x)
  • Keeps duckdb-engine at current version (tested and working)
  • Matches approach used in motherduck configuration

Testing

Local testing confirms both fixes work:

  • Docker ARG is properly passed through build stages
  • DuckDB 0.10.2 + duckdb-engine 0.17.0 connections work without errors
  • File-based DuckDB connections work correctly
# Tested combination
pip install duckdb==0.10.2 duckdb-engine==0.17.0
# Result: ✅ All connection types work

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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 🎪 ecfedd4 🌐 52.38.229.242:8080 Environment ecfedd4 URL: http://52.38.229.242:8080 (click to visit) 🎪 ecfedd4 📅 2025-09-26T21-20 Environment ecfedd4 created at 2025-09-26T21-20 🎪 ecfedd4 🤡 eschutho Environment ecfedd4 requested by eschutho 🎪 ecfedd4 ⌛ 48h Environment ecfedd4 expires after 48h and removed 🎪 🎯 ecfedd4 Active environment pointer - ecfedd4 is receiving traffic 🎪 71e4fcf 🌐 54.186.246.255:8080 Environment 71e4fcf URL: http://54.186.246.255:8080 (click to visit) 🎪 71e4fcf 🤡 eschutho Environment 71e4fcf requested by eschutho 🎪 71e4fcf 📅 2025-09-26T21-15 Environment 71e4fcf created at 2025-09-26T21-15 🎪 71e4fcf 🚦 running Environment 71e4fcf status: running 🎪 71e4fcf ⌛ 48h Environment 71e4fcf expires after 48h 🎪 8ae41ba ⌛ 48h Environment 8ae41ba expires after 48h 🎪 8ae41ba 🤡 eschutho Environment 8ae41ba requested by eschutho 🎪 8ae41ba 🚦 deploying Environment 8ae41ba status: deploying 🎪 8ae41ba 📅 2025-09-26T21-28 Environment 8ae41ba created at 2025-09-26T21-28 labels Sep 26, 2025
Copy link
Contributor

🎪 Showtime deployed environment on GHA for ecfedd4

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

@github-actions github-actions bot added 🎪 8ae41ba 🚦 failed Environment 8ae41ba status: failed 🎪 8ae41ba 📅 2025-09-26T21-28 Environment 8ae41ba created at 2025-09-26T21-28 🎪 8ae41ba ⌛ 48h Environment 8ae41ba expires after 48h 🎪 8ae41ba 🤡 eschutho Environment 8ae41ba requested by eschutho labels Sep 26, 2025
@eschutho eschutho added the 🎪 🛑 showtime-trigger-stop Destroy ephemeral environment and clean up AWS resources label Sep 26, 2025
@github-actions github-actions bot removed 🎪 🛑 showtime-trigger-stop Destroy ephemeral environment and clean up AWS resources 🎪 ecfedd4 🚦 running Environment ecfedd4 status: running 🎪 ecfedd4 ⌛ 48h Environment ecfedd4 expires after 48h 🎪 8ae41ba 🤡 eschutho Environment 8ae41ba requested by eschutho 🎪 ecfedd4 📅 2025-09-26T21-20 Environment ecfedd4 created at 2025-09-26T21-20 🎪 8ae41ba 🚦 failed Environment 8ae41ba status: failed 🎪 8ae41ba 📅 2025-09-26T21-28 Environment 8ae41ba created at 2025-09-26T21-28 🎪 ecfedd4 🤡 eschutho Environment ecfedd4 requested by eschutho 🎪 8ae41ba ⌛ 48h Environment 8ae41ba expires after 48h 🎪 ecfedd4 🌐 52.38.229.242:8080 Environment ecfedd4 URL: http://52.38.229.242:8080 (click to visit) labels Sep 26, 2025
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/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants