Bug 963615

Summary: Met "We appear to be having technical difficulties" error when creating application using invalid git url.
Product: OKD Reporter: Yujie Zhang <yujzhang>
Component: WebsiteAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 2.xCC: wsun, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-11 03:58:31 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:

Description Yujie Zhang 2013-05-16 09:03:24 UTC
Description of problem:

Tried to create application using the following url:

https://stg.openshift.redhat.com/app/console/application_types/custom?cartridges[]=php-5.3&cartridges[]=mysql-5.1&initial_git_url=git@github.com:smarterclayton/drupal-example.git

Met "We appear to be having technical difficulties" error

This issue only exists on website, rhc does not have this issue.

Version-Release number of selected component (if applicable):
devenv-stage_353
STG(devenv-stage_353)
PROD

How reproducible:
always

Steps to Reproduce:
1.Login to openshift console
2.Try to create application using the following url:

https://stg.openshift.redhat.com/app/console/application_types/custom?cartridges[]=php-5.3&cartridges[]=mysql-5.1&initial_git_url=git@github.com:smarterclayton/drupal-example.git

3.Or, go to create app page, choose a type and click the "change" link,input invalid git url
  
Actual results:
Met "We appear to be having technical difficulties" error when creating application using invalid git url.Log is as following:

2013-05-16 04:22:27.726 [DEBUG] Server error: :{"debugIO"=>[], "resultIO"=>[], "messageIO"=>[], "errorIO"=>[], "appInfoIO"=>[], "data"=>"", "hasUserActionableError"=>true, "exitcode"=>130, "cart_commands"=>[], "properties"=>{}} #130: Source Code repository URL type must be one of: git:// http:// https:// file:// ftp:// ftps:// rsync:// (pid:1964)
2013-05-16 04:22:27.727 [WARN ] undefined method `to_sym' for #<Hash:0x00000005056d38> (pid:1964)
2013-05-16 04:22:27.727 [WARN ] ["/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.8.11/app/models/rest_api/base.rb:542:in `translate_api_error'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.8.11/app/models/rest_api/base.rb:470:in `block in load_remote_errors'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.8.11/app/models/rest_api/base.rb:469:in `each'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.8.11/app/models/rest_api/base.rb:469:in `load_remote_errors'", "/opt/rh/ruby193/root/usr/share/gems/gems/activeresource-3.2.8/lib/active_resource/validations.rb:89:in `rescue in save_with_validation'", "/opt/rh/ruby193/root/usr/share/gems/gems/activeresource-3.2.8/lib/active_resource/validations.rb:72:in `save_with_validation'", "/opt/rh/ruby193/root/usr/share/gems/gems/activeresource-3.2.8/lib/active_resource/observing.rb:19:in `save_with_notifications'", "/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.8.11/app/models/rest_api/base.rb:303:in `save_with_change_tracking'",

Expected results:

There should be error message like "Source Code repository URL type must be one of: git:// http:// https:// file:// ftp:// ftps:// rsync://" on the page.

Additional info:

Comment 1 Yujie Zhang 2013-05-16 09:50:14 UTC
Set it to low severify for it is a negitive action, and no other positive actions will be affected by this.

Comment 2 Clayton Coleman 2013-05-16 13:25:56 UTC
Increasing to high, console is improperly handling error messages and resulting in difficult to debug problems.

Comment 3 Fabiano Franz 2013-05-16 16:27:40 UTC
On the console side we are now safeguarding against malformed 'field' attribute in the response body from REST API. Pull request:

https://github.com/openshift/origin-server/pull/2510

But this is also related to a bug on the Broker:

https://bugzilla.redhat.com/show_bug.cgi?id=963828

Comment 4 Yujie Zhang 2013-05-17 09:08:13 UTC
Tested on devenv_3238, tried to create app with invalid git url, did not meet "we are having technical difficulties" error, so verify this bug, however, still can not display correct message for user, leave bug 963662 open to track the existing issue.