-
Notifications
You must be signed in to change notification settings - Fork 409
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
Implement $unset
aggregation pipeline stage
#2676
Implement $unset
aggregation pipeline stage
#2676
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2676 +/- ##
==========================================
+ Coverage 63.91% 64.00% +0.08%
==========================================
Files 442 443 +1
Lines 22602 22658 +56
==========================================
+ Hits 14447 14502 +55
- Misses 7207 7208 +1
Partials 948 948
... and 1 file with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. |
a6c9810
to
c47c2c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for contributing!
I see the PR is a draft, but the review was requested, so I leave some comments.
I like the implementation, but I suggest making some additions in tests (see my comments), so we can reveal some problems or errors that need special handling.
Could you also run task lint
please? We have some specific rules to format code, it helps us keep the code consistent.
@shibasisp Any news? Anything we could help with? |
Apologies for the delay. @AlekSi I will be addressing the comments by this weekend. |
@shibasisp this pull request has merge conflicts. |
7adb488
to
857d46b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not compile
$unset
aggregation pipeline pipeline stage
$unset
aggregation pipeline pipeline stage$unset
aggregation pipeline stage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for contributing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! The logic here looks good to me. I would only suggest to add a comment as it's not clear at the first glance that ProjectionDocument
would use exclusion and not inclusion for sure.
Also we might add 3 test cases for $unset field to make a code coverage slightly better:
- empty array
- empty string
- array with empty string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the last couple of tests to cover error codes fully!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the last couple of tests to cover error codes fully!
Head branch was pushed to by a user without write access
0d66ee9
to
265458f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for your amazing contribution 🤗
Description
Closes #1432 .
Implemented
$unset
aggregation pipeline. Currently this works with:Readiness checklist
task all
, and it passed.@FerretDB/core
), Labels, Project and project's Sprint fields.