Skip to content

chore(python): uncomment ruff version check in python-v2 Dockerfiles#13880

Merged
Swimburger merged 2 commits intomainfrom
devin/1774120654-uncomment-ruff-check
Mar 22, 2026
Merged

chore(python): uncomment ruff version check in python-v2 Dockerfiles#13880
Swimburger merged 2 commits intomainfrom
devin/1774120654-uncomment-ruff-check

Conversation

@Swimburger
Copy link
Member

@Swimburger Swimburger commented Mar 21, 2026

Description

Uncomments the RUN ruff --version build-time sanity check in the python-v2 generator Dockerfiles. This check was previously commented out, meaning a broken ruff installation would go undetected until runtime. Enabling it causes the Docker build to fail fast if ruff is not correctly installed or not on PATH.

Changes Made

  • Uncommented RUN ruff --version in generators/python-v2/sdk/Dockerfile
  • Uncommented RUN ruff --version in generators/python-v2/pydantic-model/Dockerfile

Human Review Checklist

  • ⚠️ pydantic-model/Dockerfile will fail to build as-is. The ENV PATH on line 4 is set to /root/.cargo/bin (incorrect), but ruff installs to /root/.local/bin. Uncommenting the version check will cause the build to error because ruff won't be found. This PR should either be merged after the PATH fix PR (fix(python): correct ruff PATH in python-v2/pydantic-model Dockerfile #13871), or the PATH fix should be included here.
  • Confirm the sdk/Dockerfile PATH (/root/.local/bin) is correct — this one should work.

Testing

  • No Docker build testing performed — verified by code inspection only
  • Depends on correct PATH configuration in both Dockerfiles

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.

devin-ai-integration[bot]

This comment was marked as resolved.

@Swimburger
Copy link
Member Author

Is there a reason we shouldn't do this?

@devin-ai-integration
Copy link
Contributor

No reason not to — it's a pure build-time sanity check that catches broken ruff installations before the image ships. The only caveat is that this PR should be merged after #13871 (which fixes the ruff PATH in pydantic-model), otherwise the pydantic-model Docker build will fail because ruff won't be found at the wrong PATH. The sdk Dockerfile already has the correct PATH so it's fine either way.

@Swimburger Swimburger enabled auto-merge (squash) March 22, 2026 00:08
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
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 found 1 new potential issue.

🐛 1 issue in files not directly in the diff

🐛 types/mod.rs declares modules for inlined types that have no generated file (generators/rust/model/src/generateModels.ts:47-51)

The new computeInlinedUnionVariantTypeIds logic in generateModels.ts:47-51 skips generating .rs files for types in context.inlinedUnionVariantTypeIds. However, ModelGeneratorCli.ts:132-153 (generateTypesModFile) iterates over ALL context.ir.types without checking inlinedUnionVariantTypeIds, so it emits pub mod <inlined_type>; and pub use <inlined_type>::<TypeName>; for types that have no corresponding file. This causes a Rust compilation error (file not found for module). The test snapshot confirms this: types_event_payload.rs is deleted, yet the mod.rs generation code would still declare it.

Same bug also affects SdkGeneratorCli.ts:614

The SDK's buildTypesModule has the identical problem — it iterates all context.ir.types entries without filtering inlined types. Since inlinedUnionVariantTypeIds lives on the temporary ModelGeneratorContext created via toModelGeneratorContext(), the SDK context doesn't even have access to the set.

View 5 additional findings in Devin Review.

Open in Devin Review

@Swimburger Swimburger merged commit 7f6faa2 into main Mar 22, 2026
98 checks passed
@Swimburger Swimburger deleted the devin/1774120654-uncomment-ruff-check branch March 22, 2026 00:22
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