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

Use the MongoDB setting useUnifiedTopology when testing connection #9561

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

derrickmehaffy
Copy link
Member

@derrickmehaffy derrickmehaffy commented Mar 1, 2021

What does it do?

Uses the useUnifiedTopology option when creating a new project with MongoDB

Why is it needed?

Prevents the following warning when creating a new project (we already enable this setting normally, just not during the connection test)

(node:44216) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(Use node --trace-deprecation ... to show where the warning was created)

How to test it?

Create a new project selecting a custom MongoDB install, notice the lack of a warning message.

Related issue(s)/PR(s)

fixes: #9198

Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
@derrickmehaffy derrickmehaffy added the issue: bug Issue reporting a bug label Mar 1, 2021
@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #9561 (82c70fa) into master (96cf541) will increase coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9561   +/-   ##
=======================================
  Coverage   35.95%   35.95%           
=======================================
  Files        1335     1335           
  Lines       14726    14731    +5     
  Branches     1468     1468           
=======================================
+ Hits         5295     5297    +2     
- Misses       8514     8517    +3     
  Partials      917      917           
Flag Coverage Δ
front 27.38% <50.00%> (+<0.01%) ⬆️
unit 55.52% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...trapi-admin/admin/src/containers/AuthPage/index.js 0.00% <ø> (ø)
...c/containers/NewNotification/Notification/index.js 0.00% <ø> (ø)
...ger/admin/src/components/AddDropdown/components.js 0.00% <ø> (ø)
...anager/admin/src/components/SelectWrapper/index.js 0.00% <ø> (ø)
...anager/admin/src/components/WysiwygEditor/index.js 0.00% <ø> (ø)
.../containers/EditViewDataManagerProvider/reducer.js 0.00% <ø> (ø)
...in/src/containers/ListSettingsView/MenuDropdown.js 0.00% <ø> (ø)
...rapi-plugin-upload/admin/src/translations/index.js 0.00% <0.00%> (ø)
packages/strapi/lib/utils/ee.js 23.33% <0.00%> (-0.40%) ⬇️
...trapi-admin/admin/src/validations/users/profile.js 66.66% <50.00%> (-8.34%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65bc2d0...a2e6b22. Read the comment docs.

@alexandrebodin alexandrebodin added this to the 3.5.3 milestone Mar 2, 2021
@alexandrebodin alexandrebodin added the source: core:database Source is core/database package label Mar 2, 2021
@alexandrebodin alexandrebodin merged commit 154e59c into master Mar 2, 2021
@alexandrebodin alexandrebodin deleted the mongo/fixUnifiedWarn branch March 2, 2021 07:57
This was referenced Mar 12, 2021
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug source: core:database Source is core/database package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MongoClient deprecation warning
2 participants