Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop settings DB queries #733

Merged
merged 1 commit into from Aug 10, 2022

Conversation

ShimShtein
Copy link
Member

No description provided.

@jeremylenz
Copy link
Contributor

Not having this one in breaks Foreman too..

14:15:59 rails.1   | /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `exec_params': ERROR:  column settings.default does not exist (PG::UndefinedColumn)
14:15:59 rails.1   | LINE 1: ..."."name" = $2 AND "settings"."value" IS NULL AND (settings.d...
14:15:59 rails.1   |                                                              ^
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in `block (2 levels) in exec_no_cache'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_no_cache'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:695:in `block in log'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:687:in `log'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_no_cache'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:649:in `execute_and_clear'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:72:in `exec_delete'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:179:in `update'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/query_cache.rb:22:in `update'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/relation.rb:466:in `update_all'
14:15:59 rails.1   | 	from /home/vagrant/foreman_rh_cloud/app/models/setting/rh_cloud.rb:9:in `block in load_defaults'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
14:15:59 rails.1   | 	from /home/vagrant/foreman/.vendor/ruby/2.7.0/gems/activerecord-6.1.6/lib/active_record/transactions.rb:209:in `transaction'
14:15:59 rails.1   | 	from /home/vagrant/foreman_rh_cloud/app/models/setting/rh_cloud.rb:6:in `load_defaults'
14:15:59 rails.1   | 	from /home/vagrant/foreman/app/services/setting_registry.rb:114:in `each'

Copy link
Contributor

@jeremylenz jeremylenz left a comment

Choose a reason for hiding this comment

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

Checking out the PR resolved it for me.
ACK 👍

@ShimShtein
Copy link
Member Author

@Ron-Lavi care to take a final look?

@Ron-Lavi
Copy link
Member

Ron-Lavi commented Jun 9, 2022

@ShimShtein time to move to a newer branch? :D
it fixed the issue with foreman develop

@ShimShtein
Copy link
Member Author

@adamruzicka would you mind to review this one?

Copy link
Contributor

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

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

ACK

@adamruzicka adamruzicka merged commit e257335 into theforeman:master Aug 10, 2022
@adamruzicka
Copy link
Contributor

Thank you @ShimShtein !

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.

None yet

4 participants