fix: Throw error if Context is http Context#856
Conversation
|
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #856 +/- ##
=======================================
Coverage 67.54% 67.54%
=======================================
Files 151 151
Lines 10343 10343
=======================================
Hits 6986 6986
Misses 2990 2990
Partials 367 367 ☔ View full report in Codecov by Sentry. |
| } | ||
|
|
||
| func (r *Orm) WithContext(ctx context.Context) contractsorm.Orm { | ||
| if http, ok := ctx.(httpcontract.Context); ok { |
There was a problem hiding this comment.
I reproduced it, do you know what the root reason is, please?
There was a problem hiding this comment.
Don't know exactly, but I think due to Race Condition in fiber ctx is Done and become nil
There was a problem hiding this comment.
After doing some debug the issue only occured with fiber not with gin also if we comment this return will work fine
https://github.com/goravel/fiber/blob/master/context.go#L111. @hwbrzzl
📑 Description
https://github.com/goravel/fiberrun stress test like wrk
wrk -t12 -c400 -d40s http://127.0.0.1:3000/users@coderabbitai summary
✅ Checks