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

Handle $type aggregation operator errors properly #2829

Merged
merged 47 commits into from
Jun 16, 2023

Conversation

noisersup
Copy link
Member

@noisersup noisersup commented Jun 13, 2023

Description

Closes #2678.

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.

@mergify
Copy link
Contributor

mergify bot commented Jun 13, 2023

⚠️ The sha of the head commit of this PR conflicts with #2789. Mergify cannot evaluate rules on this PR. ⚠️

@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #2829 (bfa1070) into main (de32c1c) will decrease coverage by 4.45%.
The diff coverage is 73.78%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2829      +/-   ##
==========================================
- Coverage   63.65%   59.20%   -4.45%     
==========================================
  Files         447      448       +1     
  Lines       22747    22818      +71     
==========================================
- Hits        14480    13510     -970     
- Misses       7309     8315    +1006     
- Partials      958      993      +35     
Impacted Files Coverage Δ
...regations/stages/projection/projection_iterator.go 88.88% <0.00%> (-11.12%) ⬇️
internal/handlers/common/projection.go 59.94% <ø> (-28.58%) ⬇️
internal/handlers/commonerrors/error.go 70.00% <ø> (-10.00%) ⬇️
internal/handlers/commonerrors/errorcode_string.go 80.00% <ø> (ø)
...andlers/common/aggregations/operators/operators.go 73.33% <66.66%> (+1.11%) ⬆️
...nal/handlers/common/aggregations/operators/type.go 79.71% <70.00%> (+14.13%) ⬆️
...ommon/aggregations/stages/projection/projection.go 84.98% <77.50%> (-0.62%) ⬇️
.../common/aggregations/operators/operators_errors.go 100.00% <100.00%> (ø)

... and 48 files with indirect coverage changes

Flag Coverage Δ
integration 51.91% <73.78%> (-4.76%) ⬇️
mongodb 4.27% <0.00%> (-0.02%) ⬇️
pg 51.76% <73.78%> (-4.83%) ⬇️
shard-1 43.19% <0.00%> (-0.14%) ⬇️
shard-2 ?
shard-3 43.69% <73.78%> (+0.13%) ⬆️
unit 24.78% <0.00%> (-0.09%) ⬇️

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

@noisersup noisersup self-assigned this Jun 13, 2023
@mergify
Copy link
Contributor

mergify bot commented Jun 13, 2023

@noisersup this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Jun 13, 2023
@noisersup noisersup added code/chore Code maintenance improvements area/aggregations Issues about aggregation pipelines labels Jun 14, 2023
@noisersup noisersup requested review from a team and rumyantseva June 14, 2023 20:08
@noisersup noisersup enabled auto-merge (squash) June 14, 2023 20:18
@mergify
Copy link
Contributor

mergify bot commented Jun 14, 2023

@noisersup this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Jun 14, 2023
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Let's add integration tests for newly added error messages 🤗

@mergify mergify bot removed the conflict PRs that have merge conflicts label Jun 15, 2023
@noisersup noisersup requested a review from chilagrow June 15, 2023 14:16
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Please see the previous comments, some where not applied, so I think there was some reason that I don't know 🤔

My most important comments are about untested code

@noisersup noisersup requested a review from chilagrow June 16, 2023 01:54
chilagrow
chilagrow previously approved these changes Jun 16, 2023
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Looks good, I left comments unresolved for super minor issues. Great work!

Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

🚀

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

@noisersup noisersup merged commit 846c0b9 into FerretDB:main Jun 16, 2023
@noisersup noisersup deleted the target-aggregation-2678-2 branch June 16, 2023 10:18
@AlekSi AlekSi added this to the v1.4.0 milestone Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/aggregations Issues about aggregation pipelines code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement $type aggregation operator
4 participants