Activity log for bug #1671116

Date Who What changed Old value New value Message
2017-03-08 14:13:51 Thomas Maddox bug added bug
2017-03-08 14:13:58 Thomas Maddox craton: milestone v0.1.0
2017-03-08 14:14:01 Thomas Maddox craton: importance Undecided Critical
2017-03-08 14:14:05 Thomas Maddox craton: importance Critical High
2017-03-08 14:17:13 Thomas Maddox description We are currently unable to effectively query on nested variables for a resources. Not being able to do so severely hinders the power of this API and harms our value-add. For example, let's say we want to query a series of hosts for which have a disk manufactured by Seagate and the data for this, expressed via variables on hosts, looks like: { "hardware_profiles": { "disks": [ { "manufacturer": "seagate", "capacity": "2TB" }, { "manufacturer": "western", "capacity": "5TB" } ] } } We wouldn't be able to effectively query for this condition with our existing minimal variable querying capabilities (simply matches for "key:value". After some discussion we've agreed that it'd be more expressive and easier to work with if we were to provide something like JSONPath queries to achieve this. So, the end-result would look something like: craton host-list --vars 'hardware_profiles.disks[*].manufacturer:seagate' There are a few of problems to be solved here: 1. How do we leverage our database's JSON capabilities to achieve querying variables this way? 2. How do we handle the existing data model where a variable can be either a String datatype or a JSON document? 3. How can this be applied to querying for resolved variables? 4. What limitations exist in SQLAlchemy that may prevent or hinder our ability to implement this, and how do we overcome them? We are currently unable to effectively query on nested variables for a resources. Not being able to do so severely hinders the power of this API and harms our value-add. For example, let's say we want to query a series of hosts for which have a disk manufactured by Seagate and the data for this, expressed via variables on hosts, looks like: {     "hardware_profiles": {         "disks": [             {                 "manufacturer": "seagate",                 "capacity": "2TB"             },             {                 "manufacturer": "western",                 "capacity": "5TB"             }         ]     } } We wouldn't be able to effectively query for this condition with our existing minimal variable querying capabilities (simply matches for "key:value"). After some discussion, we've agreed that it'd be more expressive and easier to work with if we were to provide something like JSONPath queries to achieve this. So, the end-result would look something like: craton host-list --vars 'hardware_profiles.disks[*].manufacturer:seagate' There are a few of problems to be solved here: 1. How do we leverage our database's JSON capabilities to achieve querying variables this way? 2. How do we handle the existing data model where a variable can be either a String datatype or a JSON document? 3. How can this be applied to querying for resolved variables? 4. What limitations exist in SQLAlchemy that may prevent or hinder our ability to implement this, and how do we overcome them? Workaround: The interim solution for this lies in flattening the storage of the data to diminish the need for querying nested variables, but it's still not solved entirely, and certainly not in a sustainable way.
2017-03-08 14:17:21 Thomas Maddox craton: assignee Thomas Maddox (thomas-maddox)
2017-03-08 14:20:58 Thomas Maddox description We are currently unable to effectively query on nested variables for a resources. Not being able to do so severely hinders the power of this API and harms our value-add. For example, let's say we want to query a series of hosts for which have a disk manufactured by Seagate and the data for this, expressed via variables on hosts, looks like: {     "hardware_profiles": {         "disks": [             {                 "manufacturer": "seagate",                 "capacity": "2TB"             },             {                 "manufacturer": "western",                 "capacity": "5TB"             }         ]     } } We wouldn't be able to effectively query for this condition with our existing minimal variable querying capabilities (simply matches for "key:value"). After some discussion, we've agreed that it'd be more expressive and easier to work with if we were to provide something like JSONPath queries to achieve this. So, the end-result would look something like: craton host-list --vars 'hardware_profiles.disks[*].manufacturer:seagate' There are a few of problems to be solved here: 1. How do we leverage our database's JSON capabilities to achieve querying variables this way? 2. How do we handle the existing data model where a variable can be either a String datatype or a JSON document? 3. How can this be applied to querying for resolved variables? 4. What limitations exist in SQLAlchemy that may prevent or hinder our ability to implement this, and how do we overcome them? Workaround: The interim solution for this lies in flattening the storage of the data to diminish the need for querying nested variables, but it's still not solved entirely, and certainly not in a sustainable way. We are currently unable to effectively query on nested variables for a resources. Not being able to do so severely hinders the power of this API and harms our value-add. For example, let's say we want to query a series of hosts for which have a disk manufactured by Seagate and the data for this, expressed via variables on hosts, looks like: {     "hardware_profiles": {         "disks": [             {                 "manufacturer": "seagate",                 "capacity": "2TB"             },             {                 "manufacturer": "western",                 "capacity": "5TB"             }         ]     } } We wouldn't be able to effectively query for this condition with our existing minimal variable querying capabilities (simply matches for "key:value"). After some discussion, we've agreed that it'd be more expressive and easier to work with if we were to provide something like JSONPath queries to achieve this. So, the end-result would look something like: craton host-list --vars 'hardware_profiles.disks[*].manufacturer:seagate' There are several problems presented: 1. How do we leverage our database's JSON capabilities to achieve querying variables this way? 2. How do we handle the existing data model where a variable can be either a String datatype or a JSON document? 3. How can this be applied to querying for resolved variables? 4. What limitations exist in SQLAlchemy that may prevent or hinder our ability to implement this, and how do we overcome them? 5. In order to support this somewhat cleanly, we'll need to pin our DB requirement at MySQL 5.7, so this imposes a deployer burden. Workaround: The interim solution for this lies in flattening the storage of the data to diminish the need for querying nested variables, but it's still not solved entirely, and certainly not in a sustainable way.
2017-03-08 15:45:32 OpenStack Infra craton: status New In Progress
2017-03-29 16:12:48 OpenStack Infra craton: status In Progress Fix Released