Bug 839421 - Application Descriptors Return BSON::OrderedHash for some items
Summary: Application Descriptors Return BSON::OrderedHash for some items
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Krishna Raman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-11 22:55 UTC by Fotios Lindiakos
Modified: 2015-05-15 00:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 20:43:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Fotios Lindiakos 2012-07-11 22:55:56 UTC
Description of problem:
When retrieving an application's descriptor, the YAML data contains BSON::OrderedHash objects


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


How reproducible:
Always


Steps to Reproduce:
1. Create application
2. Retrieve descriptor via REST API:
     http://$broker/broker/rest/domains/$domain/applications/$app/descriptor
3.
  
Actual results:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<data>--- 
Scaling: 
  Max: -1
  Min: 1
Vendor: unknown
Description: &quot;&quot;
Cart-Data: !map:BSON::OrderedHash {}

Architecture: noarch
Requires: 
- ruby-1.9
License: unknown
Categories: 
- cartridge
Version: &quot;0.0&quot;
Display-Name: railsapp-0.0-noarch
Name: railsapp
Help-Topics: !map:BSON::OrderedHash {}

Website: &quot;&quot;
License-Url: &quot;&quot;</data>
<type>descriptor</type>
<supported-api-versions>
<supported-api-version>1.0</supported-api-version>
</supported-api-versions>
<status>ok</status>
<messages/>
<version>1.0</version>
</response>


Expected results:
Data should look like:
--- 
Name: railsapp
Description: ""
Cart-Data: {}

Display-Name: railsapp-0.0-noarch
Help-Topics: {}

...


Additional info:
This doesn't break any current features, but will definitely be an issue. We are currently working around it in the template creation scripts.

Comment 1 Krishna Raman 2012-07-24 17:10:43 UTC
https://github.com/openshift/crankcase/pull/260

Comment 2 Meng Bo 2012-07-25 02:17:36 UTC
Checked on devenv_1910. when using REST api get the app descriptor, no such object names contained.

=============
[root@ip-10-28-102-203 ~]# curl -k -H 'Accept: application/xml' --user bmeng:123123 https://localhost/broker/rest/domains/bmengdev/applications/php1/descriptor -XGET
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <type>descriptor</type>
  <data>--- 
Requires: 
- php-5.3
Name: php1
Display-Name: php1-0.0-noarch
</data>
  <version>1.1</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
  </supported-api-versions>
  <status>ok</status>
  <messages/>
</response>


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