refactor: replaces custom MongoDBProxy implementation with PyMongo's built-in retry functionality#37011
Conversation
|
Thanks for the pull request, @wgu-ram-chandra! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
581733c to
f829a5a
Compare
f1d87fe to
c0a97dd
Compare
e8cc3ff to
405a448
Compare
dwong2708
left a comment
There was a problem hiding this comment.
I suggest testing it in a sandbox environment with some sample courses and components and the second commit looks like duplicated
99f0375 to
d4fadbc
Compare
d4fadbc to
f1b5c2c
Compare
|
Sandbox deployment failed 💥 |
|
Sandbox deployment failed 💥 |
|
Sandbox deployment failed 💥 |
|
Sandbox deployment successful 🚀 |
|
@dwong2708 I was able to successfully test course creation in the sandbox, thank you! |
|
Sandbox deployment failed 💥 |
kdmccormick
left a comment
There was a problem hiding this comment.
Looks great, thanks Ram! I'll merge later today.
|
Thanks Kyle! |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
|
2U Release Notice: This PR has been deployed to the edX production environment. |
…penedx#37011) This PR removes the usage of the custom `mongodb_proxy` package from edx-platform, replacing it with MongoDB's built-in retry functionality via `retryReads=True`. Changes: * Removed all references to `mongodb_proxy.MongoProxy` from connection logic. * Updated `connect_to_mongodb()` to always use `retryReads=True`. * Uninstalled `openedx-mongodbproxy` from edx-platform requirements. Fixes: openedx#35210
Description
This PR removes the usage of the custom
mongodb_proxypackage from edx-platform, replacing it with MongoDB's built-in retry functionality viaretryReads=True.Changes made:
mongodb_proxy.MongoProxyfrom connection logic.connect_to_mongodb()to always useretryReads=True.openedx-mongodbproxyfrom edx-platform requirements.mongodb_proxy.Built-in vs previous behavior:
@autoretry_readlogic retriedAutoReconnectup to 5 times with delay.retryReads=Trueprovides a single automatic retry for transient errors likeAutoReconnect,NotPrimaryError, etcProposed Solution
Is a single automatic retry (
retryReads=True) sufficient for our use case?If not, we can add a lightweight wrapper at the call site where additional retries are needed. For example:
References
Fixes: #35210
CC: @kdmccormick