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

Migrate to MongoDB 6 #1074

Merged
merged 33 commits into from
Sep 2, 2022
Merged

Migrate to MongoDB 6 #1074

merged 33 commits into from
Sep 2, 2022

Conversation

AlekSi
Copy link
Member

@AlekSi AlekSi commented Aug 24, 2022

Description

Closes #1083.

Readiness checklist

  • I added tests for new functionality or bugfixes.
  • I ran task all, and it passed.
  • I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • I checked comments rendering with task godocs.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@AlekSi AlekSi added the code/chore Code maintenance improvements label Aug 24, 2022
@AlekSi AlekSi self-assigned this Aug 24, 2022
@AlekSi AlekSi added this to the v0.6.0 Alpha milestone Aug 24, 2022
@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #1074 (85a0414) into main (c57e53d) will increase coverage by 0.26%.
The diff coverage is 99.08%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1074      +/-   ##
==========================================
+ Coverage   65.90%   66.16%   +0.26%     
==========================================
  Files         248      248              
  Lines       11874    11950      +76     
==========================================
+ Hits         7825     7907      +82     
+ Misses       3185     3176       -9     
- Partials      864      867       +3     
Impacted Files Coverage Δ
internal/handlers/common/errorcode_string.go 80.00% <ø> (ø)
internal/handlers/tigris/msg_create.go 65.67% <0.00%> (ø)
internal/handlers/common/error.go 80.34% <100.00%> (ø)
internal/handlers/common/filter.go 86.01% <100.00%> (+0.62%) ⬆️
internal/handlers/common/params.go 95.43% <100.00%> (+0.23%) ⬆️
internal/handlers/pg/cmd_query.go 81.48% <100.00%> (ø)
internal/handlers/pg/msg_create.go 79.41% <100.00%> (ø)
internal/handlers/pg/msg_getlog.go 76.66% <100.00%> (+4.29%) ⬆️
internal/handlers/pg/msg_hello.go 76.00% <100.00%> (ø)
internal/handlers/pg/msg_ismaster.go 76.00% <100.00%> (ø)
... and 11 more
Flag Coverage Δ
integration 62.38% <99.08%> (+0.27%) ⬆️
mongodb 15.10% <1.83%> (-0.14%) ⬇️
pg 52.82% <77.98%> (+0.21%) ⬆️
tigris 32.13% <22.01%> (-0.08%) ⬇️
unit 24.37% <0.00%> (+0.04%) ⬆️

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

@AlekSi AlekSi changed the title Test with MongoDB 6 Migrate to MongoDB 6 Aug 25, 2022
@AlekSi AlekSi mentioned this pull request Aug 25, 2022
@w84thesun w84thesun self-assigned this Sep 1, 2022
@w84thesun w84thesun requested review from a team, w84thesun, rumyantseva and noisersup and removed request for a team September 2, 2022 12:24
@w84thesun w84thesun linked an issue Sep 2, 2022 that may be closed by this pull request
@w84thesun w84thesun marked this pull request as ready for review September 2, 2022 12:24
@w84thesun w84thesun requested a review from a team as a code owner September 2, 2022 12:24
@w84thesun w84thesun removed their request for review September 2, 2022 14:55
@AlekSi
Copy link
Member Author

AlekSi commented Sep 2, 2022

@rumyantseva PTAL

@AlekSi AlekSi enabled auto-merge (squash) September 2, 2022 17:25
Copy link
Member

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

Yeah, that looks reasonable, and I don't see other places we might need to "migrate".

@AlekSi AlekSi merged commit c2987f0 into FerretDB:main Sep 2, 2022
@AlekSi AlekSi deleted the mongo6 branch September 2, 2022 17:33
Comment on lines +72 to 74
Message: `No log named 'nonExistentName'`,
},
alt: `no RecentEntries named: nonExistentName`,
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we need both messages there? I think they should be the same now

@@ -50,11 +50,11 @@ func TestCommandsReplicationIsMaster(t *testing.T) {
delete(m, "localTime")

maxWireVersion := m["maxWireVersion"].(int32)
assert.True(t, maxWireVersion == 0 || maxWireVersion == 13)
assert.True(t, maxWireVersion == 0 || maxWireVersion == 17)
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's add a comment explaining why we need == 0 in those lines

Comment on lines +489 to +491
Message: ` invalid flag in regex options: 1`,
},
altMessage: `invalid flag in regex options: 1`,
Copy link
Member Author

Choose a reason for hiding this comment

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

I think altMessage was supposed to be MongoDB's error, not vise versa.

Let's rename AssertEqualAltError argument names and update docs to mention that if that's true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to MongoDB 6
4 participants