- 23 4月, 2019 11 次提交
-
-
由 Eileen M. Uchitelle 提交于
Use ActiveJob 5.2 retry logic for old jobs
-
由 Abhay Nikam 提交于
-
由 Ryuta Kamizono 提交于
Deprecate `where.not` working as NOR and will be changed to NAND in Rails 6.1
-
由 Xavier Noria 提交于
[Matilda Smeds & Xavier Noria]
-
由 Xavier Noria 提交于
This commit more or less undoes 9b5401fc, restores autoloaded? not to touch the descendants tracker, and autoloaded_constants because it is documented in the guide.
-
由 John Hawthorn 提交于
Rails 6 introduces retries per-exception, instead of a global count of retries. Because ActiveJob 5.2 doesn't serialize the execution count per-exception, when ActiveJob 6.0 picks up an "old" job it can't know the exception count in the new format. This can also be an issue if AJ 6.0 serializes a new job with exception_executions which is later picked up by AJ 5.2, which would clear exception_executions (since it has no knowledge of it). Previously we handled this by resetting exception_executions, if it wasn't defined on a job, which could result in the worst case retrying the job 2x the times we should. This commit changes how we handle loading a legacy job: instead of resetting exception_executions, we instead will always use the global executions count. This way, jobs which only have one retry_on (and didn't have a behaviour change in AJ 6) are backwards-and-forwards-compatible with counts respected exactly. Jobs with multiple retry_on will revert to the AJ5.2 behaviour if they were ever run under AJ5.2.
-
由 Rafael França 提交于
Revert "Include Caching module for ActionController::API"
-
由 Rafael França 提交于
-
由 Guillermo Iguaran 提交于
Include Caching module for ActionController::API
-
由 Kasper Timm Hansen 提交于
In Rails updating an Active Storage relation will now replace the entire association instead of merely adding to it. https://github.com/rails/rails/issues/35817#issuecomment-485512520 Fixes #35817 cc @georgeclaghorn
-
由 Guillermo Iguaran 提交于
-
- 22 4月, 2019 13 次提交
-
-
由 Javan Makhmali 提交于
- Allow configuring the sanitizer and its options - Split attachment rendering and sanitizing helpers so each can be overridden by applications
-
由 Ryuta Kamizono 提交于
-
由 Blake Stoddard 提交于
Support all Redis features without needing to maintain a list of valid options that must stay in sync with the upstream client library.
-
由 Ryuta Kamizono 提交于
Related 0ee96d13.
-
由 Ryuta Kamizono 提交于
PERF: 20% faster pk attribute access
-
由 Eileen M. Uchitelle 提交于
Update changelog to explain the fix of #35114 [ci skip]
-
由 Eileen M. Uchitelle 提交于
Make system tests take failed screenshots in `before_teardown` hook
-
由 Ryuta Kamizono 提交于
Those helper methods makes relation values access 15% slower. https://gist.github.com/kamipo/e64439f7a206e1c5b5c69d92d982828e Before (02b5b8cb): ``` Warming up -------------------------------------- #limit_value 237.074k i/100ms #limit_value = 1 222.052k i/100ms Calculating ------------------------------------- #limit_value 6.477M (± 2.9%) i/s - 32.479M in 5.019475s #limit_value = 1 5.297M (± 4.3%) i/s - 26.424M in 4.999933s ``` After (this change): ``` Warming up -------------------------------------- #limit_value 261.109k i/100ms #limit_value = 1 239.646k i/100ms Calculating ------------------------------------- #limit_value 7.412M (± 1.6%) i/s - 37.077M in 5.003345s #limit_value = 1 6.134M (± 1.0%) i/s - 30.675M in 5.000908s ```
-
由 Ryuta Kamizono 提交于
I've realized that `user.id` is 20% slower than `user.name` in the benchmark (https://github.com/rails/rails/pull/35987#issuecomment-483882480). The reason that performance difference is that `self.class.primary_key` method call is a bit slow. Avoiding that method call will make almost attribute access faster and `user.id` will be completely the same performance with `user.name`. Before (02b5b8cb): ``` Warming up -------------------------------------- user.id 140.535k i/100ms user['id'] 96.549k i/100ms user.name 158.110k i/100ms user['name'] 94.507k i/100ms user.changed? 19.003k i/100ms user.saved_changes? 25.404k i/100ms Calculating ------------------------------------- user.id 2.231M (± 0.9%) i/s - 11.243M in 5.040066s user['id'] 1.310M (± 1.3%) i/s - 6.565M in 5.012607s user.name 2.683M (± 1.2%) i/s - 13.439M in 5.009392s user['name'] 1.322M (± 0.9%) i/s - 6.615M in 5.003239s user.changed? 201.999k (±10.9%) i/s - 1.007M in 5.091195s user.saved_changes? 258.214k (±17.1%) i/s - 1.245M in 5.007421s ``` After (this change): ``` Warming up -------------------------------------- user.id 158.364k i/100ms user['id'] 106.412k i/100ms user.name 158.644k i/100ms user['name'] 107.518k i/100ms user.changed? 19.082k i/100ms user.saved_changes? 24.886k i/100ms Calculating ------------------------------------- user.id 2.768M (± 1.1%) i/s - 13.936M in 5.034957s user['id'] 1.507M (± 2.1%) i/s - 7.555M in 5.017211s user.name 2.727M (± 1.5%) i/s - 13.643M in 5.004766s user['name'] 1.521M (± 1.3%) i/s - 7.634M in 5.018321s user.changed? 200.865k (±11.1%) i/s - 992.264k in 5.044868s user.saved_changes? 269.652k (±10.5%) i/s - 1.344M in 5.077972s ```
-
由 Ryuta Kamizono 提交于
It was never used from the beginning.
-
由 George Claghorn 提交于
ActiveStorage - normalize the hash of transformations
-
由 George Claghorn 提交于
Allow ActiveStorage to generate variants of BMP images
-
由 Younes SERRAJ 提交于
-
- 21 4月, 2019 6 次提交
-
-
由 Ryuta Kamizono 提交于
Avoid method call if `@transaction_state` is not finalized
-
由 Ryuta Kamizono 提交于
Method call in Ruby is a bit slow. This makes attribute access 10% faster by avoiding method call (`sync_with_transaction_state`). Before (96cf7e0e): ``` Warming up -------------------------------------- user.id 131.291k i/100ms user['id'] 91.786k i/100ms user.name 151.605k i/100ms user['name'] 92.664k i/100ms user.changed? 17.772k i/100ms user.saved_changes? 23.909k i/100ms Calculating ------------------------------------- user.id 1.988M (± 7.0%) i/s - 9.978M in 5.051474s user['id'] 1.155M (± 5.8%) i/s - 5.783M in 5.022672s user.name 2.450M (± 4.3%) i/s - 12.280M in 5.021234s user['name'] 1.263M (± 2.1%) i/s - 6.394M in 5.066638s user.changed? 175.070k (±13.3%) i/s - 853.056k in 5.011555s user.saved_changes? 259.114k (±11.8%) i/s - 1.267M in 5.001260s ``` After (this change): ``` Warming up -------------------------------------- user.id 137.625k i/100ms user['id'] 96.054k i/100ms user.name 156.379k i/100ms user['name'] 94.795k i/100ms user.changed? 18.172k i/100ms user.saved_changes? 24.337k i/100ms Calculating ------------------------------------- user.id 2.201M (± 0.5%) i/s - 11.010M in 5.002955s user['id'] 1.320M (± 1.0%) i/s - 6.628M in 5.021293s user.name 2.677M (± 1.6%) i/s - 13.449M in 5.024399s user['name'] 1.314M (± 1.8%) i/s - 6.636M in 5.051444s user.changed? 190.588k (±11.1%) i/s - 944.944k in 5.065848s user.saved_changes? 262.782k (±12.1%) i/s - 1.290M in 5.028080s ```
-
由 Kasper Timm Hansen 提交于
Fix typo by changing 'for' to 'from'
-
由 Saheed Oladele 提交于
-
由 Richard Macklin 提交于
Previously we were calling the `take_failed_screenshot` method in an `after_teardown` hook. However, this means that other teardown hooks have to be executed before we take the screenshot. Since there can be dynamic updates to the page after the assertion fails and before we take a screenshot, it seems desirable to minimize that gap as much as possible. Taking the screenshot in a `before_teardown` rather than an `after_teardown` helps with that, and has a side benefit of allowing us to remove the nested `ensure` commented on here: https://github.com/rails/rails/pull/34411#discussion_r232819478
-
由 प्रथमेश Sonpatki 提交于
-
- 20 4月, 2019 10 次提交
-
-
由 Yi Feng 提交于
-
由 Ryuta Kamizono 提交于
Change the deprecation message for dynamic routes segment to 6.1
-
由 Gannon McGibbon 提交于
[#35782] Allow loading seeds without ActiveJob (~> 5.2.3)
-
由 Gannon McGibbon 提交于
ActiveJob time argument assertion documentation
-
由 Abhay Nikam 提交于
-
由 yuuji.yaginuma 提交于
With 8b4d3448, `test_required_polymorphic_belongs_to_generates_correct_model` and `test_required_and_polymorphic_are_order_independent` are completely same. Also, remove `required` from test name because that not passed to generator.
-
由 Abhay Nikam 提交于
-
由 eileencodes 提交于
This was accidentally left in, the standard `db:migrate:up` doesn't have a description so `db:migrate:up:namespace` shouldn't have one either.
-
由 Eileen M. Uchitelle 提交于
Handle up/down for multiple databases
-
由 eileencodes 提交于
This change adds the ability to run up/down for a database in a multi-db environment. If you have an app with a primary and animals database the following tasks will be generated: ``` VERSION=123 rake db:migrate:up:primary VERSION=123 rake db:migrate:up:primary VERSION=123 rake db:migrate:down:primary VERSION=123 rake db:migrate:up:animals ``` I didn't generate descriptions with them since we don't generate a description for a single database application. In addition to this change I've made it so if your application has multiple databases Rails will raise if you try to run `up` or `down` without a namespace. This is because we don't know which DB you want to run `up` or `down` against unless the app tells us, so it's safer to just block it and recommend using namespaced versions of up/down respectively. The output for the raise looks like: ``` You're using a multiple database application. To use `db:migrate:down` you must run the namespaced task with a VERSION. Available tasks are db:migrate:down:primary and db:migrate:down:animals. ```
-