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

Improve validation for createIndexes and dropIndexes #2884

Merged
merged 20 commits into from
Jun 27, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Jun 23, 2023

Description

Closes #2311.

This does not move all error compat test cases to integration test case yet. Let's handle that separately.

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@chilagrow chilagrow self-assigned this Jun 23, 2023
@chilagrow chilagrow added the code/enhancement Some user-visible feature could work better label Jun 23, 2023
@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Merging #2884 (4836871) into main (4768f47) will decrease coverage by 5.93%.
The diff coverage is 96.38%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2884      +/-   ##
==========================================
- Coverage   63.75%   57.83%   -5.93%     
==========================================
  Files         451      451              
  Lines       23701    23847     +146     
==========================================
- Hits        15110    13791    -1319     
- Misses       7623     9089    +1466     
+ Partials      968      967       -1     
Impacted Files Coverage Δ
internal/handlers/commonerrors/error.go 80.00% <ø> (ø)
internal/handlers/commonerrors/errorcode_string.go 80.00% <ø> (ø)
internal/handlers/pg/msg_createindexes.go 86.19% <96.22%> (+8.64%) ⬆️
internal/handlers/pg/msg_dropindexes.go 70.28% <100.00%> (-17.81%) ⬇️

... and 53 files with indirect coverage changes

Flag Coverage Δ
integration 50.81% <96.38%> (-6.25%) ⬇️
mongodb 4.34% <0.00%> (-0.03%) ⬇️
pg 50.70% <96.38%> (-6.28%) ⬇️
shard-1 41.96% <71.68%> (-0.27%) ⬇️
shard-2 ?
shard-3 42.90% <80.72%> (+1.97%) ⬆️
unit 24.13% <0.00%> (-0.16%) ⬇️

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

@mergify
Copy link
Contributor

mergify bot commented Jun 23, 2023

@chilagrow this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Jun 23, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Jun 26, 2023
@chilagrow chilagrow changed the title Implement validation for createIndexes and dropIndexes Improve validation for createIndexes and dropIndexes Jun 26, 2023
@chilagrow chilagrow marked this pull request as ready for review June 26, 2023 11:23
@chilagrow chilagrow requested a review from a team as a code owner June 26, 2023 11:23
@chilagrow chilagrow requested review from AlekSi, w84thesun and a team June 26, 2023 11:23
@AlekSi AlekSi added this to the Next milestone Jun 26, 2023
@chilagrow chilagrow enabled auto-merge (squash) June 26, 2023 11:24
Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

Overall looks good, added a couple of comments about error formatting.

internal/handlers/pg/msg_createindexes.go Outdated Show resolved Hide resolved
internal/handlers/pg/msg_createindexes.go Outdated Show resolved Hide resolved
internal/handlers/pg/msg_createindexes.go Outdated Show resolved Hide resolved
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

LGTM, although one test need to be fixed

@chilagrow chilagrow requested review from w84thesun and noisersup June 27, 2023 04:57
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

LGTM!

@AlekSi AlekSi removed their request for review June 27, 2023 06:50
@AlekSi
Copy link
Member

AlekSi commented Jun 27, 2023

Up for @rumyantseva and @w84thesun

Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

LGTM!

@chilagrow chilagrow merged commit a15bb13 into FerretDB:main Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/enhancement Some user-visible feature could work better
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement proper validation for createIndexes and dropIndexes
4 participants