-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
v3: Fix issue with default logger when creating RequestCtx #3134
Conversation
WalkthroughThe changes introduce a new Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3134 +/- ##
==========================================
+ Coverage 80.13% 80.19% +0.05%
==========================================
Files 117 117
Lines 9047 9048 +1
==========================================
+ Hits 7250 7256 +6
+ Misses 1363 1360 -3
+ Partials 434 432 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- middleware/adaptor/adaptor.go (2 hunks)
- middleware/adaptor/adaptor_test.go (5 hunks)
Additional context used
GitHub Check: codecov/patch
middleware/adaptor/adaptor.go
[warning] 19-19: middleware/adaptor/adaptor.go#L19
Added line #L19 was not covered by tests
Additional comments not posted (3)
middleware/adaptor/adaptor.go (1)
17-20
: LGTM!The
disableLogger
type with an emptyPrintf
method is a clean way to implement a no-op logger for suppressing unwanted logs. This aligns with the PR objective of preventing logs for missing static files.Tools
GitHub Check: codecov/patch
[warning] 19-19: middleware/adaptor/adaptor.go#L19
Added line #L19 was not covered by testsmiddleware/adaptor/adaptor_test.go (2)
89-89
: LGTM!Initializing the
fasthttp.RequestCtx
with a disabled logger in the test should help prevent unwanted logging of errors, aligning with the PR objective.
415-418
: LGTM!The changes to the benchmark functions to include a new case for handling requests with no body content look good. Creating an empty buffer when
bodyContent
is nil ensures that the case is handled correctly and prevents potential nil pointer dereferences. This improves the robustness of the benchmarks.Also applies to: 457-464, 490-493, 531-539
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50
.
Benchmark suite | Current: 60e065a | Previous: 0ef8d71 | Ratio |
---|---|---|---|
BenchmarkAppendMsgitem - MB/s |
3220.88 MB/s |
1834.64 MB/s |
1.76 |
BenchmarkAppendMsgitem - MB/s |
2876.25 MB/s |
1834.64 MB/s |
1.57 |
This comment was automatically generated by workflow using github-action-benchmark.
@gaby |
@gaby should we do it in another PR ? then its separated |
LOL! 😂 Yeah we should rename that, let do a commit here |
Actually those are auto generated |
lets move this discussion to discord |
Description
Noop Logger
when creating RequestCtx for Adaptor Middleware.No Content
.Fixes #3130