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

Disallow capped collection creation when disabled #3636

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Conversation

AlekSi
Copy link
Member

@AlekSi AlekSi commented Oct 24, 2023

Description

Plus a small refactoring.

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/chore Code maintenance improvements label Oct 24, 2023
@AlekSi AlekSi added this to the Next milestone Oct 24, 2023
@AlekSi AlekSi self-assigned this Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #3636 (d8dfbbf) into main (78e2090) will decrease coverage by 0.17%.
Report is 1 commits behind head on main.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3636      +/-   ##
==========================================
- Coverage   62.06%   61.89%   -0.17%     
==========================================
  Files         430      430              
  Lines       27886    27887       +1     
==========================================
- Hits        17308    17262      -46     
- Misses       9541     9585      +44     
- Partials     1037     1040       +3     
Files Coverage Δ
internal/backends/postgresql/metadata/metadata.go 62.66% <ø> (ø)
internal/backends/postgresql/metadata/registry.go 70.83% <100.00%> (+0.09%) ⬆️
internal/backends/sqlite/metadata/registry.go 69.67% <100.00%> (-1.49%) ⬇️
internal/backends/database.go 97.26% <50.00%> (ø)
internal/handlers/sqlite/msg_create.go 81.05% <60.00%> (-3.65%) ⬇️

... and 10 files with indirect coverage changes

Flag Coverage Δ
filter-true 58.49% <76.92%> (-0.24%) ⬇️
hana-1 ?
integration 58.49% <76.92%> (-0.24%) ⬇️
mongodb-1 4.42% <0.00%> (-0.01%) ⬇️
postgresql-1 42.92% <23.07%> (+<0.01%) ⬆️
postgresql-2 40.23% <53.84%> (-0.03%) ⬇️
postgresql-3 42.53% <46.15%> (-0.05%) ⬇️
sort-false 58.49% <76.92%> (-0.24%) ⬇️
sqlite-1 42.32% <23.07%> (+<0.01%) ⬆️
sqlite-2 39.71% <53.84%> (+0.02%) ⬆️
sqlite-3 ?
unit 22.70% <30.76%> (+0.01%) ⬆️

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

@AlekSi AlekSi marked this pull request as ready for review October 24, 2023 09:50
@AlekSi AlekSi requested a review from a team as a code owner October 24, 2023 09:50
@AlekSi AlekSi enabled auto-merge (squash) October 24, 2023 09:50
@AlekSi AlekSi requested review from a team and noisersup October 24, 2023 09:51
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 this

internal/handlers/sqlite/msg_create.go Show resolved Hide resolved
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

The Capped() function looks more clear, LGTM

@AlekSi AlekSi merged commit 689c4b0 into FerretDB:main Oct 24, 2023
24 of 26 checks passed
@AlekSi AlekSi deleted the capped branch October 24, 2023 10:32
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.

3 participants