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

Return command error from findAndModify #2646

Merged
merged 17 commits into from
May 19, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented May 17, 2023

Description

Closes #1903.

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.

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #2646 (2106ffa) into main (faddeeb) will decrease coverage by 36.27%.
The diff coverage is 3.52%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2646       +/-   ##
===========================================
- Coverage   63.19%   26.92%   -36.27%     
===========================================
  Files         432      432               
  Lines       21971    21958       -13     
===========================================
- Hits        13885     5913     -7972     
- Misses       7151    15441     +8290     
+ Partials      935      604      -331     
Impacted Files Coverage Δ
internal/handlers/common/findandmodify.go 0.00% <0.00%> (-92.66%) ⬇️
internal/handlers/common/params.go 3.81% <0.00%> (-86.68%) ⬇️
internal/handlers/common/update.go 0.00% <0.00%> (-85.92%) ⬇️
internal/handlers/commonerrors/error.go 0.00% <ø> (-80.00%) ⬇️
internal/handlers/commonerrors/errorcode_string.go 80.00% <ø> (ø)
internal/handlers/pg/msg_findandmodify.go 0.00% <0.00%> (-78.32%) ⬇️
internal/handlers/pg/msg_update.go 0.00% <0.00%> (-63.21%) ⬇️
internal/handlers/tigris/msg_findandmodify.go 0.00% <0.00%> (ø)
internal/handlers/tigris/msg_update.go 0.00% <0.00%> (ø)
internal/handlers/commonparams/extract_params.go 74.44% <100.00%> (-7.72%) ⬇️

... and 133 files with indirect coverage changes

Flag Coverage Δ
integration 5.11% <0.00%> (-51.38%) ⬇️
mongodb 5.11% <0.00%> (+0.07%) ⬆️
pg ?
unit 25.37% <3.52%> (+0.02%) ⬆️

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

@mergify
Copy link
Contributor

mergify bot commented May 17, 2023

@chilagrow this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label May 17, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label May 17, 2023
@chilagrow chilagrow changed the title lower case findandmodify works findAndModify returns command error May 17, 2023
@chilagrow chilagrow added the code/bug Some user-visible feature works incorrectly label May 17, 2023
@chilagrow chilagrow marked this pull request as ready for review May 17, 2023 10:22
@chilagrow chilagrow requested a review from a team as a code owner May 17, 2023 10:22
@chilagrow chilagrow requested review from AlekSi and w84thesun May 17, 2023 10:22
@chilagrow chilagrow enabled auto-merge (squash) May 17, 2023 10:22
@chilagrow chilagrow requested review from a team, rumyantseva and noisersup May 17, 2023 10:22
integration/findandmodify_test.go Outdated Show resolved Hide resolved
internal/handlers/commonparams/extract_params.go Outdated Show resolved Hide resolved
@AlekSi AlekSi added this to the Next milestone May 17, 2023
@chilagrow chilagrow changed the title findAndModify returns command error Return command error from findAndModify May 18, 2023
@chilagrow chilagrow requested a review from AlekSi May 18, 2023 08:05
Copy link
Contributor

@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.

I like the changes! There is more consistency here and the tests look very helpful!

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 👍

@chilagrow chilagrow merged commit bd5274f into FerretDB:main May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/bug Some user-visible feature works incorrectly
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

findAndModify returns wrong error type
4 participants