| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
:tada::tada::tada:
|
|
|
|
|
|
| |
* Add backticks
* Expand tabs
* Fix indentation
|
|\
| |
| | |
Allow for custom handling of exceptions that are discarded
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Since #25037, `queue_adapter=` simply delegates to `interpret_adapter`
only.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently, sidekiq integration test + Ruby 2.5.0-rc1 show exception as follows.
```
#<Thread:0x000000000670bec0@/home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.0.5/lib/sidekiq/util.rb:23 run> terminated with exception (report_on_exception is true):
/home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.1.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `block in load_missing_constant': uninitialized constant Sidekiq::CLI (NameError)
from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.1.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.1.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `rescue in load_missing_constant'
from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.1.7/lib/bootsnap/load_path_cache/core_ext/active_support.rb:42:in `load_missing_constant'
from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.0.5/lib/sidekiq/launcher.rb:65:in `heartbeat'
from /home/travis/build/rails/rails/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.0.5/lib/sidekiq/launcher.rb:123:in `start_heartbeat'
```
https://travis-ci.org/rails/rails/jobs/317187279#L2152
The reason for this is that `Sidekiq::CLI` has not been loaded.
Sidekiq integration test launches a Sidekiq instance within
another Ruby process. In such a case, need to require 'sidekiq/cli'
in that launch code.
Ref: https://github.com/mperham/sidekiq/pull/3692#issuecomment-352032251
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`BigDecimal.new` has been deprecated in BigDecimal 1.3.3
which will be a default for Ruby 2.5.
Refer
https://github.com/ruby/bigdecimal/commit/533737338db915b00dc7168c3602e4b462b23503
* This commit has been made as follows:
```
cd rails
git grep -l BigDecimal.new | grep -v guides/source/5_0_release_notes.md | grep -v activesupport/test/xml_mini_test.rb | xargs sed -i -e "s/BigDecimal.new/BigDecimal/g"
```
- `activesupport/test/xml_mini_test.rb`
Editmanually to remove `.new` and `::`
- guides/source/5_0_release_notes.md
This is a Rails 5.0 release notes.
|
| | |
| | |
| | |
| | | |
Follow up of #31432.
|
| |/
|/|
| |
| |
| | |
* I think it's better to have a leading space after the `#`
denoting the start of the comment.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1) It seems that it raise error on example code in `ActiveJob::Core`.
Before:
```ruby
class DeliverWebhookJob < ActiveJob::Base
def serialize
super.merge('attempt_number' => (@attempt_number || 0) + 1)
end
def deserialize(job_data)
super
@attempt_number = job_data['attempt_number']
end
rescue_from(Timeout::Error) do |exception|
raise exception if @attempt_number > 5
retry_job(wait: 10)
end
def perform
raise Timeout::Error
end
end
```
Then it run `DeliverWebhookJob.perform_now` in `rails console`. And raise error:
NoMethodError: undefined method `>' for nil:NilClass
from /app/jobs/deliver_webhook_job.rb:12:in `block in <class:DeliverWebhookJob>'
So I thought it's necessary to fix it.
After:
```ruby
class DeliverWebhookJob < ActiveJob::Base
attr_writer :attempt_number
def attempt_number
@attempt_number ||= 0
end
def serialize
super.merge('attempt_number' => attempt_number + 1)
end
def deserialize(job_data)
super
self.attempt_number = job_data['attempt_number']
end
rescue_from(Timeout::Error) do |exception|
raise exception if attempt_number > 5
retry_job(wait: 10)
end
def perform
raise Timeout::Error
end
end
```
Then it run `DeliverWebhookJob.perform_now` in `rails console`. And it does'nt raise error NoMethodError.
2) Use `Timeout::Error` instead of `TimeoutError` (`TimeoutError` is deprecated).
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
ActiveJob wraps every adapter into its own class, that is later passed
into DelayedJob which is responsible for displaying all the logs.
This change improves the logging so we can easily trace executed
jobs and see meaningful information in the logs.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make clear that the files are not to be run for interpreters.
Fixes #23847.
Fixes #30690.
Closes #23878.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since 8f2490b, the integration test of sidekiq and resque is not working
in CI.
https://travis-ci.org/rails/rails/jobs/301276197#L2055
https://travis-ci.org/rails/rails/jobs/301276197#L2061
Because 8f2490b removed password from `redis-server`.
So must also remove passwords from these tests.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Omit `rails activestorage:install` for jdbcmysql, jdbc and shebang tests
AppGeneratorTest#test_config_jdbcmysql_database
rails aborted!
LoadError: Could not load 'active_record/connection_adapters/mysql_adapter'.
Make sure that the adapter in config/database.yml is valid.
If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add
the necessary adapter gem to the Gemfile.
(compressed)
bin/rails:4:in `<main>'
Tasks: TOP => activestorage:install => environment
(See full trace by running task with --trace)
AppGeneratorTest#test_config_jdbc_database
rails aborted!
LoadError: Could not load 'active_record/connection_adapters/jdbc_adapter'.
Make sure that the adapter in config/database.yml is valid.
If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add
the necessary adapter gem to the Gemfile.
(compressed)
bin/rails:4:in `<main>'
Tasks: TOP => activestorage:install => environment
(See full trace by running task with --trace)
AppGeneratorTest#test_shebang_is_added_to_rails_file
/home/ubuntu/.rbenv/versions/2.4.1/bin/ruby: no Ruby script found in input (LoadError)
Prevent PendingMigrationError in tests
* Run `bin/rails db:migrate RAILS_ENV=test` in test_cases before start tests to prevent PendingMigrationError
* FileUtils.rm_r("db/migrate")
* --skip-active-storage
Fix failed tests in `railties/test/railties/engine_test.rb`
Related to #30111
Imporve `SharedGeneratorTests#test_default_frameworks_are_required_when_others_are_removed`
- Explicitly skip active_storage
- Ensure that skipped frameworks are commented
- Ensure that default frameworks are not commented
Fix error `Errno::ENOSPC: No space left on device - sendfile`
Since `rails new` runs `rails active_storage:install`
that boots an app.
Since adding Bootsnap 0312a5c67e35b960e33677b5358c539f1047e4e1
during booting an app, it creates the cache:
264K tmp/cache/bootsnap-load-path-cache
27M tmp/cache/bootsnap-compile-cache
* teardown_app must remove app
|
| | |
|
|\ \
| | |
| | | |
Remove CHANGELOG entry for the change that was backported to 5-1-stable [ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
skip]
- It was backported in
https://github.com/rails/rails/commit/0eae8dd4b859c109919e5da0d6e74ffc6dc8a258
and is present in Rails 5.1.3
|
|/ /
| |
| |
| | |
This basically reverts fef234f1f0a238c2277459652861144ae89501ff
|
|\ \
| | |
| | | |
Yield with an error instance instead of error class
|
| | | |
|
| |/ |
|
|/
|
|
|
|
|
|
| |
* Use `gem 'redis', '~> 4.0'` for new app Gemfiles
* Loosen Action Cable redis-rb dep to `>= 3.3, < 5`
* Bump redis-namespace for looser Redis version dep
* Avoid using the underlying `redis.client` directly
* Use `Redis.new` instead of `Redis.connect`
|
| |
|
| |
|
| |
|
|
|
|
| |
Since 673606a, it holds adapter name.
|
| |
|
| |
|
|
|
|
|
| |
If the argument is invalid, I think that it is more intuitive to use
`ArgumentError` than its own error class.
|
|
|
|
|
|
|
|
|
| |
This fixes the following warnings:
```
rails/activejob/lib/active_job/test_helper.rb:119: warning: circular argument reference - except
rails/activejob/lib/active_job/test_helper.rb:166: warning: circular argument reference - except
```
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Since f55ecc6, the integration test of sidekiq and resque is not working
in CI.
https://travis-ci.org/rails/rails/jobs/251783876
Because f55ecc6 required a password to access redis.
Therefore, handling by passing passwords when connecting to redis.
|
| |
|
| |
|
|\
| |
| | |
Add source code and changelog links to gemspecs
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
The dummy application is created under the tmp directory. Nothing is
created in the `test/dummy` directory.
https://github.com/rails/rails/blob/40bdbce191ad90dfea43dad51fac5c4726b89392/activejob/test/support/integration/helper.rb#L9
I guess that this comment makes it unnecessary.
https://github.com/rails/rails/pull/16541#r16986711
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Allow a default value to be declared for class_attribute
* Convert to using class_attribute default rather than explicit setter
* Removed instance_accessor option by mistake
* False is a valid default value
* Documentation
|
|
|
|
|
| |
`delayed_job_active_record` 4.1.2 supports Rails 5.1.
Ref: https://github.com/collectiveidea/delayed_job_active_record/pull/138
|