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

Ignore Stable API fields #4067

Merged
merged 2 commits into from
Aug 19, 2024
Merged

Ignore Stable API fields #4067

merged 2 commits into from
Aug 19, 2024

Conversation

Evengard
Copy link
Contributor

@Evengard Evengard commented Feb 12, 2024

Description

When using the StableAPI, clients sends along an apiVersion and some other fields, which aren't recognized by FerretDB. Otherwise the command is fine. Just ignoring them seems to work fine. Tested with MongoDB.Driver (C#) 2.23.1

Mimicked the LSID ignore code, except defined the actual string and bool types for them.

Closes #3121.

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 community Issues and PRs assigned to community members label Feb 15, 2024
Copy link
Member

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

We should do FerretDB/dance#769 first

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.58%. Comparing base (ba46217) to head (2d4224b).
Report is 11 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4067      +/-   ##
==========================================
- Coverage   75.71%   73.58%   -2.13%     
==========================================
  Files         304      304              
  Lines       21620    21620              
==========================================
- Hits        16370    15910     -460     
- Misses       4112     4592     +480     
+ Partials     1138     1118      -20     
Files Coverage Δ
internal/handler/common/count.go 100.00% <ø> (ø)
internal/handler/common/delete_params.go 100.00% <ø> (ø)
internal/handler/common/distinct.go 82.45% <ø> (ø)
internal/handler/common/explain.go 77.77% <ø> (ø)
internal/handler/common/find.go 100.00% <ø> (ø)
internal/handler/common/findandmodify.go 78.43% <ø> (ø)
internal/handler/common/insert.go 100.00% <ø> (ø)
internal/handler/common/update_params.go 100.00% <ø> (ø)

... and 37 files with indirect coverage changes

Flag Coverage Δ
filter-false ?
filter-true 67.33% <ø> (-4.20%) ⬇️
hana-1 ?
integration 67.33% <ø> (-4.25%) ⬇️
mongodb-1 5.74% <ø> (-0.01%) ⬇️
mysql-1 ?
mysql-2 ?
mysql-3 ?
postgresql-1 44.94% <ø> (-8.86%) ⬇️
postgresql-2 43.37% <ø> (-8.85%) ⬇️
postgresql-3 39.81% <ø> (-13.17%) ⬇️
postgresql-4 42.31% <ø> (-0.07%) ⬇️
postgresql-5 42.36% <ø> (-0.07%) ⬇️
sqlite-1 43.80% <ø> (-8.73%) ⬇️
sqlite-2 42.36% <ø> (-8.69%) ⬇️
sqlite-3 38.79% <ø> (-12.97%) ⬇️
sqlite-4 41.33% <ø> (-0.04%) ⬇️
sqlite-5 41.21% <ø> (ø)
unit 31.13% <ø> (ø)

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

@AlekSi AlekSi added this to the v1.23.0 milestone Jul 1, 2024
@AlekSi AlekSi removed this from the Next milestone Jul 24, 2024
Copy link
Contributor

mergify bot commented Jul 24, 2024

@Evengard this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Jul 24, 2024
# Conflicts:
#	internal/handler/common/insert.go
@mergify mergify bot removed the conflict PRs that have merge conflicts label Aug 19, 2024
@AlekSi AlekSi added this to the Next milestone Aug 19, 2024
@AlekSi AlekSi merged commit 95b184f into FerretDB:main Aug 19, 2024
28 of 47 checks passed
@AlekSi
Copy link
Member

AlekSi commented Aug 19, 2024

Thank you!

@AlekSi AlekSi changed the title Ignore apiVersion field from StableAPI Ignore apiVersion field from StableAPI Aug 28, 2024
@AlekSi AlekSi added the code/bug Some user-visible feature works incorrectly label Aug 28, 2024
@AlekSi AlekSi changed the title Ignore apiVersion field from StableAPI Ignore Stable API fields Aug 28, 2024
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 community Issues and PRs assigned to community members
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

We should ignore Stable API / apiVersion / strict parameters
2 participants