Skip to content

Conversation

@Elbehery
Copy link
Collaborator

@Elbehery Elbehery commented Sep 30, 2025

What does this PR do?

This PR ensures there is only one pymilvus dependnecy in req.txt.

During bumping LLS version in #54, the CI failed upon illegal pymilvus dependency in req.txt. See CI run.

Closes https://issues.redhat.com/browse/RHAIENG-1312.

Test Plan

Summary by CodeRabbit

  • Bug Fixes
    • Corrected dependency handling to only add the milvus-lite extra to pymilvus when it’s not already specified, preventing duplicate or malformed package specifications.
  • Chores
    • Refined build-time package transformation for more reliable distribution behavior.

This commit ensure there is only one pymilvus dependnecy in req.txt.

Signed-off-by: Mustafa Elbehery <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Sep 30, 2025

Walkthrough

Refines dependency text transformation in distribution/build.py to only append "[milvus-lite]" to packages containing "pymilvus" that do not already specify "[milvus-lite]". No other logic or exports changed.

Changes

Cohort / File(s) Change Summary
Build script transformation
distribution/build.py
Tightened replacement condition: only modify dependency strings containing "pymilvus" that lack the "[milvus-lite]" extra; avoids re-replacing already-specified extras.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Builder as Build Script
  participant Transform as Dependency Transformer
  participant Output as Requirements

  Builder->>Transform: Provide dependency line
  alt contains "pymilvus" AND not contains "[milvus-lite]"
    Transform->>Transform: Replace "pymilvus" → "pymilvus[milvus-lite]"
    Transform-->>Builder: Transformed line
  else already includes "[milvus-lite]" or not pymilvus
    Transform-->>Builder: Return line unchanged
  end
  Builder->>Output: Write finalized dependency line
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibbled the deps with careful bite,
Ensuring pymilvus gets its lite,
But if it’s dressed with brackets neat,
I hop along—no need to tweak.
Carrots checked, builds take flight—
A tidy warren, dependencies right. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “fix: deduplicate pymilvus dependency” succinctly describes the primary change of removing duplicate pymilvus entries, uses clear imperative phrasing, and directly reflects the core intent of the pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
distribution/build.py (1)

92-97: LGTM! The fix correctly prevents duplicate [milvus-lite] extras.

The added condition on line 94 ensures that packages already containing "[milvus-lite]" are not processed again, which solves the CI failure mentioned in the PR objectives.

Optional future enhancement: Consider using a more precise pattern match (e.g., regex) to ensure "pymilvus" is matched as a standalone package name rather than as a substring. The current replace() would incorrectly transform hypothetical packages like "my-pymilvus-fork" into "my-pymilvus[milvus-lite]-fork". However, this is a pre-existing behavior and doesn't need to block this PR.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b2d68f and c3fe6a8.

📒 Files selected for processing (1)
  • distribution/build.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-test-push (linux/amd64)
  • GitHub Check: Summary

Copy link
Collaborator

@nathan-weinberg nathan-weinberg left a comment

Choose a reason for hiding this comment

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

Good catch!

@Elbehery
Copy link
Collaborator Author

lets merge so that I can rebase #54

@nathan-weinberg
Copy link
Collaborator

@Elbehery you need one more approval, then you can remove the remaining reviews and it will automerge

@Elbehery
Copy link
Collaborator Author

thanks for approvals everyone 🥳

@Elbehery Elbehery merged commit 37b47d7 into opendatahub-io:main Sep 30, 2025
6 checks passed
@Elbehery Elbehery deleted the 20250929_fix_pymilvus_duplicate branch September 30, 2025 14:21
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 this pull request may close these issues.

4 participants