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

Upgrade mongo from 4.4. to 5.0 #1704

Merged
merged 7 commits into from
Aug 2, 2022
Merged

Upgrade mongo from 4.4. to 5.0 #1704

merged 7 commits into from
Aug 2, 2022

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Jul 29, 2022

Resolves #1703
Includes: Replace mongo calls with mongosh

The mongo shell is depricated (https://www.mongodb.com/docs/manual/release-notes/5.0-compatibility/#deprecations); replacing with mongosh.


This change is Reviewable

@imnasnainaec imnasnainaec added the maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. label Jul 29, 2022
@imnasnainaec imnasnainaec self-assigned this Jul 29, 2022
@imnasnainaec imnasnainaec changed the title Mongo 5 prep Replace mongo calls with mongosh Jul 29, 2022
@imnasnainaec imnasnainaec marked this pull request as ready for review July 29, 2022 14:14
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2022

Codecov Report

Merging #1704 (4d1ab4e) into master (a8f8ffc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1704   +/-   ##
=======================================
  Coverage   52.21%   52.21%           
=======================================
  Files         275      275           
  Lines        8498     8498           
  Branches      616      616           
=======================================
  Hits         4437     4437           
  Misses       3568     3568           
  Partials      493      493           
Flag Coverage Δ
backend 80.22% <ø> (ø)
frontend 32.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out 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 a8f8ffc...4d1ab4e. Read the comment docs.

Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @imnasnainaec)


maintenance/scripts/combine_app.py line 117 at r1 (raw file):

        db_results = self.exec(
            self.get_pod_id(CombineApp.Component.Database),
            ["/usr/bin/mongosh", "--quiet", "CombineDatabase", "--eval", cmd],

This is a breaking change. The Combine is running MongoDB 4.4 which does not have mongosh, it only has mongo. This change needs to wait until we have analyzed and tested The Combine with Mongo 5.0. I don't think that has been done yet.

Unfortunately, the README.md is not specific - it just instructs the reader to install Mongo. The link provided gives instructions for installing MongoDB 6.0 which we cannot run in a production environment yet (at least with official Docker images). The README.md should be updated to direct readers to install Mongo 4.4.

Code quote:

  ["/usr/bin/mongosh", "--quiet", "CombineDatabase", "--eval", cmd],

@imnasnainaec imnasnainaec marked this pull request as draft July 29, 2022 14:49
@imnasnainaec imnasnainaec marked this pull request as draft July 29, 2022 14:49
Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 6 files reviewed, all discussions resolved (waiting on @imnasnainaec)


maintenance/scripts/combine_app.py line 117 at r1 (raw file):

Previously, jmgrady (Jim Grady) wrote…

This is a breaking change. The Combine is running MongoDB 4.4 which does not have mongosh, it only has mongo. This change needs to wait until we have analyzed and tested The Combine with Mongo 5.0. I don't think that has been done yet.

Unfortunately, the README.md is not specific - it just instructs the reader to install Mongo. The link provided gives instructions for installing MongoDB 6.0 which we cannot run in a production environment yet (at least with official Docker images). The README.md should be updated to direct readers to install Mongo 4.4.

I have pushed a change to this PR that sets the MongoDB to version 5.0. I have also verified that the maintenance scripts work using mongosh and MongoDB 5.0.

Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: 3 of 6 files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec changed the title Replace mongo calls with mongosh Upgrade mongo from 4.4. to 5.0 Aug 2, 2022
@imnasnainaec imnasnainaec marked this pull request as ready for review August 2, 2022 14:37
Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 2620b87 into master Aug 2, 2022
@imnasnainaec imnasnainaec deleted the mongo-5-prep branch August 2, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Mongo to later version
3 participants