fiber
fiber copied to clipboard
🐛 fix: actual error not forwarded if request is not timed out.
Forwarded the actual error if request succeeds/fails in given timeout window.
fixes #1496
Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
@akshaybharambe14 can you provide a test for this customization so we can make sure the workflow works as intended?
I checked existing tests and all were commented out. Anyways, I will add tests.
ok thx you can also try to reactivate the tests, I think someone had deactivated them because of the stability, we would have to try to get them back, best as stable as possible
Yup, I will work on that this weekend.
@akshaybharambe14 any progress ?
Yes, I added some test cases but but the result is not consistent. Same test that passed previously, might fail in next run. This is because of the select block. Example - If we have a handler that takes 3ms and timeout is set for 5ms, we will still get timeout error in some cases.
This could be the reason for commenting out the test cases.
@akshaybharambe14 We had the same problems with the caching middleware
Cause is that the github processes or the language is always different speed
I have stabilized this by choosing the times more generously, so that the process has enough room to fluctuate
Can you try this here also, gladly also mark as parallel, if that was not made
Thank you @ReneWerner87 for these insights. I will try to implement the suggestions.
Hi @ReneWerner87, I have added tests. Please have a look.
Thx
Had you looked to see if you could correct the other commented out ones as well?
please check the data race
@akshaybharambe14 please check the race condition
think this is because of the access to the parameters, if the request is reused, you can't access the parameters anymore
I will check that @ReneWerner87.
@ReneWerner87, is there any way to copy ctx?
Seems like, we need to copy Ctx fields.
@ReneWerner87, is there any way to copy ctx?
Seems like, we need to copy Ctx fields.
@akshaybharambe14 not really, but you are welcome to provide a function that can do that, I think something like that would be helpful
@akshaybharambe14
@akshaybharambe14 do you have time to look at the problem again?
When will this issue be resolved and released?
Fixed by https://github.com/gofiber/fiber/pull/2090