Conversation
| config.active_record.dump_schema_after_migration = false | ||
|
|
||
| # Only use :id for inspections in production. | ||
| config.active_record.attributes_for_inspect = [ :id ] |
There was a problem hiding this comment.
This is a new default config.
I am not sure about this one, we need to analyze the code to see if it may cause some issues.
For console usage it's not a problem, because there is #full_inspect method that ignores attributes_for_inspect.
However, if we rely on #inspect somewhere, we might need to comment this out.
|
|
||
| # Specify the PID file. Defaults to tmp/pids/server.pid in development. | ||
| # In other environments, only set the PID file if requested. | ||
| pidfile ENV["PIDFILE"] if ENV["PIDFILE"] |
There was a problem hiding this comment.
This is new, but I think it's harmless, and can actually be useful.
| # Any libraries that use a connection pool or another resource pool should | ||
| # be configured to provide at least as many connections as the number of | ||
| # threads. This includes Active Record's `pool` parameter in `database.yml`. | ||
| threads_count = ENV.fetch("RAILS_MAX_THREADS", 5) |
There was a problem hiding this comment.
The new default is 3, see https://guides.rubyonrails.org/7_2_release_notes.html#set-a-new-default-for-the-puma-thread-count
Maybe we should change our default too? 🤔
|
|
||
| ::Sidekiq::Testing.inline! do | ||
| provider.destroy! | ||
| # Prevent exception when deserializing ProviderDomainsChangedEvent with a non-existing (destroyed) provider |
There was a problem hiding this comment.
I believe this is a global issue, in fact, that happens in production. I opened a Jira for investigating and fixing this: https://issues.redhat.com/browse/THREESCALE-12414
I am not sure why it was not manifesting previously, but I guess it could be because of the following change in Rails 7.2:
https://guides.rubyonrails.org/7_2_release_notes.html#prevent-jobs-from-being-scheduled-within-transactions
Probably, because of the fact that now the jobs are deferred until after the transactions is committed, when the job is being processed, the provider object is no longer in the DB, while previously, I guess the job was executed immediately, while the object was still present.
❌ 1 blocking issue (1 total)
|
| CHARGE_PRECISION = 2 | ||
|
|
||
| enum creation_type: {manual: 'manual', background: 'background'} | ||
| enum :creation_type, { manual: 'manual', background: 'background' } |
There was a problem hiding this comment.
DEPRECATION WARNING: Defining enums with keyword arguments is deprecated and will be removed
in Rails 8.0. Positional arguments should be used instead:
enum :creation_type, {:manual=>"manual", :background=>"background"}
(called from <class:Invoice> at /home/dmayorov/Projects/3scale/porta/app/models/invoice.rb:14)
| include SystemName | ||
|
|
||
| enum account_type: {developer: 'developer', provider: 'provider'} | ||
| enum :account_type, { developer: 'developer', provider: 'provider' } |
There was a problem hiding this comment.
DEPRECATION WARNING: Defining enums with keyword arguments is deprecated and will be removed
in Rails 8.0. Positional arguments should be used instead:
enum :account_type, {:developer=>"developer", :provider=>"provider"}
(called from <class:AuthenticationProvider> at /home/dmayorov/Projects/3scale/porta/app/models/authentication_provider.rb:13)
| buyer = FactoryBot.create(:simple_buyer) | ||
| buyer.update(nil) | ||
| assert_nothing_raised do | ||
| buyer.update(nil) |
There was a problem hiding this comment.
Test is missing assertions: `test_update_with_nil_as_param_should_not_raise_error` /home/dmayorov/Projects/3scale/porta/test/unit/account_test.rb:107
| new_org_name = 'account is not readonly' | ||
| @named_scoped_provider.update(org_name: new_org_name) | ||
|
|
||
| assert_equal new_org_name, @named_scoped_provider.reload.org_name |
There was a problem hiding this comment.
Test is missing assertions: `test_providers_named_scope_return_non-readonly_objects` /home/dmayorov/Projects/3scale/porta/test/unit/account_test.rb:153
What this PR does / why we need it:
Upgrade Rails version to v7.2.
Which issue(s) this PR fixes
https://issues.redhat.com/browse/THREESCALE-12076
Verification steps
Special notes for your reviewer: