artsy / positron

Positron is Artsy Writer or the editorial tool and API for Artsy.
MIT License
85 stars 42 forks source link

chore: prepare for mongodb version 5.0 #3131

Closed mc-jones closed 5 months ago

mc-jones commented 5 months ago

This PR:

  1. Updates the test.yml and development.yml yamls to use mongodb@5.0.23.
  2. removes the mongojs library and replaces it with the native mongodb driver. It also makes the necessary changes to CRUD operations.

Problem

On February 29th (leap year), MongoDB will auto-upgrade our Atlas clusters to 5.0 due to version 4.4 being at its EOL date. Positron is currently using version 4.4.

Solution

To avoid unnecessary disruptions, this PR updates positron to use version 5 in its development and test environments. It also replaces the mongojs library, which is unmaintained, with the native mongodb driver at version 4.10.

The 4.10 driver is compatible up to mongodb@6.0 (inclusive).

Migration

We will be bumping the staging atlas cluster and monitoring affected services for about a week. If there are no issues, we will bump the production cluster.

Considerations

PHIRE-544

codecov[bot] commented 5 months ago

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (a883d29) 83.6% compared to head (22b08ac) 83.5%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3131 +/- ## ======================================= - Coverage 83.6% 83.5% -0.1% ======================================= Files 197 197 Lines 5378 5383 +5 Branches 977 977 ======================================= + Hits 4499 4500 +1 - Misses 626 631 +5 + Partials 253 252 -1 ```
mc-jones commented 5 months ago

I'm not sure what to do with the blocking codecove issues as nothing has changed about test coverage.

mc-jones commented 5 months ago

Oh shoot. Forgot the co-authored by @ovasdi!

ovasdi commented 5 months ago

Oh shoot. Forgot the co-authored by @ovasdi!

You did all the heavy lifting on this 💪, but thanks!

amonkhouse commented 5 months ago

random comment to say that's a v high quality and descriptive pr description

mc-jones commented 5 months ago

@ovasdi - I've taken the draft status off, so merge at will. The codecov failure is not helpful in this instance as there have been no changes to code coverage. Discussed a bit here 🔒 .

ovasdi commented 5 months ago

@ovasdi - I've taken the draft status off, so merge at will. The codecov failure is not helpful in this instance as there have been no changes to code coverage. Discussed a bit here 🔒 .

Re-running failed check to see what happens. Mostly curious.

ovasdi commented 5 months ago

@ovasdi - I've taken the draft status off, so merge at will. The codecov failure is not helpful in this instance as there have been no changes to code coverage. Discussed a bit here 🔒 .

Re-running failed check to see what happens. Mostly curious.

Re-running the failed check does not seem to be working.