Bug 1393982 - UI hangs if errors are encountered during Git Import
Summary: UI hangs if errors are encountered during Git Import
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.7.0
Assignee: eclarizi
QA Contact: Dmitry Misharov
URL:
Whiteboard: automate:git
Depends On: 1392617
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-10 18:31 UTC by Satoe Imaishi
Modified: 2017-01-04 13:12 UTC (History)
7 users (show)

Fixed In Version: 5.7.0.14
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1392617
Environment:
Last Closed: 2017-01-04 13:12:11 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0012 0 normal SHIPPED_LIVE CFME 5.7.0 bug fixes and enhancement update 2017-01-04 17:50:36 UTC

Comment 2 CFME Bot 2016-11-10 20:46:10 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/4a94626e0ea1ea8467b6ef521da5ef660ca8d1ee

commit 4a94626e0ea1ea8467b6ef521da5ef660ca8d1ee
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Wed Nov 9 14:38:36 2016 -0500
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Thu Nov 10 15:42:53 2016 -0500

    Merge pull request #12531 from eclarizio/BZ1392617
    
    Ensure a response when git repository does not contain domains
    (cherry picked from commit 1be49e75e8070411af391e549882cda8bb354018)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1393982

 app/controllers/miq_ae_tools_controller.rb         |  8 ++++--
 app/services/git_based_domain_import_service.rb    |  3 ++-
 spec/controllers/miq_ae_tools_controller_spec.rb   | 30 +++++++++++++++++++---
 .../git_based_domain_import_service_spec.rb        |  6 +++--
 4 files changed, 38 insertions(+), 9 deletions(-)

Comment 3 Dmitry Misharov 2016-11-18 09:29:24 UTC
Verified on 5.7.0.11-rc1.20161115160629_46cf4f1. There is no infinite spinner if selected branch or tag does not contain a valid domain.

Comment 4 Dmitry Misharov 2016-11-24 08:49:37 UTC
UI hangs if connection to git server failed:
[----] E, [2016-11-24T03:46:10.206667 #2963:ff1130] ERROR -- : MIQ(MiqQueue#deliver) Message id: [1066], Error: [Failed to connect to github.com: Connection timed out]
[----] E, [2016-11-24T03:46:10.488727 #3061:157aac0] ERROR -- : MIQ(miq_ae_tools_controller-retrieve_git_datastore): Error during repository fetch: Failed to connect to github.com: Connection timed out

Comment 5 eclarizi 2016-11-28 17:40:45 UTC
I'm unable to reproduce this error, if I hit a connection timed out issue, the UI does indeed sit there for a while, but that's because it's trying to reconnect to the server multiple times before deciding that the connection actually did time out. I tested a few times and the timing was pretty consistently at the 1.3 minute mark.

Comment 6 Dmitry Misharov 2016-11-29 09:41:18 UTC
I just added "8.8.8.8 github.com" into /etc/hosts and tried to import this repo https://github.com/mkanoor/playbook. After that I got "Connection timed out" error and infinite spinner in the UI. Tested again in 5.7.0.12-rc2.20161123111642_a4a65ce.

Comment 7 eclarizi 2016-11-29 15:35:19 UTC
Do you have an appliance that I can test this on? I can't reproduce locally.

Comment 8 Greg McCullough 2016-11-30 19:34:08 UTC
Dmitry - Please re-verify against the latest 5.7.0.13-rc3 build that was just released.

Comment 10 eclarizi 2016-12-05 23:10:05 UTC
https://github.com/ManageIQ/manageiq/pull/12995

Backported to Euwe, moving to post.

Comment 11 CFME Bot 2016-12-06 17:15:41 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ae62daf588773c09a206fc0493397cd92cebf52a

commit ae62daf588773c09a206fc0493397cd92cebf52a
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri Dec 2 07:42:23 2016 -0800
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri Dec 2 07:42:23 2016 -0800

    Add new retrieve git datastore click handler in GitImport javascript
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1393982

 app/assets/javascripts/git_import.js |  48 ++++++++++++
 spec/javascripts/git_import_spec.js  | 148 +++++++++++++++++++++++++++++++++++
 2 files changed, 196 insertions(+)
 create mode 100644 app/assets/javascripts/git_import.js
 create mode 100644 spec/javascripts/git_import_spec.js

Comment 12 CFME Bot 2016-12-06 17:15:47 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/436969b205dc85db451136c2d19c302714c2820d

commit 436969b205dc85db451136c2d19c302714c2820d
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri Dec 2 07:43:03 2016 -0800
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri Dec 2 07:43:03 2016 -0800

    Add GitRepositoryService in preparation for extracting logic
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1393982

 app/services/git_repository_service.rb       |  15 ++++
 spec/services/git_repository_service_spec.rb | 109 +++++++++++++++++++++++++++
 2 files changed, 124 insertions(+)
 create mode 100644 app/services/git_repository_service.rb
 create mode 100644 spec/services/git_repository_service_spec.rb

Comment 13 CFME Bot 2016-12-06 17:15:53 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7462b29ffa99d23f097dc3850eab4092330e0664

commit 7462b29ffa99d23f097dc3850eab4092330e0664
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri Dec 2 07:44:33 2016 -0800
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri Dec 2 07:44:33 2016 -0800

    Replace retrieve_git_datastore call with an async version
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1393982
    
    retrieve_git_datastore now returns a task id that the javascript then
    uses to poll to see if the task is done. When it is, it runs through the
    rendering of the git import stuff.

 app/assets/javascripts/application.js            |   1 +
 app/assets/javascripts/automate_import_export.js |  18 +-
 app/assets/javascripts/import.js                 |   3 +-
 app/controllers/miq_ae_tools_controller.rb       |  79 ++++---
 app/views/miq_ae_tools/_import_export.html.haml  |   5 +-
 config/routes.rb                                 |   1 +
 spec/controllers/miq_ae_tools_controller_spec.rb | 261 +++++++++++++----------
 spec/javascripts/automate_import_export_spec.js  |  90 ++++++++
 spec/javascripts/import_spec.js                  |   2 +-
 9 files changed, 304 insertions(+), 156 deletions(-)

Comment 14 CFME Bot 2016-12-06 17:15:59 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d5ee1dd924c7360859b14bb4223b1eba1f8c701f

commit d5ee1dd924c7360859b14bb4223b1eba1f8c701f
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri Dec 2 11:14:19 2016 -0800
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri Dec 2 11:14:19 2016 -0800

    Utilize queue_refresh call within GitBasedDomainImportService
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1393982

 app/controllers/miq_ae_tools_controller.rb       | 14 +-------------
 spec/controllers/miq_ae_tools_controller_spec.rb | 14 +++-----------
 2 files changed, 4 insertions(+), 24 deletions(-)

Comment 15 CFME Bot 2016-12-06 17:16:09 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/dbff1b629627610e45ed00d9f7bc9728ba6205e4

commit dbff1b629627610e45ed00d9f7bc9728ba6205e4
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri Dec 2 14:15:10 2016 -0800
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri Dec 2 14:15:10 2016 -0800

    Add constant for the poll timeout value and fix quotes
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1393982

 app/assets/javascripts/git_import.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comment 16 Dmitry Misharov 2016-12-07 07:36:45 UTC
Verified on 5.7.0.14-rc4.20161206165848_b5cb87f. UI doesn't hang anymore if connection to git repository is timed out .

Comment 18 errata-xmlrpc 2017-01-04 13:12:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0012.html


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