-
Notifications
You must be signed in to change notification settings - Fork 154
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
chore: use correct synatx for rack-timeout for ruby 3 #395
Conversation
Thanks for the pull request, @ghassanmas! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
75fbfeb
to
e7f557c
Compare
0fab65e
to
41946be
Compare
@ghassanmas Thanks for catching and fixing this issue! @xitij2000 recently finalised his ruby3 PR -- can you rebase and address my comment above? |
53684c1
to
712a8bd
Compare
@mtyaka the rebase is done, though I couldn't see your comments. |
@@ -12,10 +12,6 @@ | |||
|
|||
puts "Loading config.ru." | |||
|
|||
require "rack-timeout" | |||
use Rack::Timeout # Call as early as possible so rack-timeout runs before other middleware. | |||
Rack::Timeout.timeout = 20 |
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.
@ghassanmas I believe removing all of this code completely disables rack-timeout. According to the docs, we should keep these two lines:
require "rack-timeout"
use Rack::Timeout
and only remove the last one. That will initialise rack-timeout with a timeout value from the RACK_TIMEOUT_SERVICE_TIMEOUT
environment variable. If the environment variable is not present, it will default to 15 seconds.
Sorry about that @ghassanmas, I forgot to publish the comment, but I published it now. |
Also update readmde about how to update the rack-timeout
@mtyaka I resolved your comment and pushed, but I am still testing it... I had to push it so bceause the test enviroment can pick up that commit given its not same as my local... |
Tested all good!. |
Codecov ReportBase: 96.08% // Head: 96.06% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## kshitij/ruby3 #395 +/- ##
=================================================
- Coverage 96.08% 96.06% -0.03%
=================================================
Files 58 58
Lines 4522 4469 -53
=================================================
- Hits 4345 4293 -52
+ Misses 177 176 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
712a8bd
to
0cf3536
Compare
I've incorporated this commit into my ruby 3 upgrade PR since without that the forum service is broken on unicorn. |
c713baa
to
30220dc
Compare
@ghassanmas Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future. |
In order to resolve the following error:
I have to change config.ru file following the documenation at https://github.com/zombocom/rack-timeout#sinatra-and-other-rack-appsI couldn't change using the doc, I got an error execption, so I only way I was able to change it is to use ENV varaible.