Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Building dev Docker image #27606

Closed
2 of 3 tasks
simaolucio opened this issue Mar 21, 2024 · 2 comments · Fixed by #27608
Closed
2 of 3 tasks

Problem Building dev Docker image #27606

simaolucio opened this issue Mar 21, 2024 · 2 comments · Fixed by #27608
Assignees

Comments

@simaolucio
Copy link

simaolucio commented Mar 21, 2024

Bug description

When building the Docker images on macOS, there is an issue when installing the dependencies on the Dev image.
Looks like it might be a result of #27505

M2 Pro
macOS Sonoma 14.2.1

How to reproduce the bug

Fresh repo clone
Before building, I pruned Docker's cache.

From the project's root dir
docker compose build

Output

[superset-worker dev 2/2] RUN --mount=type=bind,target=./requirements/development.txt,src=./requirements/development.txt     --mount=type=cache,target=/root/.cache/pip     pip install -r requirements/development.txt:

0.345 ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements/base.txt'

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

Not applicable

Node version

Not applicable

Browser

Not applicable

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@mistercrunch
Copy link
Member

I was able to reproduce on master, submitting a PR to fix shortly. I'm surprised CI was passing, guessing something about cache and how it works around mounts (?) My PR will move towards using COPY to get the python requirements files on the image as opposed to mounting them. Seems more readable and easy to reason about, plus we know how cache works around simple COPY statements.

mistercrunch added a commit that referenced this issue Mar 21, 2024
Closes #27606

I'm unclear on why exactly CI succeeded while this was an issue running
locally. I'm guessing it has to do with `--mount` and how it works
around caching, so I'm moving to a COPY-based approach, which is more
standard and easy to reason about. It also leaves a useful artefact on
the machine as to how it was built. It does add a tiny layer and payload
on the image, but it's super cheap for the utility/introspection it provides.
@mistercrunch
Copy link
Member

@simaolucio this should be addressed on master now, thank you for reporting this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants