Bug 1386296 - Error "[MiqAeException::DirectoryNotFound] Git repo dir" in production log when clicked on submit button without selecting "branch or tag" in Automate import/export.
Summary: Error "[MiqAeException::DirectoryNotFound] Git repo dir" in production log wh...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.8.0
Assignee: eclarizi
QA Contact: Dmitry Misharov
URL:
Whiteboard: ui:automate:git
Depends On:
Blocks: 1397413
TreeView+ depends on / blocked
 
Reported: 2016-10-18 15:10 UTC by Aziza Karol
Modified: 2019-08-06 20:07 UTC (History)
10 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1397413 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:55:28 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)
snapshot (64.09 KB, image/png)
2016-10-18 15:10 UTC, Aziza Karol
no flags Details

Description Aziza Karol 2016-10-18 15:10:02 UTC
Created attachment 1211768 [details]
snapshot

Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1.Enable "Git Repository Owner" Role.
2.Navigate to Automate->Import/export
3.Enter git url and click on submit button."successfully found git repository" flash message displayed. see attached screenshot.
4.Do not select the "branch or tag" from the drop down list and click on submit button.

Actual results:
"Error caught: [MiqAeException::DirectoryNotFound] Git repo dir" displayed in production.log

Expected results:
No error

Additional info:
production.log
[----] I, [2016-10-18T11:00:29.005843 #4346:e98ab8]  INFO -- : Processing by MiqAeToolsController#import_via_git as JS
[----] I, [2016-10-18T11:00:29.005934 #4346:e98ab8]  INFO -- :   Parameters: {"git_repo_id"=>"9", "branch_or_tag"=>"Please select 'Branch' or 'Tag'", "git_branch_or_tag"=>""}
[----] F, [2016-10-18T11:00:29.020518 #4346:e98ab8] FATAL -- : Error caught: [MiqAeException::DirectoryNotFound] Git repo dir: /var/www/miq/vmdb/data/git_repos/ManageIQ/integration_tests/pull/3310 not found
/var/www/miq/vmdb/lib/miq_automation_engine/models/miq_ae_yaml_import_gitfs.rb:10:in `load_repo'
/var/www/miq/vmdb/lib/miq_automation_engine/models/miq_ae_yaml_import_gitfs.rb:5:in `initialize'
/var/www/miq/vmdb/lib/miq_automation_engine/models/miq_ae_import.rb:10:in `new'
/var/www/miq/vmdb/lib/miq_automation_engine/models/miq_ae_import.rb:10:in `new'
/var/www/miq/vmdb/lib/miq_automation_engine/models/miq_ae_domain.rb:121:in `import_git_repo'
/var/www/miq/vmdb/app/services/git_based_domain_import_service.rb:17:in `import'
/var/www/miq/vmdb/app/controllers/miq_ae_tools_controller.rb:134:in `import_via_git'
/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'

Comment 3 mkanoor 2016-11-14 22:04:50 UTC
We are now catching the error when the user pushes the Submit button without selecting a branch or tag.
Should the Submit button be enabled without the user having selected a branch or a tag.

Comment 6 CFME Bot 2016-11-22 00:51:15 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/b2ddf6d35237cc377d9a590768f56b3dd8a3b4b0

commit b2ddf6d35237cc377d9a590768f56b3dd8a3b4b0
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri Nov 18 12:33:40 2016 -0800
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri Nov 18 12:33:40 2016 -0800

    Disable submit button until a branch or tag has been selected
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1386296

 app/assets/javascripts/automate_import_export.js | 20 ++++++++++++++++----
 spec/javascripts/automate_import_export_spec.js  | 17 +++++++++++++++++
 2 files changed, 33 insertions(+), 4 deletions(-)

Comment 7 CFME Bot 2016-11-22 00:51:21 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a34bb7efe450e362ce0ed76b9094e8320b967e9f

commit a34bb7efe450e362ce0ed76b9094e8320b967e9f
Author:     Erik Clarizio <eclarizi>
AuthorDate: Mon Nov 21 11:05:47 2016 -0800
Commit:     Erik Clarizio <eclarizi>
CommitDate: Mon Nov 21 11:05:47 2016 -0800

    Remove if statement in favor of variable declaration
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1386296

 app/assets/javascripts/automate_import_export.js | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comment 8 CFME Bot 2016-11-22 00:51:27 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/973e23574b579d1f4cf496444f17c086876f494f

commit 973e23574b579d1f4cf496444f17c086876f494f
Author:     Erik Clarizio <eclarizi>
AuthorDate: Mon Nov 21 11:06:13 2016 -0800
Commit:     Erik Clarizio <eclarizi>
CommitDate: Mon Nov 21 12:34:40 2016 -0800

    Default to "origin/master" or first available branch
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1386296

 app/assets/javascripts/automate_import_export.js | 14 +++++-
 app/views/miq_ae_tools/_import_export.html.haml  |  4 +-
 spec/javascripts/automate_import_export_spec.js  | 60 ++++++++++++++++++++++++
 3 files changed, 75 insertions(+), 3 deletions(-)

Comment 10 Milan Falešník 2017-03-01 11:06:34 UTC
Verified in 5.8.0.2. The submit button is disabled when required data is not selected.


Note You need to log in before you can comment on or make changes to this bug.