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

Improve bson2 and wire logging #4148

Merged
merged 31 commits into from Mar 12, 2024
Merged

Improve bson2 and wire logging #4148

merged 31 commits into from Mar 12, 2024

Conversation

AlekSi
Copy link
Member

@AlekSi AlekSi commented Mar 5, 2024

Description

Closes #3759.

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 not ready Issues that are not ready to be worked on; PRs that should skip CI label Mar 5, 2024
@AlekSi AlekSi self-assigned this Mar 5, 2024
@AlekSi AlekSi added this to the Next milestone Mar 7, 2024
@AlekSi AlekSi added code/chore Code maintenance improvements and removed not ready Issues that are not ready to be worked on; PRs that should skip CI labels Mar 7, 2024
@AlekSi AlekSi marked this pull request as ready for review March 7, 2024 08:05
@AlekSi AlekSi requested a review from a team as a code owner March 7, 2024 08:05
@AlekSi AlekSi requested a review from rumyantseva March 7, 2024 08:05
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 67.41214% with 102 lines in your changes are missing coverage. Please review.

Project coverage is 73.77%. Comparing base (f460194) to head (959ea3f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4148      +/-   ##
==========================================
- Coverage   74.67%   73.77%   -0.90%     
==========================================
  Files         353      354       +1     
  Lines       22797    23012     +215     
==========================================
- Hits        17024    16978      -46     
- Misses       4481     4738     +257     
- Partials     1292     1296       +4     
Files Coverage Δ
internal/bson2/bson2.go 84.37% <ø> (ø)
internal/bson2/raw_document.go 84.00% <100.00%> (+0.43%) ⬆️
internal/util/testutil/dump.go 54.28% <100.00%> (+27.01%) ⬆️
internal/bson2/document.go 62.85% <60.00%> (+11.38%) ⬆️
internal/wire/op_reply.go 57.14% <81.81%> (+0.69%) ⬆️
internal/bson2/raw_array.go 30.30% <0.00%> (-1.96%) ⬇️
internal/wire/op_query.go 50.00% <69.23%> (+0.61%) ⬆️
internal/bson2/array.go 63.15% <64.70%> (+0.65%) ⬆️
internal/bson2/logging.go 92.64% <92.64%> (ø)
internal/wire/op_msg.go 63.27% <52.63%> (-4.52%) ⬇️
... and 1 more

... and 31 files with indirect coverage changes

Flag Coverage Δ
filter-false ?
filter-true 66.77% <50.82%> (-1.70%) ⬇️
hana-1 ?
integration 66.77% <50.82%> (-1.73%) ⬇️
mongodb-1 4.85% <0.00%> (-0.04%) ⬇️
mysql-1 ?
mysql-2 ?
mysql-3 ?
postgresql-1 48.11% <50.82%> (-0.42%) ⬇️
postgresql-2 46.94% <50.00%> (-0.41%) ⬇️
postgresql-3 49.24% <50.82%> (-0.43%) ⬇️
sqlite-1 47.25% <50.82%> (-0.37%) ⬇️
sqlite-2 46.08% <50.00%> (-0.43%) ⬇️
sqlite-3 48.41% <50.82%> (-0.43%) ⬇️
unit 32.84% <67.41%> (+0.36%) ⬆️

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

chilagrow
chilagrow previously approved these changes Mar 7, 2024
Copy link
Contributor

@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.

The log format is easy to read 🤗

chilagrow
chilagrow previously approved these changes Mar 7, 2024
internal/bson2/logging.go Outdated Show resolved Hide resolved
@AlekSi
Copy link
Member Author

AlekSi commented Mar 8, 2024

TestCheckingNestedDocuments fails hard, and the test itself is broken

@AlekSi AlekSi added the not ready Issues that are not ready to be worked on; PRs that should skip CI label Mar 11, 2024
@AlekSi AlekSi removed the not ready Issues that are not ready to be worked on; PRs that should skip CI label Mar 12, 2024
@AlekSi AlekSi requested review from henvic, chilagrow and a team March 12, 2024 05:24
internal/bson2/logging.go Show resolved Hide resolved
@AlekSi AlekSi disabled auto-merge March 12, 2024 07:10
@AlekSi AlekSi merged commit 4281187 into FerretDB:main Mar 12, 2024
29 checks passed
@AlekSi AlekSi deleted the wire-logs branch March 12, 2024 07:10
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.

Support lazy BSON decoding
3 participants