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

Relax restrictions when _id is not the first field in projection #3491

Merged
merged 7 commits into from
Oct 5, 2023

Conversation

princejha95
Copy link
Contributor

@princejha95 princejha95 commented Oct 3, 2023

Description

Closes #2826.

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • 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), Milestone (Next), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@AlekSi AlekSi added the code/bug Some user-visible feature works incorrectly label Oct 4, 2023
@AlekSi AlekSi requested review from a team, chilagrow and noisersup October 4, 2023 04:17
@AlekSi AlekSi added this to the Next milestone Oct 4, 2023
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Merging #3491 (c38478e) into main (f1a1b5b) will decrease coverage by 3.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3491      +/-   ##
==========================================
- Coverage   73.96%   70.91%   -3.05%     
==========================================
  Files         426      426              
  Lines       26856    26858       +2     
==========================================
- Hits        19863    19047     -816     
- Misses       5815     6584     +769     
- Partials     1178     1227      +49     
Files Coverage Δ
internal/handlers/common/projection.go 89.05% <100.00%> (+0.05%) ⬆️

... and 44 files with indirect coverage changes

Flag Coverage Δ
filter-true 64.96% <100.00%> (-3.15%) ⬇️
hana-1 ?
integration 64.96% <100.00%> (-3.15%) ⬇️
mongodb-1 4.57% <0.00%> (-0.01%) ⬇️
pg-1 39.32% <100.00%> (-0.61%) ⬇️
pg-2 42.39% <0.00%> (-0.01%) ⬇️
pg-3 42.90% <0.00%> (+0.75%) ⬆️
postgresql-1 ?
postgresql-2 ?
postgresql-3 ?
sort-false 64.96% <100.00%> (-3.15%) ⬇️
sqlite-1 38.37% <100.00%> (-0.70%) ⬇️
sqlite-2 ?
sqlite-3 ?
unit 25.59% <0.00%> (-0.01%) ⬇️

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

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.

Thanks for adding test 🤗 Let's check response against expected value 🤗

integration/query_projection_test.go Outdated Show resolved Hide resolved
integration/query_projection_test.go Outdated Show resolved Hide resolved
integration/query_projection_test.go Show resolved Hide resolved
@AlekSi AlekSi removed their request for review October 4, 2023 05:02
chilagrow
chilagrow previously approved these changes Oct 5, 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 great! Thank you for the contribution 🤗

@chilagrow chilagrow requested a review from a team October 5, 2023 05:36
@chilagrow chilagrow enabled auto-merge (squash) October 5, 2023 05:38
AlekSi
AlekSi previously approved these changes Oct 5, 2023
@rumyantseva rumyantseva dismissed stale reviews from chilagrow and AlekSi via c38478e October 5, 2023 15:24
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.

LGTM! Thanks for contributing.

@chilagrow chilagrow merged commit e5e2485 into FerretDB:main Oct 5, 2023
29 of 33 checks passed
@princejha95 princejha95 deleted the relax_restrict branch October 5, 2023 16:37
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.

Relax restrictions when _id is not the first field in projection
4 participants