Skip to content

chore(docker): use editable mode in docker images - #34146

Merged
mistercrunch merged 1 commit into
masterfrom
dev_mode
Jul 22, 2025
Merged

mistercrunch merged 1 commit into
masterfrom
dev_mode

Conversation

@mistercrunch

@mistercrunch mistercrunch commented Jul 12, 2025 •

Copy link
Copy Markdown
Member

Trying to address the issue raise here: #34120 (comment)

From my analysis, it should address the issue (package installed twice in docker) by using a symlink.

The downsides are pretty minimal, with a micro os-level penalty on resolving symlinks (super minimal from my understanding), and some considerations around image size, where in editable mode we can't/couldn't strip .py files if we wanted.

This seems like a positive step.

Other alternatives would probably require 2 extra layers (an extra build layer for both dev and lean), and it's hard to keep the docker logic DRY and readable in that context. Personally I'm not willing to take this on now... With that approach, we wouldn't have /app/superset and would only have superset/ in .venv, could compile and strip .py to only keep .pyc if we wanted there.

Doing some research, it seems python is still very much lacking around managing lean packages/bundles of bytecode only, where wheels and packages in general tend to be raw .py, and it's tricky to only pacakge .pyc if/when desired.


Some benefits from the -e (editable mode). /app/superset in docker:

  • easy to find, easy to alter (pros/cons), easy to alter/inject files in extra docker layers
  • easily docker-mountable, mount /app/superset to your local repo and you're live-running/editing the image

@korbit-ai

korbit-ai Bot commented Jul 12, 2025

Copy link
Copy Markdown

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@mistercrunch
mistercrunch marked this pull request as ready for review July 12, 2025 23:04

@korbit-ai korbit-ai Bot left a comment

Copy link
Copy Markdown

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

@dosubot dosubot Bot added the install:docker Installation - docker container label Jul 12, 2025
@mistercrunch

Copy link
Copy Markdown
Member Author

@dpgaspar what do you think of this one!?

@eschutho eschutho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks fine for non-production use.

@mistercrunch
mistercrunch merged commit c444eed into master Jul 22, 2025
@mistercrunch
mistercrunch deleted the dev_mode branch July 22, 2025 23:14
LisaHusband pushed a commit to LisaHusband/superset that referenced this pull request Aug 17, 2025
dankor pushed a commit to dankor/superset that referenced this pull request Aug 18, 2025
@github-actions github-actions Bot added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 6.0.0 First shipped in 6.0.0 labels Dec 18, 2025
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels install:docker Installation - docker container preset-io size/XS 🚢 6.0.0 First shipped in 6.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants