fix(python): correct ruff PATH in python-v2/pydantic-model Dockerfile#13871
fix(python): correct ruff PATH in python-v2/pydantic-model Dockerfile#13871Swimburger merged 3 commits intomainfrom
Conversation
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit in Settings → Usage.
Once credits are available, reopen this pull request to trigger a review.
|
Should we add both to PATH? |
|
Good idea — adding both would be more defensive. Right now nothing in this Dockerfile installs to I'll update the PR to use |
…-model Dockerfile Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Description
Fixes incorrect
PATHforruffin the python-v2 pydantic-model Dockerfile. The ruff standalone installer (astral.sh/ruff/install.sh) installs to~/.local/bin, not~/.cargo/bin. With the wrong PATH, ruff would not be found at runtime when the generator attempts to format generated code.Changes Made
ENV PATH="/root/.cargo/bin:${PATH}"→ENV PATH="/root/.local/bin:/root/.cargo/bin:${PATH}"ingenerators/python-v2/pydantic-model/DockerfileBoth paths are now included:
/root/.local/bin(where ruff actually installs) is added first, and/root/.cargo/binis retained for future-proofing in case cargo-installed tools are ever added.This aligns with the sister
python-v2/sdk/Dockerfile, which already correctly uses/root/.local/bin.Testing
curl -LsSf https://astral.sh/ruff/install.sh | shin anode:lts-slimcontainer — binary is placed at/root/.local/bin/ruff, not/root/.cargo/bin/ruffHuman Review Checklist
~/.local/bin(confirmed by running the installer in a freshnode:lts-slimcontainer)# RUN ruff --versionline would have caught this at build time if it were active — consider uncommenting it in a follow-up (addressed in PR chore(python): uncomment ruff version check in python-v2 Dockerfiles #13880)Link to Devin session: https://app.devin.ai/sessions/371cc6bdbad447bb9161b29b0ab8ec28
Requested by: @Swimburger