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

Use stringer for "enums" #2144

Merged
merged 9 commits into from
Mar 10, 2023
Merged

Use stringer for "enums" #2144

merged 9 commits into from
Mar 10, 2023

Conversation

AlekSi
Copy link
Member

@AlekSi AlekSi commented Mar 6, 2023

Description

Makes debugging easier.

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), Assignee, 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 Mar 6, 2023
@AlekSi AlekSi added this to the v1.0.0 GA milestone Mar 6, 2023
@AlekSi AlekSi requested a review from a team as a code owner March 6, 2023 14:30
@AlekSi AlekSi self-assigned this Mar 6, 2023
@AlekSi AlekSi requested review from w84thesun, rumyantseva, chilagrow, a team and noisersup March 6, 2023 14:30
@AlekSi AlekSi enabled auto-merge (squash) March 6, 2023 14:31
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #2144 (264eaa4) into main (3e2a5ae) will increase coverage by 8.12%.
The diff coverage is 47.82%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2144      +/-   ##
==========================================
+ Coverage   61.97%   70.09%   +8.12%     
==========================================
  Files         364      366       +2     
  Lines       16814    16822       +8     
==========================================
+ Hits        10420    11792    +1372     
+ Misses       5517     4001    -1516     
- Partials      877     1029     +152     
Impacted Files Coverage Δ
internal/types/document_validation.go 100.00% <ø> (ø)
internal/types/documentpatherrorcode_string.go 0.00% <0.00%> (ø)
internal/types/path.go 95.19% <ø> (ø)
internal/types/validationerrorcode_string.go 0.00% <0.00%> (ø)
internal/handlers/common/update.go 88.39% <100.00%> (-0.06%) ⬇️

... and 57 files with indirect coverage changes

Flag Coverage Δ
integration 65.88% <47.82%> (+11.80%) ⬆️
mongodb 5.32% <0.00%> (-0.01%) ⬇️
pg 53.93% <47.82%> (-0.06%) ⬇️
tigris 45.64% <47.82%> (?)
unit 27.52% <0.00%> (-0.20%) ⬇️

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

rumyantseva
rumyantseva previously approved these changes Mar 6, 2023
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.

Looks reasonable to me (the linter complains a bit as it wants all the error codes mentioned explicitly in the switch).

noisersup
noisersup previously approved these changes Mar 6, 2023
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.

LGTM

chilagrow
chilagrow previously approved these changes Mar 7, 2023
w84thesun
w84thesun previously approved these changes Mar 9, 2023
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.

Looks good, although the linter complains about that switch statement.

@AlekSi AlekSi added the no ci label Mar 10, 2023
@AlekSi AlekSi dismissed stale reviews from w84thesun, chilagrow, noisersup, and rumyantseva via 795d680 March 10, 2023 07:17
@AlekSi AlekSi removed the no ci label Mar 10, 2023
@AlekSi AlekSi requested review from noisersup, w84thesun, rumyantseva, chilagrow and a team March 10, 2023 07:17
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

@AlekSi AlekSi merged commit 6082cbd into FerretDB:main Mar 10, 2023
@AlekSi AlekSi deleted the stringer branch March 10, 2023 11:09
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
None yet
Development

Successfully merging this pull request may close these issues.

5 participants