Bug 1566266

Summary: Not able to import certain dialogs because of tag Id
Product: Red Hat CloudForms Management Engine Reporter: Shveta <sshveta>
Component: AutomateAssignee: drew uhlmann <duhlmann>
Status: CLOSED CURRENTRELEASE QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: medium Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, hkataria, lavenel, mkanoor, mpovolny, nansari, obarenbo, tfitzger
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1568156 (view as bug list) Environment:
Last Closed: 2019-02-11 14:07:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1568156    
Attachments:
Description Flags
Dialog none

Description Shveta 2018-04-11 22:52:51 UTC
Created attachment 1420563 [details]
Dialog

Description of problem: This bug came from investigating 
https://bugzilla.redhat.com/show_bug.cgi?id=1563735


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Import the dialog attached in 5.9 appliance .
2. Commit dialog throws error in production log 
3. 

Actual results:


Expected results:


Additional info:
Log 
==================
[----] F, [2018-04-11T16:28:07.264789 #13243:f2ee28] FATAL -- : Error caught: [ActiveRecord::RecordNotFound] Couldn't find Category with 'id'=99000000000126 [WHERE "classifications"."parent_id" = $1]
/opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/relation/finder_methods.rb:353:in `raise_record_not_found_exception!'
/opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/relation/finder_methods.rb:479:in `find_one'
/opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/relation/finder_methods.rb:458:in `find_with_ids'
/opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/relation/finder_methods.rb:66:in `find'
/opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/querying.rb:3:in `find'
/opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/core.rb:151:in `find'
/var/www/miq/vmdb/app/models/dialog_field_importer.rb:40:in `adjust_category'
/var/www/miq/vmdb/app/models/dialog_field_importer.rb:34:in `set_category_for_tag_control'
/var/www/miq/vmdb/app/models/dialog_field_importer.rb:17:in `import_field'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:81:in `block in build_dialog_fields'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:79:in `collect'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:79:in `build_dialog_fields'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:74:in `block in build_dialog_groups'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:73:in `collect'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:73:in `build_dialog_groups'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:68:in `block in build_dialog_tabs'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:67:in `collect'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:67:in `build_dialog_tabs'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:142:in `block in import_from_dialogs'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:135:in `each'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:135:in `import_from_dialogs'
/var/www/miq/vmdb/lib/services/dialog_import_service.rb:49:in `import_service_dialogs'
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-66fe37fce153/app/controllers/miq_ae_customization_controller.rb:82:in `import_service_dialogs'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/abstract_controller/base.rb:188:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-5.0.6/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/abstract_controller/base.rb:126:in `process'
/opt/rh/cfme-gemset/gems/actionview-5.0.6/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal.rb:190:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_controller/metal.rb:262:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/journey/router.rb:39:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/journey/router.rb:26:in `each'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/journey/router.rb:26:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/routing/route_set.rb:727:in `call'
/opt/rh/cfme-gemset/gems/secure_headers-3.0.3/lib/secure_headers/middleware.rb:10:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/conditional_get.rb:38:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.6/lib/rails/rack/logger.rb:36:in `call_app'
/opt/rh/cfme-gemset/gems/railties-5.0.6/lib/rails/rack/logger.rb:26:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/request_id.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/gems/activesupport-5.0.6/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/gems/actionpack-5.0.6/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.6/lib/rails/engine.rb:522:in `call'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/configuration.rb:232:in `call'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:578:in `handle_request'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:415:in `process_client'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/server.rb:275:in `block in run'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.7.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
[----] I, [2018-04-11T16:28:07.267346 #13243:f2ee28]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-66fe37fce153/app/views/layouts/_exception_contents.html.haml (1.4ms)
[----] I, [2018-04-11T16:28:07.267985 #13243:f2ee28]  INFO -- : Completed 200 OK in 62ms (Views: 2.6ms | ActiveRecord: 9.5ms)
[----] I, [2018-04-11T16:28:14.613415 #13255:384c364]  INFO -- : Started GET "/api" for 127.0.0.1 at 2018-04-11 16:28:14 -0400
[----] I, [2018-04-11T16:28:14.616656 #13255:384c364]  INFO -- : Processing by Api::ApiController#index as JSON
[----] I, [2018-04-11T16:28:14.641166 #13255:384c364]  INFO -- : Completed 200 OK in 24ms (Views: 0.2ms | ActiveRecord: 2.0ms)

Comment 2 Greg McCullough 2018-04-12 13:47:43 UTC
Including question from BZ referenced in the comment:
Shveta - where the dialog is coming from?

I assume it is from an older appliance build, but want to verify.

Comment 3 Shveta 2018-04-12 17:21:01 UTC
The dialog is attached in original BZ - 
https://bugzilla.redhat.com/show_bug.cgi?id=1548478 so coming from CF 4.5 .

Comment 4 drew uhlmann 2018-04-13 20:52:22 UTC
handled by https://github.com/ManageIQ/manageiq/pull/17237

Comment 6 Niyaz Akhtar Ansari 2018-08-27 09:51:04 UTC
Verified in Version 5.10.0.12.20180822200426_5f6e52b