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

Add common backend interface prototype #2619

Merged
merged 14 commits into from
May 17, 2023
Merged

Conversation

AlekSi
Copy link
Member

@AlekSi AlekSi commented May 12, 2023

Description

Closes #1095.

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.

@AlekSi AlekSi added code/chore Code maintenance improvements not ready Issues that are not ready to be worked on; PRs that should skip CI labels May 12, 2023
@AlekSi AlekSi added this to the Next milestone May 12, 2023
@AlekSi AlekSi self-assigned this May 12, 2023
@AlekSi AlekSi removed the not ready Issues that are not ready to be worked on; PRs that should skip CI label May 16, 2023
@AlekSi AlekSi marked this pull request as ready for review May 16, 2023 18:53
@AlekSi AlekSi requested a review from a team as a code owner May 16, 2023 18:53
@AlekSi AlekSi requested review from w84thesun and chilagrow and removed request for chilagrow May 16, 2023 18:53
@AlekSi AlekSi enabled auto-merge (squash) May 16, 2023 18:53
@AlekSi AlekSi requested a review from chilagrow May 16, 2023 18:53
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #2619 (e4aaffa) into main (2619638) will decrease coverage by 0.15%.
The diff coverage is 9.09%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2619      +/-   ##
==========================================
- Coverage   28.31%   28.17%   -0.15%     
==========================================
  Files         421      429       +8     
  Lines       20820    20930     +110     
==========================================
+ Hits         5896     5897       +1     
- Misses      14325    14432     +107     
- Partials      599      601       +2     
Impacted Files Coverage Δ
internal/backends/backend.go 0.00% <0.00%> (ø)
internal/backends/collection.go 0.00% <0.00%> (ø)
internal/backends/database.go 0.00% <0.00%> (ø)
internal/backends/sqlite/backend.go 0.00% <0.00%> (ø)
internal/backends/sqlite/collection.go 0.00% <0.00%> (ø)
internal/backends/sqlite/database.go 0.00% <0.00%> (ø)
internal/handlers/registry/sqlite.go 16.66% <ø> (ø)
internal/handlers/sjson/sjson.go 80.00% <ø> (ø)
internal/handlers/sqlite/sqlite.go 0.00% <0.00%> (ø)
internal/backends/error.go 23.33% <23.33%> (ø)
... and 1 more

... and 2 files with indirect coverage changes

Flag Coverage Δ
integration 5.30% <0.00%> (-0.03%) ⬇️
mongodb 5.30% <0.00%> (-0.03%) ⬇️
unit 26.65% <9.09%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out 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.

Those contracts are still a new thing for me but the rest looks nice and tidy!

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.

I like the separation of backend, database and collection.

@AlekSi AlekSi merged commit 1d81e46 into FerretDB:main May 17, 2023
@AlekSi AlekSi deleted the backend-interface branch May 17, 2023 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Design and prototype common storage interface
3 participants