| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
from text/html to text/plain. (#31212)
|
| |_|_|_|_|_|/ / /
|/| | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix unstable test test_delegate_socket_errors_to_on_error_handler
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I often face the following error when running test/connection/client_socket_test.rb:
```
$ bin/test test/connection/client_socket_test.rb:38
Run options: --seed 44035
# Running:
F
Failure:
ActionCable::Connection::ClientSocketTest#test_delegate_socket_errors_to_on_error_handler
[/app/actioncable/test/connection/client_socket_test.rb:47]:
--- expected
+++ actual
@@ -1 +1 @@
-["foo"]
+["Broken pipe", "Broken pipe", "Broken pipe", "foo"]
```
It can be reproduced easily by applying the following patch:
```
diff --git a/actioncable/test/connection/client_socket_test.rb b/actioncable/test/connection/client_socket_test.rb
index 2051216010..6bb9f13ea7 100644
--- a/actioncable/test/connection/client_socket_test.rb
+++ b/actioncable/test/connection/client_socket_test.rb
@@ -34,7 +34,8 @@ def on_error(message)
@server.config.allowed_request_origins = %w( http://rubyonrails.com )
end
- test "delegate socket errors to on_error handler" do
+ 1000.times do |i|
+ test "delegate socket errors to on_error handler #{i}" do
run_in_eventmachine do
connection = open_connection
@@ -47,6 +48,7 @@ def on_error(message)
assert_equal %w[ foo ], connection.errors
end
end
+ end
test "closes hijacked i/o socket at shutdown" do
run_in_eventmachine do
```
The cause is writing io from different thread at the same time.
`connection.process` sends handshake message from [StreamEventLoop's thread][] whereas
`connection.handle_open` sends welcome message from current thread.
[StreamEventLoop's thread]: https://github.com/rails/rails/blob/067fc779c4560fff4812614a2f78f9248f3e55f8/actioncable/lib/action_cable/connection/stream_event_loop.rb#L75
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
yahonda/attributes_before_type_cast_on_boolean_with_jruby
No difference between JRuby and CRuby at test_read_attributes_before_…
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
test_read_attributes_before_type_cast_on_a_boolean
https://github.com/jruby/activerecord-jdbc-adapter ActiveRecord JDBC Adapter is actively developed
and it supports Rails 5.1 now. This pull request addresses one of the failure when running
ActiveRecord unit tests with ActiveRecord JDBC Adapter.
As of right now, ActiveRecord JDBC Adapter supports Rails 5.1, not master branch
then this test only can run on `5-1-stable` branch. But I have opened this pull request to `master` branch
since this type cast should be going to work in the future versions of ActiveRecord JDBC Adapter .
```ruby
$ ARCONN=jdbcmysql bin/test test/cases/attribute_methods_test.rb:203
Using jdbcmysql
Run options: --seed 8874
F
Finished in 0.709120s, 1.4102 runs/s, 1.4102 assertions/s.
1) Failure:
AttributeMethodsTest#test_read_attributes_before_type_cast_on_a_boolean [/home/yahonda/git/rails/activerecord/test/cases/attribute_methods_test.rb:203]:
Expected: "0"
Actual: 0
1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
$
```
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Update Action Cable Overview Guide [ci skip]
|
| | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Fix CustomUrls#direct doc formatting
|
|/ / / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Particularly, the bulleted list was getting formatted as a code block because of the extra level of indentation. Pulling it back to the left makes it render properly as a list instead.
[ci skip]
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Update incorrect backtick usage in RDoc to teletype
|
| |/ / / / / / / / /
| | | | | | | | | |
| | | | | | | | | | |
[ci skip]
|
|/ / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix generator suggestion raise error when I18n.available_locales don’t include :en
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
include :en
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
by default
|
|/ / / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
FIX: `rack-test` 0.7.1 probably got yanked.
|
|/ / / / / / / / |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
`em-hiredis` is unused since 48766e32d31651606b9f68a16015ad05c3b0de2c
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Permit creating a record and attaching files in a single step.
# Before:
User.create!(user_params.except(:avatar)).tap do |user|
user.avatar.attach(user_params[:avatar])
end
# After:
User.create!(user_params)
[Yoshiyuki Hirano & George Claghorn]
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Support `expires_in` in `ActiveSupport::Cache::MemCacheStore#increment`
and `#decrement`.
Closes #30716.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Disable CSRF protection for ActiveStorage::DiskController#update. The local disk service is intended to imitate a third-party service like S3 or GCS, so we don't care where direct uploads originate: they’re authorized by signed tokens.
Closes #30290.
[Shinichi Maeshima & George Claghorn]
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Pass over Execution guide[ci skip]
|
|/ / / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
[ci skip] Added example for using headless_chrome with SystemTest
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
ActionDispatch::SystemTestCase
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Closes #31164.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
These extra `spawn` are called via `klass.all` and `klass.all` is called
everywhere in the internal. Avoiding the extra `spawn` makes` klass.all`
30% faster for STI classes.
https://gist.github.com/kamipo/684d03817a8115848cec8e8b079560b7
```
Warming up --------------------------------------
fast relation 4.410k i/100ms
slow relation 3.334k i/100ms
Calculating -------------------------------------
fast relation 47.373k (± 5.2%) i/s - 238.140k in 5.041836s
slow relation 35.757k (±15.9%) i/s - 176.702k in 5.104625s
Comparison:
fast relation: 47373.2 i/s
slow relation: 35756.7 i/s - 1.32x slower
```
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
https://travis-ci.org/rails/rails/jobs/304428814#L1977
|
| |_|_|_|_|_|/ /
|/| | | | | | |
| | | | | | | |
| | | | | | | | |
Due to https://github.com/rack-test/rack-test/commit/5fd3631078e7c73aaed7d4371f70fb2a79384be9.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
`keys_to_names` is used only for `keys_to_names.keys`.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Ref: https://travis-ci.org/rails/rails/jobs/303840778#L1974
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Since fbd1e98cf983572ca9884f17f933ffe92833632a, Rails plugin does not
run `bundle install` when generating.
Therefore, `after_bundle` callback is not actually executed after `bundle`.
Since there is a difference between the name and the actual behavior,
I think that should be remove.
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Prevent deadlocks with load interlock and DB lock.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This fixes an issue where competing threads deadlock each other.
- Thread A holds the load interlock but is blocked on getting the DB lock
- Thread B holds the DB lock but is blocked on getting the load interlock (for example when there is a `Model.transaction` block that needs to autoload)
This solution allows for dependency loading in other threads while a thread is waiting to acquire the DB lock.
Fixes #31019
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Switch to LIFO for the connection pool
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Using a FIFO for the connection pool can lead to issues when there are
upstream components (pgbouncer, haproxy, etc.) that terminate
connections that are idle after a period of time. Switching to a LIFO
reduces the probability that a thread will checkout a connection that is
about to be closed by an idle timeout in an upstream component.
|
|\ \ \ \ \ \ \ \ \
| |_|_|_|/ / / / /
|/| | | | | | | | |
Enable query cache on all connection pools
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Since the query cache no longer eagerly checks out a connection, we can
enable it on all connection pools at the start of every request, and it
will only take effect for requests that actually use those pools.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Document public hooks in AS::Reloader
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
https://github.com/resque/resque-scheduler/pull/620 is merged
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Fix links [ci skip]
|
|/ / / / / / / / / / |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
`_update_record` (#29999)
Currently `_create_record` and `_update_record` in `Persistence` are
creating extra `unscoped` and calling `build_arel` in the relation. But
`compile_insert` and `compile_update` can be done without those
expensive operation for `SelectManager` creation. So I moved the
implementation to `Persistence` to avoid creating extra relation and
refactored to avoid calling `build_arel`.
https://gist.github.com/kamipo/8ed73d760112cfa5f6263c9413633419
Before:
```
Warming up --------------------------------------
_update_record 150.000 i/100ms
Calculating -------------------------------------
_update_record 1.548k (±12.3%) i/s - 7.650k in 5.042603s
```
After:
```
Warming up --------------------------------------
_update_record 201.000 i/100ms
Calculating -------------------------------------
_update_record 2.002k (±12.8%) i/s - 9.849k in 5.027681s
```
30% faster for STI classes.
|