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

Fix database connections page #5235

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

carbonin
Copy link
Member

The AR method #order doesn't take a block.
This was changed in 08c8342

Currently this fails with:

[----] F, [2019-02-11T10:16:52.236114 #14890:2b28dbfe56a8] FATAL -- : Error caught: [ArgumentError] The method .order() must contain arguments.
/home/ncarboni/.gem/ruby/2.4.3/gems/activerecord-5.0.7.1/lib/active_record/relation/query_methods.rb:1214:in `check_if_method_has_arguments!'
/home/ncarboni/.gem/ruby/2.4.3/gems/activerecord-5.0.7.1/lib/active_record/relation/query_methods.rb:338:in `order'
/home/ncarboni/.gem/ruby/2.4.3/bundler/gems/manageiq-ui-classic-2e054446e056/app/controllers/ops_controller/db.rb:29:in `db_list'
/home/ncarboni/.gem/ruby/2.4.3/bundler/gems/manageiq-ui-classic-2e054446e056/app/controllers/ops_controller/db.rb:111:in `db_get_info'
/home/ncarboni/.gem/ruby/2.4.3/bundler/gems/manageiq-ui-classic-2e054446e056/app/controllers/ops_controller.rb:205:in `change_tab'
/home/ncarboni/.gem/ruby/2.4.3/gems/actionpack-5.0.7.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/home/ncarboni/.gem/ruby/2.4.3/gems/actionpack-5.0.7.1/lib/abstract_controller/base.rb:188:in `process_action'

@skateman please review.

The AR method #order doesn't take a block.
This was changed in 08c8342
@carbonin
Copy link
Member Author

This is what the screen looks like now:
image

It seems like we don't store the backend sql connection pid (spid) for threaded webserver workers so I'm questioning the general utility of this screen.

Thoughts?
@Fryguy @himdel @dmetzger57 ?

@skateman
Copy link
Member

@carbonin this PR seems like a typo 🙈 going to test it now.

@carbonin
Copy link
Member Author

carbonin commented Feb 11, 2019

I think it's just that the Enumerable#sort_by method has a block form, but the AR#order method doesn't.

@skateman
Copy link
Member

skateman commented Feb 11, 2019

I'm getting a

Error caught: [NameError] undefined local variable or method `waiting' for #<VmdbDatabaseConnection:0x00007fb24f09ceb0>
Did you mean?  wait_time
/home/skateman/Repositories/ManageIQ/manageiq/app/models/vmdb_database_connection.rb:67:in `task_state'

error when hitting this site

@carbonin
Copy link
Member Author

@skateman is there more of that backtrace? Where is that call coming from?

@carbonin
Copy link
Member Author

@skateman also you need to be using PG 9.5 for this screen to work properly on master

Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

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

The Seal of Approval

@mzazrivec mzazrivec self-assigned this Feb 12, 2019
@mzazrivec mzazrivec added this to the Sprint 105 Ending Feb 18, 2019 milestone Feb 12, 2019
@mzazrivec mzazrivec merged commit 7bee29b into ManageIQ:master Feb 12, 2019
@mzazrivec
Copy link
Contributor

@carbonin Is this hammer/yes ?

@himdel
Copy link
Contributor

himdel commented Feb 12, 2019

👍

The undefined local variable or method 'waiting' is ManageIQ/manageiq#13200

@carbonin
Copy link
Member Author

@mzazrivec nope, #4269 was hammer/no, so no need to backport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants