Skip to content

fix(python): correct ruff PATH in python-v2/pydantic-model Dockerfile#13871

Merged
Swimburger merged 3 commits intomainfrom
devin/1774119927-fix-pydantic-ruff-path
Mar 22, 2026
Merged

fix(python): correct ruff PATH in python-v2/pydantic-model Dockerfile#13871
Swimburger merged 3 commits intomainfrom
devin/1774119927-fix-pydantic-ruff-path

Conversation

@Swimburger
Copy link
Member

@Swimburger Swimburger commented Mar 21, 2026

Description

Fixes incorrect PATH for ruff in 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

  • Changed ENV PATH="/root/.cargo/bin:${PATH}"ENV PATH="/root/.local/bin:/root/.cargo/bin:${PATH}" in generators/python-v2/pydantic-model/Dockerfile

Both paths are now included: /root/.local/bin (where ruff actually installs) is added first, and /root/.cargo/bin is 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

  • Verified by running curl -LsSf https://astral.sh/ruff/install.sh | sh in a node:lts-slim container — binary is placed at /root/.local/bin/ruff, not /root/.cargo/bin/ruff
  • Manual testing completed — Dockerfile-only change; requires Docker build to fully validate

Human Review Checklist

Link to Devin session: https://app.devin.ai/sessions/371cc6bdbad447bb9161b29b0ab8ec28
Requested by: @Swimburger


Open with Devin

Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

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.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@Swimburger
Copy link
Member Author

Should we add both to PATH?

@devin-ai-integration
Copy link
Contributor

Good idea — adding both would be more defensive. Right now nothing in this Dockerfile installs to /root/.cargo/bin, but keeping it wouldn't hurt and would future-proof the image if cargo-installed tools are ever added.

I'll update the PR to use ENV PATH="/root/.local/bin:/root/.cargo/bin:${PATH}" instead.

devin-ai-integration bot and others added 2 commits March 21, 2026 21:09
…-model Dockerfile

Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
@Swimburger Swimburger enabled auto-merge (squash) March 22, 2026 00:07
@Swimburger Swimburger merged commit 41260fa into main Mar 22, 2026
98 checks passed
@Swimburger Swimburger deleted the devin/1774119927-fix-pydantic-ruff-path branch March 22, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants