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

bump mongoengine, motor, and pymongo #4915

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

findtopher
Copy link
Member

@findtopher findtopher commented Oct 10, 2024

What changes are proposed in this pull request?

Pin to newer versions of mongoengine, motor, and pymongo - the use of new versions needs to be consistent as variations result in pickle issues, so pymongo has to fit with motor has to fit with mongoengine

This also enables MongoDB 8 support.

How is this patch tested? If it is not, please explain why.

  • Local testing, ran fiftyone connecting to existing database
  • local testing, ran fiftyone connecting to empty database

Release Notes

Is this a user-facing change that should be mentioned in the release notes?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

(Details in 1-2 sentences. You can just refer to another PR with a description
if this PR is part of a larger change.)

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

Summary by CodeRabbit

  • Chores
    • Updated dependency versions for improved compatibility and flexibility.

@findtopher findtopher requested a review from a team October 10, 2024 21:01
Copy link
Contributor

coderabbitai bot commented Oct 10, 2024

Walkthrough

The changes in this pull request involve updates to the version specifications of several dependencies in both requirements/common.txt and setup.py. Specifically, the versions for mongoengine, motor, and pymongo have been adjusted to allow for more flexible updates while maintaining compatibility within specified ranges.

Changes

File Change Summary
requirements/common.txt, setup.py Updated mongoengine from 0.24.2 to ~0.29.1, motor from >=2.5 to ~3.6.0, and pymongo from >=3.12,<4.9 to ~4.9.2.

Possibly related PRs

  • Hotfix pymongo #4822: This PR updates the pymongo dependency to require a version less than 4.9, which is directly related to the changes in the main PR that also modified the pymongo version constraint to ~4.9.2.
  • Merge v0.25.2 into develop #4824: Similar to Hotfix pymongo #4822, this PR also mandates pymongo to be less than version 4.9, aligning with the versioning strategy seen in the main PR.

Suggested labels

release

Suggested reviewers

  • swheaton
  • benjaminpkane

🐇 In the garden, we hop and play,
Updating versions, hip-hip-hooray!
With mongo and motor, we dance in delight,
Pymongo's new version shines oh so bright!
Let's frolic and code, with joy in our hearts,
For every new change, a fresh start! 🌼


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 42b8fbc and 5ea2521.

📒 Files selected for processing (2)
  • requirements/common.txt (1 hunks)
  • setup.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • requirements/common.txt
  • setup.py

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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

🧹 Outside diff range and nitpick comments (1)
setup.py (1)

49-50: Summary of dependency updates

The updates to mongoengine, motor, and pymongo align with the PR objectives and should enable support for MongoDB version 8. However, these are significant version updates that require careful consideration:

  1. Verify compatibility: Ensure that the project is compatible with the new versions of all three dependencies. Review changelogs for breaking changes and update the codebase accordingly.
  2. Update documentation: Reflect any changes in usage or MongoDB version support in the project documentation.
  3. Consider upper bounds: For pymongo and potentially other dependencies, consider adding upper bounds to prevent automatic updates to potentially incompatible future versions.
  4. Comprehensive testing: Conduct thorough testing, especially for the scenarios mentioned in the PR description (connecting to existing and empty databases).

To ensure a smooth transition and maintain long-term stability:

  1. Implement a comprehensive test suite that covers all interactions with these dependencies.
  2. Set up continuous integration to regularly test against the latest compatible versions of these dependencies.
  3. Document the rationale behind these version changes and any known compatibility issues for future reference.

Also applies to: 58-58

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 6f5a12c and 42b8fbc.

📒 Files selected for processing (2)
  • requirements/common.txt (1 hunks)
  • setup.py (1 hunks)
🧰 Additional context used
🔇 Additional comments (7)
requirements/common.txt (4)

12-19: Summary: Dependency updates for mongoengine, motor, and pymongo

The updates to mongoengine, motor, and pymongo align with the PR objectives and follow good practices for version specification. The use of the tilde (~) notation allows for compatible minor version updates while maintaining stability.

Given the significance of these updates, especially the major version changes, it's crucial to conduct comprehensive testing:

  1. Verify that all features depending on these libraries work as expected.
  2. Pay special attention to database operations, ensuring compatibility with both existing and empty databases as mentioned in the PR objectives.
  3. Check for any deprecated features or syntax changes that might affect your codebase.

Consider running your full test suite and performing manual testing of critical database operations to ensure everything functions correctly with these updated dependencies.


13-13: Approved: motor version update

The update from >=2.5 to ~3.6.0 is significant and aligns with the PR objectives. The change in version specification style provides better control over updates.

As this is a major version update (2.x to 3.x), please verify that it doesn't introduce any breaking changes in your codebase. Run the following command to check for motor usage:

#!/bin/bash
# Search for motor usage in the codebase
rg --type python 'from motor import|import motor' -A 10

19-19: Approved: pymongo version update

The update from >=3.12,<4.9 to ~4.9.2 is significant and aligns with the PR objectives. The change in version specification style provides better control over updates and supports MongoDB version 8.

As this is a major version update (3.x to 4.x), please verify that it doesn't introduce any breaking changes in your codebase. Run the following command to check for pymongo usage:

#!/bin/bash
# Search for pymongo usage in the codebase
rg --type python 'from pymongo import|import pymongo' -A 10

12-12: Approved: mongoengine version update

The update from 0.24.2 to 0.29.1 is significant and aligns with the PR objectives. The use of the tilde () notation allows for compatible minor version updates, which is a good practice.

Please ensure that this major version update (0.24 to 0.29) doesn't introduce any breaking changes in your codebase. Run the following command to check for any deprecated or removed features:

setup.py (3)

50-50: Approved: motor version update

The update from motor>=2.5 to motor~=3.6.0 aligns with the PR objective to update this dependency. This change narrows down the acceptable versions to the 3.6.x range, providing more control over the package version.

As this is a major version update from 2.x to 3.x, please ensure that the project is compatible with motor 3.6.x. Review the changelog for any breaking changes and update the project documentation if necessary to reflect any changes in usage.


58-58: Approved with suggestions: pymongo version update

The update from pymongo>=3.12,<4.9 to pymongo~=4.9.2 aligns with the PR objective to update this dependency and enable support for MongoDB version 8. This change narrows down the acceptable versions to the 4.9.x range.

Please consider the following points:

  1. Ensure that the project is compatible with pymongo 4.9.x, as this is a major version update from 3.x to 4.x. Review the changelog for any breaking changes.
  2. The removal of the upper bound (<4.9) could potentially lead to compatibility issues with future versions. Consider adding an upper bound to prevent automatic updates to potentially incompatible versions, e.g., pymongo~=4.9.2,<5.0.
  3. Update the project documentation if necessary to reflect any changes in usage or MongoDB version support.

49-49: Approved: mongoengine version update

The update from mongoengine==0.24.2 to mongoengine~=0.29.1 aligns with the PR objective to update this dependency. This change allows for more flexible updates within the 0.29.x range.

Given the significant version jump, please ensure that the project is compatible with mongoengine 0.29.x. You may want to review the changelog for any breaking changes between 0.24.2 and 0.29.1.

@findtopher
Copy link
Member Author

findtopher commented Oct 11, 2024

The use of ~= will pin each of these libraries to only allow for patch releases to be included

~= 0.29.1

and

>= 0.29.1, == 0.29.*

are equivalent

Let's hope that our upstream providers are better at semver than we are...

PEP440 Ref

@swheaton
Copy link
Contributor

Necessary but insufficient information:
I looked through changelog of MongoDB 8.0, I don't see anything of concern.

Copy link
Contributor

@benjaminpkane benjaminpkane left a comment

Choose a reason for hiding this comment

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

:shipit:

@swheaton
Copy link
Contributor

@benjaminpkane did you thoroughly test this? You said you would not have time this week.

@benjaminpkane
Copy link
Contributor

@benjaminpkane did you thoroughly test this? You said you would not have time this week.

I have not. To err on the side of caution, I propose we wait until after dev cut to merge

@swheaton
Copy link
Contributor

@benjaminpkane did you thoroughly test this? You said you would not have time this week.

I have not. To err on the side of caution, I propose we wait until after dev cut to merge

definitely agree

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.

3 participants