Bug 877222 - after creating a quickstart template successfully and updated it again, the cartridge information is lost
Summary: after creating a quickstart template successfully and updated it again, the c...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OKD
Classification: Red Hat
Component: Website
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-16 00:43 UTC by Peter Ruan
Modified: 2015-05-15 01:16 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-19 15:07:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test (36.94 KB, image/png)
2012-11-16 00:43 UTC, Peter Ruan
no flags Details
missing_carts (64.11 KB, image/png)
2012-11-16 00:44 UTC, Peter Ruan
no flags Details

Description Peter Ruan 2012-11-16 00:43:21 UTC
Description of problem:
after creating a quickstart template successfully under a devenv community and updated it again, the cartridge information is lost if a user chooses it in the app creation page.

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

How reproducible:


Steps to Reproduce:
1. create a quickstart template from the community page [{"name": "php-5.3", "name": "mongodb-2.2"}]
2. update the cartridge information and save again. [{"name": "php-5.3", "name": "mysql-5.1"}]
2. go to the app creation page and select the newly created quickstart template
3. 
  
Actual results:
cartridge information is missinig.

Expected results:


Additional info:

Comment 1 Peter Ruan 2012-11-16 00:43:52 UTC
Created attachment 646099 [details]
test

Comment 2 Peter Ruan 2012-11-16 00:44:14 UTC
Created attachment 646100 [details]
missing_carts

Comment 3 Clayton Coleman 2012-11-16 05:19:59 UTC
Two issues at play - cart spec errors need to be handled more cleanly, and the spec defined in the help text is wrong.  We'll display an error if the cart spec is invalid in the creation page.  Also, if you submit the form values and there is an error, your inputs should be preserved.

Fixes are in these pulls: https://github.com/openshift/li/pull/631 and https://github.com/openshift/origin-server/pull/930

Comment 4 Yujie Zhang 2012-11-16 12:28:16 UTC
(In reply to comment #3)
Tested on devenv_2487, using [{"name": "php-5.3", "name": "mysql-5.1"}] as the cartridge information, the wordpress can be added successfully without error, and also no lose of cartridge information. But according to your comments, there should be error message if the cart spec is invalid, is my result expected?

Comment 5 Yujie Zhang 2012-11-16 12:29:10 UTC
(In reply to comment #4)
Sorry,my test version is devenv_2488.

Comment 6 Peter Ruan 2012-11-16 21:52:27 UTC
failed on devenv_2490:

if I update my cartridge spec from an valid:
[{"name": "php-5.3"}, {"name": "phpmyadmin-3.4"}, {"name": "mysql-5.1"}]


 an invalid cartridge JSON spec like:

[{"name": "php-5.3"}, {"name": "phpmyadmin-3.4"}]

The admin page will accept this as valid and when I go to the app creation page, I see
 
Cartridges  PHP 5.3 and phpMyAdmin 3.4

I would expect the UI to either flag an error or display the old list.

Comment 7 Clayton Coleman 2012-11-18 16:47:14 UTC
There's a five-ten minute cache on quickstarts.  Did you clear your cache?  In /var/www/openshift/site run 'rake tmp:clear'

Comment 8 Yujie Zhang 2012-11-19 07:02:29 UTC
(In reply to comment #7)
Tested this issue on devenv_2497,got the same result with Peter, it will accept [{"name": "php-5.3"}, {"name": "phpmyadmin-3.4"}] as valid and then I tried to create app, it will show "MySQL must be embedded before phpMyAdmin" error. And I did the 'rake tmp:clear' step, also no difference.

Comment 9 Peter Ruan 2012-11-19 07:05:50 UTC
Hi Clayton,
  Yes, I did the rake clear command everytime after the update but still encounter the error.

Thanks,
-peter

Comment 10 Clayton Coleman 2012-11-19 15:07:00 UTC
Quickstarts are not checked in any way.  If someone creates an invalid quickstart, it is just invalid.  The spec:

[{"name": "php-5.3"}, {"name": "phpmyadmin-3.4"}]

should be shown in the web ui, and if they click it and get an error, that means it's invalid.

For the more general solution I've spawned story https://rally1.rallydev.com/#/4670513817d/detail/userstory/9534822086 to cover showing a warning when the user visits the page in the console before they click.  In the long term there may be a way to fix this in the community but that is much further out.


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