Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): 5.7.0.4 How reproducible: 100% Steps to Reproduce: 1.Navigate to Automate->explorer->Service dialog import/export. 2.choose file and upload 3. Actual results: Error caught: [TypeError] no implicit conversion of String into Integer displayed in production.log Expected results: Additional info: production.log [----] I, [2016-10-10T08:34:33.440021 #11814:9810d4] INFO -- : Started POST "/miq_ae_customization/upload_import_file" for 127.0.0.1 at 2016-10-10 08:34:33 -0400 [----] I, [2016-10-10T08:34:33.443324 #11814:9810d4] INFO -- : Processing by MiqAeCustomizationController#upload_import_file as JS [----] I, [2016-10-10T08:34:33.443556 #11814:9810d4] INFO -- : Parameters: {"utf8"=>"✓", "upload"=>{"file"=>#<ActionDispatch::Http::UploadedFile:0x000000149ab5c8 @tempfile=#<Tempfile:/tmp/RackMultipart20161010-11814-q2pyp5.yaml>, @original_filename="heat.yaml", @content_type="application/x-yaml", @headers="Content-Disposition: form-data; name=\"upload[file]\"; filename=\"heat.yaml\"\r\nContent-Type: application/x-yaml\r\n">}} [----] F, [2016-10-10T08:34:33.533059 #11814:9810d4] FATAL -- : Error caught: [TypeError] no implicit conversion of String into Integer /var/www/miq/vmdb/app/models/dialog_import_validator.rb:17:in `[]' /var/www/miq/vmdb/app/models/dialog_import_validator.rb:17:in `block in check_dialogs_for_validity' /var/www/miq/vmdb/app/models/dialog_import_validator.rb:16:in `each' /var/www/miq/vmdb/app/models/dialog_import_validator.rb:16:in `check_dialogs_for_validity' /var/www/miq/vmdb/app/models/dialog_import_validator.rb:8:in `determine_validity' /var/www/miq/vmdb/app/services/dialog_import_service.rb:58:in `store_for_import' /var/www/miq/vmdb/app/controllers/miq_ae_customization_controller.rb:52:in `upload_import_file' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/base.rb:188:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:126:in `call' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:455:in `call' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:101:in `__run_callbacks__' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/callbacks.rb:19:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/rescue.rb:20:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `block in instrument' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `instrument' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal/params_wrapper.rb:248:in `process_action' /opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/abstract_controller/base.rb:126:in `process' /opt/rh/cfme-gemset/gems/actionview-5.0.0.1/lib/action_view/rendering.rb:30:in `process' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal.rb:190:in `dispatch' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_controller/metal.rb:262:in `dispatch' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:32:in `serve' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:39:in `block in serve' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:26:in `each' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/journey/router.rb:26:in `serve' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/routing/route_set.rb:725: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.1/lib/rack/etag.rb:25:in `call' /opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/conditional_get.rb:38:in `call' /opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/head.rb:12:in `call' /opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:222:in `context' /opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:216:in `call' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/cookies.rb:613:in `call' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:97:in `__run_callbacks__' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:750:in `_run_call_callbacks' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/callbacks.rb:90:in `run_callbacks' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/callbacks.rb:36:in `call' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/remote_ip.rb:79:in `call' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' /opt/rh/cfme-gemset/gems/railties-5.0.0.1/lib/rails/rack/logger.rb:36:in `call_app' /opt/rh/cfme-gemset/gems/railties-5.0.0.1/lib/rails/rack/logger.rb:26:in `call' /opt/rh/cfme-gemset/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/request_id.rb:24:in `call' /opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/method_override.rb:22:in `call' /opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/runtime.rb:22:in `call' /opt/rh/cfme-gemset/gems/activesupport-5.0.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' /opt/rh/cfme-gemset/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call' /opt/rh/cfme-gemset/gems/rack-2.0.1/lib/rack/sendfile.rb:111:in `call' /opt/rh/cfme-gemset/gems/railties-5.0.0.1/lib/rails/engine.rb:522:in `call' /opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/configuration.rb:224:in `call' /opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:561:in `handle_request' /opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:406:in `process_client' /opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:271:in `block in run' /opt/rh/rh-ruby23/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `block in spawn_thread' [----] I, [2016-10-10T08:34:33.556746 #11814:9810d4] INFO -- : Rendered layouts/_exception_contents.html.haml (17.1ms) [----] I, [2016-10-10T08:34:33.557827 #11814:9810d4] INFO -- : Completed 200 OK in 114ms (Views: 23.8ms | ActiveRecord: 0.0ms)
Erik, Looks like throwing an error in model, can you please look into it. Thanks, ~Harpreet
Uploading a valid yaml file is working for me. I can understand why that error might happen, and I can put in a check so that this error doesn't happen, but it won't be able to coerce your yaml file into a valid one. Can you attach the yaml file so that I can look and make sure that the error is happening for the reason I think it is?
I have attached the yaml. Thanks, Aziza
Hey Aziza, Are you sure this is the correct yaml? It does indeed throw the error that is reported above, but this clearly doesn't contain dialog data. Where did this file come from? If you were expecting this to actually contain dialog data, then the actual bug may lie in the export process.
Erik, I was using this yaml in the earlier versions so i had it saved and thought of reusing the same in 5.7 but landed up with this error. As per comment 3,I agree we might want to have a check around for a invalid yaml's. Thanks, Aziza
https://github.com/ManageIQ/manageiq/pull/12073
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/4a385b87ee6bf90c127f78110abe61a51e65e180 commit 4a385b87ee6bf90c127f78110abe61a51e65e180 Author: Erik Clarizio <eclarizi> AuthorDate: Wed Oct 19 23:43:57 2016 -0700 Commit: Erik Clarizio <eclarizi> CommitDate: Wed Oct 19 23:43:57 2016 -0700 Throw sane error on 'dialog' yaml that is not in dialog form https://bugzilla.redhat.com/show_bug.cgi?id=1383331 app/models/dialog_import_validator.rb | 2 ++ spec/models/dialog_import_validator_spec.rb | 6 ++++++ 2 files changed, 8 insertions(+)
New commit detected on ManageIQ/manageiq/euwe: https://github.com/ManageIQ/manageiq/commit/982c955e18bcf9f3b7b65266928cbfcfc1226095 commit 982c955e18bcf9f3b7b65266928cbfcfc1226095 Author: Greg McCullough <gmccullo> AuthorDate: Thu Oct 20 15:10:22 2016 +0200 Commit: Oleg Barenboim <chessbyte> CommitDate: Fri Oct 21 11:35:07 2016 -0400 Merge pull request #12073 from eclarizio/BZ1383331 Fix for Error:no implicit conversion of String into Integer on service dialog import (cherry picked from commit c4e4b3a03516ca3faccc6ccdd71666ce6d97e8dd) https://bugzilla.redhat.com/show_bug.cgi?id=1383331 app/models/dialog_import_validator.rb | 2 ++ spec/models/dialog_import_validator_spec.rb | 6 ++++++ 2 files changed, 8 insertions(+)
Validation message displayed on 'dialog' yaml that is not in dialog form. Verified: 5.8.0.4.20170307183144_745a3d9