Skip to content

THREESCALE-14262 - deploy runs seed on empty database#4265

Merged
akostadinov merged 1 commit into3scale:masterfrom
akostadinov:deploy-seed
Apr 9, 2026
Merged

THREESCALE-14262 - deploy runs seed on empty database#4265
akostadinov merged 1 commit into3scale:masterfrom
akostadinov:deploy-seed

Conversation

@akostadinov
Copy link
Copy Markdown
Contributor

If seeding fails for example because seed password was weak, then currently for a customer it would be a mess to recover from this situation. They will need to clear the database completely.

Not we detect empty database and run the seed on startup.

My tests show that original behavior doesn't change.

I notice a problem though, the code reads to me as if it should work even if the database (not the server, just the database) is not created yet and will try to create. But on postgres at least, if database doesn't exist, db:deploy fails. This is no change from current behavior though so I'm leaving it for another life.

@akostadinov akostadinov requested a review from a team April 1, 2026 14:48
Copy link
Copy Markdown
Contributor

@jlledom jlledom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested. But I trust you

@urbanikb
Copy link
Copy Markdown

urbanikb commented Apr 8, 2026

I have tested with configuration where master password was set to invalid value and the seed was failing, but a re-run of the deploy task simply passed without an issue:

Run 1:

libjemalloc.so.2 (libc6,x86-64) => /usr/local/lib64/libjemalloc.so.2
csv was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add csv to your Gemfile or gemspec to silence this warning.
I, [2026-04-08T14:18:11.620411 #2]  INFO -- : ActiveMerchant MODE set to 'production'
I, [2026-04-08T14:18:11.795029 #2]  INFO -- : [Core] Using http://backend-listener:3000/internal/ as URL
W, [2026-04-08T14:18:12.790908 #2]  WARN -- : OpenIdAuthentication.store is nil. Using in-memory store.
W, [2026-04-08T14:18:12.794339 #2]  WARN -- [Bugsnag]: No valid API key has been set, notifications will not be sent
Database 'dev' already exists
Backend Internal API version 3.4.3 status: ok
Connected to mysql2://root@system-mysql.3scale-abc.svc.cluster.local/dev
Connected to redis://system-redis.3scale-abc.svc.cluster.local:6379/1
Recreating procedures, see log/production.log
Recreated 1 procedures
Recreating trigger, see log/production.log
Recreated 78 triggers
[EventBroker] notifying subscribers of Domains::ProviderDomainsChangedEvent b22b5534-1e02-4194-be1c-bcf5bdca97b0
[EventBroker] notifying subscribers of ZyncEvent 87744ca3-1ac1-4972-b82a-7d3740158fcf
[EventBroker] notifying subscribers of Accounts::AccountStateChangedEvent c0547b37-8f98-4e90-95b7-c5c9e4ab69da
[EventBroker] notifying subscribers of NotificationEvent 287b8024-763c-4276-8d9a-c581d4fe2c27
2026-04-08T14:19:54.811Z pid=2 tid=6ga INFO: Sidekiq 7.3.2 connecting to Redis with options {:size=>10, :pool_name=>"internal", :db=>"1", :url=>"redis://system-redis.3scale-abc.svc.cluster.local:6379/1"}
rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Password is too short (minimum is 15 characters) (ActiveRecord::RecordInvalid)
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/validations.rb:84:in `raise_validation_error'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/validations.rb:55:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:313:in `block in save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:365:in `block in with_transaction_returning_status'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:361:in `with_transaction_returning_status'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:313:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/suppressor.rb:56:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:515:in `block in save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:530:in `block in around_save'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:150:in `block in run_actions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:170:in `catch_exceptions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:148:in `run_actions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:133:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:212:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block (2 levels) in perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `catch'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block in perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:186:in `within_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:62:in `perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:530:in `around_save'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:515:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:371:in `insert_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/has_many_association.rb:63:in `insert_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:52:in `block (2 levels) in create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:462:in `replace_on_target'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:278:in `add_to_target'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:50:in `block in create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:212:in `transaction'
/opt/system/lib/deadlock_retry.rb:52:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:314:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:49:in `create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:38:in `create!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:86:in `create!'
/opt/system/db/seeds.rb:64:in `block in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:212:in `transaction'
/opt/system/lib/deadlock_retry.rb:52:in `transaction'
/opt/system/db/seeds.rb:5:in `<top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `load'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `block in load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/execution_wrapper.rb:92:in `wrap'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:649:in `block (2 levels) in <class:Engine>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:130:in `instance_exec'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:141:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/tasks/database_tasks.rb:487:in `load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/railties/databases.rake:405:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/db.rake:20:in `block (3 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/db.rake:5:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/openshift.rake:5:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:58:in `load'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:23:in `run'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:455:in `exec'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:35:in `dispatch'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:29:in `start'
/usr/share/gems/gems/bundler-2.5.22/exe/bundle:28:in `block in <top (required)>'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/share/gems/gems/bundler-2.5.22/exe/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
[ActiveJob] Enqueued ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper#56c7db1966c390cec02d887e with args: [{"job_class"=>"PublishEnabledChangedEventForProviderApplicationsWorker", "job_id"=>"52f46be3-3068-49e6-9029-3be9d6e2c964", "provider_job_id"=>nil, "queue_name"=>"default", "priority"=>nil, "arguments"=>[{"_aj_globalid"=>"gid://system/Account/1"}, "created"], "executions"=>0, "exception_executions"=>{}, "locale"=>"en", "timezone"=>"UTC", "enqueued_at"=>"2026-04-08T14:19:54.811320153Z", "scheduled_at"=>nil}]
[ActiveJob] Enqueued PublishEnabledChangedEventForProviderApplicationsWorker (Job ID: 52f46be3-3068-49e6-9029-3be9d6e2c964) to Sidekiq(default) with arguments: #<GlobalID:0x00007f20fedfcd90 @uri=#<URI::GID gid://system/Account/1>>, "created"

Run 2:

libjemalloc.so.2 (libc6,x86-64) => /usr/local/lib64/libjemalloc.so.2
csv was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add csv to your Gemfile or gemspec to silence this warning.
I, [2026-04-08T14:20:16.683247 #2] INFO -- : ActiveMerchant MODE set to 'production'
I, [2026-04-08T14:20:16.868195 #2] INFO -- : [Core] Using http://backend-listener:3000/internal/ as URL
W, [2026-04-08T14:20:17.825181 #2] WARN -- : OpenIdAuthentication.store is nil. Using in-memory store.
W, [2026-04-08T14:20:17.828007 #2] WARN -- [Bugsnag]: No valid API key has been set, notifications will not be sent
Backend Internal API version 3.4.3 status: ok
Connected to mysql2://root@system-mysql.3scale-abc.svc.cluster.local/dev
Connected to redis://system-redis.3scale-abc.svc.cluster.local:6379/1

What I expected was the run 2 to re-try the migration and keep failing until I fix the password.

@akostadinov
Copy link
Copy Markdown
Contributor Author

@urbanikb I will try to replicate locally exactly what you have done to replicate because simulated failure locally showed me the correct result. Could you just positively check you are running the correct image :)

@urbanikb
Copy link
Copy Markdown

urbanikb commented Apr 8, 2026

@urbanikb I will try to replicate locally exactly what you have done to replicate because simulated failure locally showed me the correct result. Could you just positively check you are running the correct image :)

Thanks for the prompt - the image that ran was indeed :latest, I'll look into why the CR image was ignored, will check back in shortly.

@urbanikb
Copy link
Copy Markdown

urbanikb commented Apr 8, 2026

False alarm - the test with the actual image works as expected, subsequent runs error out.

Run 1

	libjemalloc.so.2 (libc6,x86-64) => /usr/local/lib64/libjemalloc.so.2
csv was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add csv to your Gemfile or gemspec to silence this warning.
I, [2026-04-08T14:53:11.235670 #2]  INFO -- : ActiveMerchant MODE set to 'production'
I, [2026-04-08T14:53:11.410763 #2]  INFO -- : [Core] Using http://backend-listener:3000/internal/ as URL
W, [2026-04-08T14:53:12.335261 #2]  WARN -- : OpenIdAuthentication.store is nil. Using in-memory store.
W, [2026-04-08T14:53:12.338097 #2]  WARN -- [Bugsnag]: No valid API key has been set, notifications will not be sent
Database 'dev' already exists
Backend Internal API version 3.4.3 status: ok
Connected to mysql2://root@system-mysql.3scale-parallel.svc.cluster.local/dev
Connected to redis://system-redis.3scale-parallel.svc.cluster.local:6379/1
Recreating procedures, see log/production.log
Recreated 1 procedures
Recreating trigger, see log/production.log
Recreated 78 triggers
[EventBroker] notifying subscribers of Domains::ProviderDomainsChangedEvent 0013f4af-73a3-475e-a1c3-05cf66d86324
[EventBroker] notifying subscribers of ZyncEvent 1df58664-0251-408d-8747-e52a63cf0e16
[EventBroker] notifying subscribers of Accounts::AccountStateChangedEvent 52ee8e1b-7b16-44aa-92a9-59c925a7fca2
[EventBroker] notifying subscribers of NotificationEvent d13a418c-7630-4e12-9f57-f5d8ba2e8218
2026-04-08T14:55:05.440Z pid=2 tid=6ga INFO: Sidekiq 7.3.2 connecting to Redis with options {:size=>10, :pool_name=>"internal", :db=>"1", :url=>"redis://system-redis.3scale-parallel.svc.cluster.local:6379/1"}
rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Password is too short (minimum is 15 characters) (ActiveRecord::RecordInvalid)
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/validations.rb:84:in `raise_validation_error'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/validations.rb:55:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:313:in `block in save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:365:in `block in with_transaction_returning_status'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:361:in `with_transaction_returning_status'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:313:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/suppressor.rb:56:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:515:in `block in save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:530:in `block in around_save'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:150:in `block in run_actions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:170:in `catch_exceptions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:148:in `run_actions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:133:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:212:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block (2 levels) in perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `catch'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block in perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:186:in `within_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:62:in `perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:530:in `around_save'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:515:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:371:in `insert_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/has_many_association.rb:63:in `insert_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:52:in `block (2 levels) in create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:462:in `replace_on_target'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:278:in `add_to_target'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:50:in `block in create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:212:in `transaction'
/opt/system/lib/deadlock_retry.rb:52:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:314:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:49:in `create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:38:in `create!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:86:in `create!'
/opt/system/db/seeds.rb:64:in `block in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:212:in `transaction'
/opt/system/lib/deadlock_retry.rb:52:in `transaction'
/opt/system/db/seeds.rb:5:in `<top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `load'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `block in load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/execution_wrapper.rb:92:in `wrap'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:649:in `block (2 levels) in <class:Engine>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:130:in `instance_exec'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:141:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/tasks/database_tasks.rb:487:in `load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/railties/databases.rake:405:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/db.rake:26:in `block (3 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/db.rake:22:in `block (3 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/db.rake:5:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/openshift.rake:5:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:58:in `load'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:23:in `run'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:455:in `exec'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:35:in `dispatch'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:29:in `start'
/usr/share/gems/gems/bundler-2.5.22/exe/bundle:28:in `block in <top (required)>'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/share/gems/gems/bundler-2.5.22/exe/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
[ActiveJob] Enqueued ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper#4e37fe05f15af6acd22d1da0 with args: [{"job_class"=>"PublishEnabledChangedEventForProviderApplicationsWorker", "job_id"=>"43442755-a088-4a4f-aceb-bc4402c25103", "provider_job_id"=>nil, "queue_name"=>"default", "priority"=>nil, "arguments"=>[{"_aj_globalid"=>"gid://system/Account/1"}, "created"], "executions"=>0, "exception_executions"=>{}, "locale"=>"en", "timezone"=>"UTC", "enqueued_at"=>"2026-04-08T14:55:05.439866379Z", "scheduled_at"=>nil}]
[ActiveJob] Enqueued PublishEnabledChangedEventForProviderApplicationsWorker (Job ID: 43442755-a088-4a4f-aceb-bc4402c25103) to Sidekiq(default) with arguments: #<GlobalID:0x00007f82549845d0 @uri=#<URI::GID gid://system/Account/1>>, "created"

Run 2+

	libjemalloc.so.2 (libc6,x86-64) => /usr/local/lib64/libjemalloc.so.2
csv was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add csv to your Gemfile or gemspec to silence this warning.
I, [2026-04-08T14:53:11.235670 #2]  INFO -- : ActiveMerchant MODE set to 'production'
I, [2026-04-08T14:53:11.410763 #2]  INFO -- : [Core] Using http://backend-listener:3000/internal/ as URL
W, [2026-04-08T14:53:12.335261 #2]  WARN -- : OpenIdAuthentication.store is nil. Using in-memory store.
W, [2026-04-08T14:53:12.338097 #2]  WARN -- [Bugsnag]: No valid API key has been set, notifications will not be sent
Database 'dev' already exists
Backend Internal API version 3.4.3 status: ok
Connected to mysql2://root@system-mysql.3scale-parallel.svc.cluster.local/dev
Connected to redis://system-redis.3scale-parallel.svc.cluster.local:6379/1
Recreating procedures, see log/production.log
Recreated 1 procedures
Recreating trigger, see log/production.log
Recreated 78 triggers
[EventBroker] notifying subscribers of Domains::ProviderDomainsChangedEvent 0013f4af-73a3-475e-a1c3-05cf66d86324
[EventBroker] notifying subscribers of ZyncEvent 1df58664-0251-408d-8747-e52a63cf0e16
[EventBroker] notifying subscribers of Accounts::AccountStateChangedEvent 52ee8e1b-7b16-44aa-92a9-59c925a7fca2
[EventBroker] notifying subscribers of NotificationEvent d13a418c-7630-4e12-9f57-f5d8ba2e8218
2026-04-08T14:55:05.440Z pid=2 tid=6ga INFO: Sidekiq 7.3.2 connecting to Redis with options {:size=>10, :pool_name=>"internal", :db=>"1", :url=>"redis://system-redis.3scale-parallel.svc.cluster.local:6379/1"}
rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Password is too short (minimum is 15 characters) (ActiveRecord::RecordInvalid)
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/validations.rb:84:in `raise_validation_error'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/validations.rb:55:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:313:in `block in save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:365:in `block in with_transaction_returning_status'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:361:in `with_transaction_returning_status'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:313:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/suppressor.rb:56:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:515:in `block in save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:530:in `block in around_save'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:150:in `block in run_actions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:170:in `catch_exceptions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:148:in `run_actions'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:133:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:212:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block (2 levels) in perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `catch'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block in perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:186:in `within_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:62:in `perform'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:530:in `around_save'
/opt/system/vendor/bundle/ruby/3.3.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:515:in `save!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:371:in `insert_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/has_many_association.rb:63:in `insert_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:52:in `block (2 levels) in create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:462:in `replace_on_target'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:278:in `add_to_target'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:50:in `block in create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:342:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:212:in `transaction'
/opt/system/lib/deadlock_retry.rb:52:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/associations/collection_association.rb:314:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:49:in `create_record'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:38:in `create!'
/opt/system/vendor/bundle/ruby/3.3.0/gems/protected_attributes_continued-1.9.0/lib/active_record/mass_assignment_security/associations.rb:86:in `create!'
/opt/system/db/seeds.rb:64:in `block in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/transactions.rb:212:in `transaction'
/opt/system/lib/deadlock_retry.rb:52:in `transaction'
/opt/system/db/seeds.rb:5:in `<top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `load'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `block in load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/execution_wrapper.rb:92:in `wrap'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:649:in `block (2 levels) in <class:Engine>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:130:in `instance_exec'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.5.2/lib/active_support/callbacks.rb:141:in `run_callbacks'
/opt/system/vendor/bundle/ruby/3.3.0/gems/railties-7.1.5.2/lib/rails/engine.rb:563:in `load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/tasks/database_tasks.rb:487:in `load_seed'
/opt/system/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.5.2/lib/active_record/railties/databases.rake:405:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/db.rake:26:in `block (3 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/db.rake:22:in `block (3 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/db.rake:5:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/lib/tasks/openshift.rake:5:in `block (2 levels) in <top (required)>'
/opt/system/vendor/bundle/ruby/3.3.0/gems/bugsnag-6.26.3/lib/bugsnag/integrations/rake.rb:20:in `execute'
/opt/system/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:58:in `load'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli/exec.rb:23:in `run'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:455:in `exec'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:35:in `dispatch'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/cli.rb:29:in `start'
/usr/share/gems/gems/bundler-2.5.22/exe/bundle:28:in `block in <top (required)>'
/usr/share/gems/gems/bundler-2.5.22/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/share/gems/gems/bundler-2.5.22/exe/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
[ActiveJob] Enqueued ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper#4e37fe05f15af6acd22d1da0 with args: [{"job_class"=>"PublishEnabledChangedEventForProviderApplicationsWorker", "job_id"=>"43442755-a088-4a4f-aceb-bc4402c25103", "provider_job_id"=>nil, "queue_name"=>"default", "priority"=>nil, "arguments"=>[{"_aj_globalid"=>"gid://system/Account/1"}, "created"], "executions"=>0, "exception_executions"=>{}, "locale"=>"en", "timezone"=>"UTC", "enqueued_at"=>"2026-04-08T14:55:05.439866379Z", "scheduled_at"=>nil}]
[ActiveJob] Enqueued PublishEnabledChangedEventForProviderApplicationsWorker (Job ID: 43442755-a088-4a4f-aceb-bc4402c25103) to Sidekiq(default) with arguments: #<GlobalID:0x00007f82549845d0 @uri=#<URI::GID gid://system/Account/1>>, "created"

@akostadinov akostadinov merged commit 4faeb8b into 3scale:master Apr 9, 2026
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants