)]}'
{"releasenotes/notes/global-datasource-preference-3ab47b4be09ff3a5.yaml":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"95ee41861d1006581ea8e27c6c7aa81c58b839c6","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher starts to support configuring used datasources and their"},{"line_number":4,"context_line":"    order from a single entry in the configuration file. Specific"},{"line_number":5,"context_line":"    strategies can override this order and use datasource which are"},{"line_number":6,"context_line":"    not listed in the global preference."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"ffb9cba7_bf8321cc","line":5,"range":{"start_line":5,"start_character":56,"end_line":5,"end_character":57},"updated":"2019-04-26 05:59:57.000000000","message":"datasources","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"e639f3e9541876621749126d5b6b01acdf2f723e","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher starts to support configuring used datasources and their"},{"line_number":4,"context_line":"    order from a single entry in the configuration file. Specific"},{"line_number":5,"context_line":"    strategies can override this order and use datasource which are"},{"line_number":6,"context_line":"    not listed in the global preference."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"ffb9cba7_c2ccf8bd","line":5,"range":{"start_line":5,"start_character":56,"end_line":5,"end_character":57},"in_reply_to":"ffb9cba7_bf8321cc","updated":"2019-04-26 07:06:27.000000000","message":"Done","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e8d3816e2602026282096504ec3da02982f0078","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher starts to support configuring used datasources and their"},{"line_number":4,"context_line":"    order from a single entry in the configuration file. Specific"},{"line_number":5,"context_line":"    strategies can override this order and use datasources which are"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_5965a1b4","line":2,"updated":"2019-05-06 15:40:25.000000000","message":"This could be in a follow up docs change, but it seems like it would be good to mention something about global vs per-strategy datasource configuration in the docs here:\n\nhttps://docs.openstack.org/watcher/latest/contributor/plugin/strategy-plugin.html#querying-metrics","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher starts to support configuring used datasources and their"},{"line_number":4,"context_line":"    order from a single entry in the configuration file. Specific"},{"line_number":5,"context_line":"    strategies can override this order and use datasources which are"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_7573c116","line":2,"in_reply_to":"dfbec78f_5965a1b4","updated":"2019-05-07 07:32:04.000000000","message":"I want to go through the overall documentation and update where necessary to better reflect its current state but would like to to that in a separate patch.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher starts to support configuring used datasources and their"},{"line_number":4,"context_line":"    order from a single entry in the configuration file. Specific"},{"line_number":5,"context_line":"    strategies can override this order and use datasources which are"},{"line_number":6,"context_line":"    not listed in the global preference."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_56049015","line":3,"range":{"start_line":3,"start_character":4,"end_line":3,"end_character":58},"updated":"2019-05-06 15:08:54.000000000","message":"nit: suggest re-wording as, \"Watcher now supports configuring which datasources to use...\"","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher starts to support configuring used datasources and their"},{"line_number":4,"context_line":"    order from a single entry in the configuration file. Specific"},{"line_number":5,"context_line":"    strategies can override this order and use datasources which are"},{"line_number":6,"context_line":"    not listed in the global preference."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_15b845c6","line":3,"range":{"start_line":3,"start_character":4,"end_line":3,"end_character":58},"in_reply_to":"dfbec78f_56049015","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher starts to support configuring used datasources and their"},{"line_number":4,"context_line":"    order from a single entry in the configuration file. Specific"},{"line_number":5,"context_line":"    strategies can override this order and use datasources which are"},{"line_number":6,"context_line":"    not listed in the global preference."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_b612ac57","line":4,"range":{"start_line":4,"start_character":17,"end_line":4,"end_character":55},"updated":"2019-05-06 15:08:54.000000000","message":"Mention the specific configuration option here so users don\u0027t have to hunt the config docs for it. So in this case, ``[watcher_datasources]/datasources``.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher starts to support configuring used datasources and their"},{"line_number":4,"context_line":"    order from a single entry in the configuration file. Specific"},{"line_number":5,"context_line":"    strategies can override this order and use datasources which are"},{"line_number":6,"context_line":"    not listed in the global preference."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dfbec78f_35bd49b7","line":4,"range":{"start_line":4,"start_character":17,"end_line":4,"end_character":55},"in_reply_to":"dfbec78f_b612ac57","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef515170ddea1f4905b32fc368ddc722de10f9e8","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    Watcher now supports configuring which datasource to use and in which"},{"line_number":4,"context_line":"    order. This configuration is done by specifying datasources in the"},{"line_number":5,"context_line":"    watcher_datasources section."},{"line_number":6,"context_line":"    ``[watcher_datasources] datasources \u003d gnocchi,monasca,ceilometer``"},{"line_number":7,"context_line":"    Specific strategies can override this order and use datasources which"},{"line_number":8,"context_line":"    are not listed in the global preference."}],"source_content_type":"text/x-yaml","patch_set":16,"id":"dfbec78f_c050a00d","line":6,"range":{"start_line":5,"start_character":31,"end_line":6,"end_character":70},"updated":"2019-05-07 16:39:57.000000000","message":"This renders a bit weird, did you mean to have something like this?\n\n    Watcher now supports configuring which datasource to use and in which\n    order. This configuration is done by specifying datasources in the\n    watcher_datasources section::\n\n      [watcher_datasources] datasources \u003d gnocchi,monasca,ceilometer\n\n    Specific strategies can override this order and use datasources which\n    are not listed in the global preference.","commit_id":"6ff973614ffc167c8d727bf8c326f150c258e1b5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b90e9331557e262b1e653c69930e7ab5a5a24702","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    order. This configuration is done by specifying datasources in the"},{"line_number":6,"context_line":"    watcher_datasources section:"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    - ``[watcher_datasources] datasources \u003d gnocchi,monasca,ceilometer``"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    Specific strategies can override this order and use datasources which"},{"line_number":11,"context_line":"    are not listed in the global preference."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"dfbec78f_3dd0c21f","line":8,"range":{"start_line":8,"start_character":44,"end_line":8,"end_character":70},"updated":"2019-05-07 20:27:47.000000000","message":"nit: order should be gnocchi,ceilometer,monasca but it probably doesn\u0027t matter for this example.","commit_id":"463c9230404cd1cb60b5cc05a72fb264f74df4c3"}],"watcher/common/clients.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_config import cfg"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from cinderclient import client as ciclient"},{"line_number":16,"context_line":"from glanceclient import client as glclient"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_9619a87a","line":13,"updated":"2019-05-06 15:08:54.000000000","message":"This seems unrelated - why not keep this as some separate cleanup patch?","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_config import cfg"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from cinderclient import client as ciclient"},{"line_number":16,"context_line":"from glanceclient import client as glclient"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_f5b6d1d9","line":13,"in_reply_to":"dfbec78f_9619a87a","updated":"2019-05-07 07:32:04.000000000","message":"Circular dependency, necessary.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"8cb0be5ddb5440da3c5c189d3afce120161e348c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_config import cfg"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from cinderclient import client as ciclient"},{"line_number":16,"context_line":"from glanceclient import client as glclient"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_5aaa5cd2","line":13,"in_reply_to":"dfbec78f_e5761607","updated":"2019-05-07 19:21:34.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bbef67d327eff5a996c90cc28f8718f50f37069d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"# under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_config import cfg"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from cinderclient import client as ciclient"},{"line_number":16,"context_line":"from glanceclient import client as glclient"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_e5761607","line":13,"in_reply_to":"dfbec78f_f5b6d1d9","updated":"2019-05-07 16:21:25.000000000","message":"OK, that could have been called out in the commit message.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"}],"watcher/common/exception.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from keystoneclient import exceptions as keystone_exceptions"},{"line_number":29,"context_line":"from oslo_config import cfg"},{"line_number":30,"context_line":"from oslo_log import log"},{"line_number":31,"context_line":"import six"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_3628fc84","line":29,"updated":"2019-05-06 15:08:54.000000000","message":"same","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from keystoneclient import exceptions as keystone_exceptions"},{"line_number":29,"context_line":"from oslo_config import cfg"},{"line_number":30,"context_line":"from oslo_log import log"},{"line_number":31,"context_line":"import six"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_b5c85955","line":29,"in_reply_to":"dfbec78f_3628fc84","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"}],"watcher/conf/datasource.py":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"95ee41861d1006581ea8e27c6c7aa81c58b839c6","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_config import cfg"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from watcher.datasource import manager"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"datasource \u003d cfg.OptGroup(name\u003d\u0027watcher_datasource\u0027,"},{"line_number":24,"context_line":"                          title\u003d\u0027Configuration Options for watcher \u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_1f934d51","line":21,"range":{"start_line":21,"start_character":13,"end_line":21,"end_character":23},"updated":"2019-04-26 05:59:57.000000000","message":"Sometimes, datasource and datasources make me confused, I suggest to unify the format to datasources","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"95ee41861d1006581ea8e27c6c7aa81c58b839c6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from watcher.datasource import manager"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"datasource \u003d cfg.OptGroup(name\u003d\u0027watcher_datasource\u0027,"},{"line_number":24,"context_line":"                          title\u003d\u0027Configuration Options for watcher \u0027"},{"line_number":25,"context_line":"                                \u0027datasources\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"possible_datasources \u003d list(manager.DataSourceManager.metric_map.keys())"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_3f789128","line":24,"range":{"start_line":24,"start_character":66,"end_line":24,"end_character":67},"updated":"2019-04-26 05:59:57.000000000","message":"a trival","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"e639f3e9541876621749126d5b6b01acdf2f723e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from watcher.datasource import manager"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"datasource \u003d cfg.OptGroup(name\u003d\u0027watcher_datasource\u0027,"},{"line_number":24,"context_line":"                          title\u003d\u0027Configuration Options for watcher \u0027"},{"line_number":25,"context_line":"                                \u0027datasources\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"possible_datasources \u003d list(manager.DataSourceManager.metric_map.keys())"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_82c6009a","line":24,"range":{"start_line":24,"start_character":66,"end_line":24,"end_character":67},"in_reply_to":"ffb9cba7_3f789128","updated":"2019-04-26 07:06:27.000000000","message":"Done","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"}],"watcher/conf/datasources.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"datasources \u003d cfg.OptGroup(name\u003d\u0027watcher_datasources\u0027,"},{"line_number":24,"context_line":"                           title\u003d\u0027Configuration Options for watcher\u0027"},{"line_number":25,"context_line":"                                \u0027 datasources\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"possible_datasources \u003d list(manager.DataSourceManager.metric_map.keys())"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_b6c5cc90","line":25,"updated":"2019-05-06 15:08:54.000000000","message":"nit: align the string with the line above","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"datasources \u003d cfg.OptGroup(name\u003d\u0027watcher_datasources\u0027,"},{"line_number":24,"context_line":"                           title\u003d\u0027Configuration Options for watcher\u0027"},{"line_number":25,"context_line":"                                \u0027 datasources\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"possible_datasources \u003d list(manager.DataSourceManager.metric_map.keys())"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_55c55d3b","line":25,"in_reply_to":"dfbec78f_b6c5cc90","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":24,"context_line":"                           title\u003d\u0027Configuration Options for watcher\u0027"},{"line_number":25,"context_line":"                                \u0027 datasources\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"possible_datasources \u003d list(manager.DataSourceManager.metric_map.keys())"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DATASOURCES_OPTS \u003d ["},{"line_number":30,"context_line":"    cfg.ListOpt(\"datasources\","}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_569a5014","line":27,"updated":"2019-05-06 15:08:54.000000000","message":"OK this works because you made metric_map an OrderedDict and moved it to a class level variable.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":24,"context_line":"                           title\u003d\u0027Configuration Options for watcher\u0027"},{"line_number":25,"context_line":"                                \u0027 datasources\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"possible_datasources \u003d list(manager.DataSourceManager.metric_map.keys())"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"DATASOURCES_OPTS \u003d ["},{"line_number":30,"context_line":"    cfg.ListOpt(\"datasources\","}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_75c2e135","line":27,"in_reply_to":"dfbec78f_569a5014","updated":"2019-05-07 07:32:04.000000000","message":"Exactly.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":29,"context_line":"DATASOURCES_OPTS \u003d ["},{"line_number":30,"context_line":"    cfg.ListOpt(\"datasources\","},{"line_number":31,"context_line":"                help\u003d\"Datasources to use in order to query the needed metrics.\""},{"line_number":32,"context_line":"                     \" If one of strategy metric isn\u0027t available in the first\""},{"line_number":33,"context_line":"                     \" datasource, the next datasource will be chosen. This is\""},{"line_number":34,"context_line":"                     \" the default for all strategies unless a strategy has a\""},{"line_number":35,"context_line":"                     \" specific override.\","}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_96bc4806","line":32,"range":{"start_line":32,"start_character":49,"end_line":32,"end_character":54},"updated":"2019-05-06 15:08:54.000000000","message":"nit: avoid contractions in docs","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":29,"context_line":"DATASOURCES_OPTS \u003d ["},{"line_number":30,"context_line":"    cfg.ListOpt(\"datasources\","},{"line_number":31,"context_line":"                help\u003d\"Datasources to use in order to query the needed metrics.\""},{"line_number":32,"context_line":"                     \" If one of strategy metric isn\u0027t available in the first\""},{"line_number":33,"context_line":"                     \" datasource, the next datasource will be chosen. This is\""},{"line_number":34,"context_line":"                     \" the default for all strategies unless a strategy has a\""},{"line_number":35,"context_line":"                     \" specific override.\","}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_15dda513","line":32,"range":{"start_line":32,"start_character":49,"end_line":32,"end_character":54},"in_reply_to":"dfbec78f_96bc4806","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef515170ddea1f4905b32fc368ddc722de10f9e8","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                     \" datasource, the next datasource will be chosen. This is\""},{"line_number":34,"context_line":"                     \" the default for all strategies unless a strategy has a\""},{"line_number":35,"context_line":"                     \" specific override.\","},{"line_number":36,"context_line":"                item_type\u003dcfg.types.String(choices\u003dpossible_datasources),"},{"line_number":37,"context_line":"                default\u003dpossible_datasources)"},{"line_number":38,"context_line":"    ]"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_409350a4","line":36,"updated":"2019-05-07 16:39:57.000000000","message":"Following up on this comment:\n\nhttps://review.opendev.org/#/c/645294/15/watcher/decision_engine/strategy/strategies/noisy_neighbor.py@a107\n\nThe default order of choices does change from \"gnocchi,ceilometer,monasca\" e.g. [1] to \"monasca,gnocchi,ceilometer\" e.g. [2] because of the OrderedDict being used now. Based on that, shouldn\u0027t the OrderedDict be \"gnocchi,ceilometer,monasca\" for backward compat?\n\n[1] https://docs.openstack.org/watcher/latest/configuration/watcher.html#watcher-strategies-noisy-neighbor\n[2] http://logs.openstack.org/94/645294/16/check/openstack-tox-docs/4e80b18/html/configuration/watcher.html#watcher-datasources","commit_id":"6ff973614ffc167c8d727bf8c326f150c258e1b5"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6fda9bb248e12e031ff2d4b8242e6416a72dd6ef","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                     \" datasource, the next datasource will be chosen. This is\""},{"line_number":34,"context_line":"                     \" the default for all strategies unless a strategy has a\""},{"line_number":35,"context_line":"                     \" specific override.\","},{"line_number":36,"context_line":"                item_type\u003dcfg.types.String(choices\u003dpossible_datasources),"},{"line_number":37,"context_line":"                default\u003dpossible_datasources)"},{"line_number":38,"context_line":"    ]"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_ba0598c4","line":36,"in_reply_to":"dfbec78f_409350a4","updated":"2019-05-07 19:29:28.000000000","message":"Done","commit_id":"6ff973614ffc167c8d727bf8c326f150c258e1b5"}],"watcher/datasource/manager.py":[{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"f0615aebbe11e94e14358fbf219eddea1a427d5d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                   self.metric_map[datasource].get(metric) is None):"},{"line_number":80,"context_line":"                        no_metric \u003d True"},{"line_number":81,"context_line":"                        break"},{"line_number":82,"context_line":"            if not no_metric:"},{"line_number":83,"context_line":"                return getattr(self, datasource)"},{"line_number":84,"context_line":"        raise exception.NoSuchMetric()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_0a5da147","line":83,"range":{"start_line":82,"start_character":12,"end_line":83,"end_character":48},"updated":"2019-04-01 06:39:15.000000000","message":"watcher-tempest-basic_optim test failed and the exception is \u0027monasca connection failed. Reason: Unexpected keystone client error occurred: internal endpoint for monitoring service not found: AuthorizationFailure: monasca connection failed. Reason: Unexpected keystone client error occurred: internal endpoint for monitoring service not found\u0027\nI think the reason is there are no monasca endpoints in keyston.\nYou turn the datasours order from [Gnocchi,ceilometer,monasca] to\n[monasca, gnocchi, ceilometer], so it throws exception when getting monasca client.\nMaybe we should catch the exception and continue to try next datasource.","commit_id":"1561121fc6e2a31ea6885ac777382e99254a8479"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"e780fc90ddf2fd126e9540617dc1155d440f11eb","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                   self.metric_map[datasource].get(metric) is None):"},{"line_number":80,"context_line":"                        no_metric \u003d True"},{"line_number":81,"context_line":"                        break"},{"line_number":82,"context_line":"            if not no_metric:"},{"line_number":83,"context_line":"                return getattr(self, datasource)"},{"line_number":84,"context_line":"        raise exception.NoSuchMetric()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_5d45b014","line":83,"range":{"start_line":82,"start_character":12,"end_line":83,"end_character":48},"in_reply_to":"5fc1f717_0a5da147","updated":"2019-04-01 12:43:00.000000000","message":"I have no way to run tempest tests so I might need to spam patchsets until it works.\n\nThe problem with a dictionary is that there is no gauranteed order so the datasource order has actually always been [Gnocchi, Monasca, Ceilomter] if the python version was below 3.5. With the introduction of Python 3.5 the standard dictionary order changed to insertion order.\n\nUsing OrderedDict allows us to have a gauranteed order with every Python version","commit_id":"1561121fc6e2a31ea6885ac777382e99254a8479"}],"watcher/datasources/__init__.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"dfbec78f_169e1856","side":"PARENT","line":1,"updated":"2019-05-06 15:08:54.000000000","message":"Why was this rename necessary in this change? If it\u0027s just cleanup, couldn\u0027t it be a separate patch before this in the series?","commit_id":"92c94f61cabeaa13e00f53909a1bc9df651c1f60"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"26867df120210408e890047f57c76e097985a990","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"dfbec78f_671b1c1b","side":"PARENT","line":1,"in_reply_to":"dfbec78f_169e1856","updated":"2019-05-06 18:04:12.000000000","message":"I guess it was asked for in an earlier review:\n\nhttps://review.opendev.org/#/c/645294/9/watcher/conf/datasource.py@21\n\nI\u0027m not -1 on it in this change, but I\u0027d personally split something like this out of the main functional change to make that more focused and easy to review.","commit_id":"92c94f61cabeaa13e00f53909a1bc9df651c1f60"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"dfbec78f_d5e62de9","side":"PARENT","line":1,"in_reply_to":"dfbec78f_671b1c1b","updated":"2019-05-07 07:32:04.000000000","message":"Done at the request of another core would have been better in separate patch indeed.","commit_id":"92c94f61cabeaa13e00f53909a1bc9df651c1f60"}],"watcher/datasources/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class DataSourceManager(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    _metric_map \u003d ["},{"line_number":27,"context_line":"        (mon.MonascaHelper.NAME, mon.MonascaHelper.METRIC_MAP),"},{"line_number":28,"context_line":"        (gnoc.GnocchiHelper.NAME, gnoc.GnocchiHelper.METRIC_MAP),"},{"line_number":29,"context_line":"        (ceil.CeilometerHelper.NAME, ceil.CeilometerHelper.METRIC_MAP)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_d6cde05d","line":26,"range":{"start_line":26,"start_character":18,"end_line":26,"end_character":19},"updated":"2019-05-06 15:08:54.000000000","message":"Why have the separate list of tuples? Why not just have a single metric_map variable that is the OrderedDict?","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class DataSourceManager(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    _metric_map \u003d ["},{"line_number":27,"context_line":"        (mon.MonascaHelper.NAME, mon.MonascaHelper.METRIC_MAP),"},{"line_number":28,"context_line":"        (gnoc.GnocchiHelper.NAME, gnoc.GnocchiHelper.METRIC_MAP),"},{"line_number":29,"context_line":"        (ceil.CeilometerHelper.NAME, ceil.CeilometerHelper.METRIC_MAP)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_f5eb31ad","line":26,"range":{"start_line":26,"start_character":18,"end_line":26,"end_character":19},"in_reply_to":"dfbec78f_d6cde05d","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            if not no_metric:"},{"line_number":83,"context_line":"                try:"},{"line_number":84,"context_line":"                    return getattr(self, datasource)"},{"line_number":85,"context_line":"                except Exception:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"        raise exception.NoSuchMetric()"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_3606bc88","line":86,"range":{"start_line":85,"start_character":16,"end_line":86,"end_character":24},"updated":"2019-05-06 15:08:54.000000000","message":"Why? What has changed that requires this? Seems like if this fails for some legitimate reason it\u0027s going to be really hard to debug. At least add a comment?\n\nYou should also have a test for this if it matters so someone doesn\u0027t regress it later.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            if not no_metric:"},{"line_number":83,"context_line":"                try:"},{"line_number":84,"context_line":"                    return getattr(self, datasource)"},{"line_number":85,"context_line":"                except Exception:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"        raise exception.NoSuchMetric()"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_b5cdb95e","line":86,"range":{"start_line":85,"start_character":16,"end_line":86,"end_character":24},"in_reply_to":"dfbec78f_3606bc88","updated":"2019-05-07 07:32:04.000000000","message":"Retrieving a datasource can fail which throws an exception. With this addition in place the next datasource will be attempted instead of just failing.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"8cb0be5ddb5440da3c5c189d3afce120161e348c","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            if not no_metric:"},{"line_number":83,"context_line":"                try:"},{"line_number":84,"context_line":"                    return getattr(self, datasource)"},{"line_number":85,"context_line":"                except Exception:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"        raise exception.NoSuchMetric()"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_ba84b85f","line":86,"range":{"start_line":85,"start_character":16,"end_line":86,"end_character":24},"in_reply_to":"dfbec78f_45512262","updated":"2019-05-07 19:21:34.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bbef67d327eff5a996c90cc28f8718f50f37069d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            if not no_metric:"},{"line_number":83,"context_line":"                try:"},{"line_number":84,"context_line":"                    return getattr(self, datasource)"},{"line_number":85,"context_line":"                except Exception:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"        raise exception.NoSuchMetric()"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_45512262","line":86,"range":{"start_line":85,"start_character":16,"end_line":86,"end_character":24},"in_reply_to":"dfbec78f_b5cdb95e","updated":"2019-05-07 16:21:25.000000000","message":"OK would be good to have a comment for that and a test.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef515170ddea1f4905b32fc368ddc722de10f9e8","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class DataSourceManager(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    metric_map \u003d OrderedDict(["},{"line_number":27,"context_line":"        (mon.MonascaHelper.NAME, mon.MonascaHelper.METRIC_MAP),"},{"line_number":28,"context_line":"        (gnoc.GnocchiHelper.NAME, gnoc.GnocchiHelper.METRIC_MAP),"},{"line_number":29,"context_line":"        (ceil.CeilometerHelper.NAME, ceil.CeilometerHelper.METRIC_MAP)"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_60f3f40b","line":26,"updated":"2019-05-07 16:39:57.000000000","message":"As mentioned elsewhere, the default datasource order before this change was gnocchi, ceilometer, monasca:\n\nhttps://docs.openstack.org/watcher/latest/configuration/watcher.html#watcher-strategies-noisy-neighbor\n\nSo your keys should probably reflect that:\n\nhttps://review.opendev.org/#/c/645294/16/watcher/decision_engine/strategy/strategies/noisy_neighbor.py@a107","commit_id":"6ff973614ffc167c8d727bf8c326f150c258e1b5"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6fda9bb248e12e031ff2d4b8242e6416a72dd6ef","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class DataSourceManager(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    metric_map \u003d OrderedDict(["},{"line_number":27,"context_line":"        (mon.MonascaHelper.NAME, mon.MonascaHelper.METRIC_MAP),"},{"line_number":28,"context_line":"        (gnoc.GnocchiHelper.NAME, gnoc.GnocchiHelper.METRIC_MAP),"},{"line_number":29,"context_line":"        (ceil.CeilometerHelper.NAME, ceil.CeilometerHelper.METRIC_MAP)"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_fa0230b4","line":26,"in_reply_to":"dfbec78f_60f3f40b","updated":"2019-05-07 19:29:28.000000000","message":"Done","commit_id":"6ff973614ffc167c8d727bf8c326f150c258e1b5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef515170ddea1f4905b32fc368ddc722de10f9e8","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                        no_metric \u003d True"},{"line_number":80,"context_line":"                        break"},{"line_number":81,"context_line":"            if not no_metric:"},{"line_number":82,"context_line":"                try:"},{"line_number":83,"context_line":"                    return getattr(self, datasource)"},{"line_number":84,"context_line":"                except Exception:"},{"line_number":85,"context_line":"                    pass"},{"line_number":86,"context_line":"        raise exception.NoSuchMetric()"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_05a7aa51","line":85,"range":{"start_line":82,"start_character":16,"end_line":85,"end_character":24},"updated":"2019-05-07 16:39:57.000000000","message":"I still think you should have a comment and a test for this.","commit_id":"6ff973614ffc167c8d727bf8c326f150c258e1b5"}],"watcher/decision_engine/strategy/context/base.py":[{"author":{"_account_id":5575,"name":"Jose Castro Leon","email":"jose.castro.leon@cern.ch","username":"jose-castro-leon"},"change_message_id":"fbaafcc49daed78964898648a5f999493d720710","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":49,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":50,"context_line":"            return solution"},{"line_number":51,"context_line":"        except Exception as e:"},{"line_number":52,"context_line":"            notifications.audit.send_action_notification("},{"line_number":53,"context_line":"                request_context, audit,"},{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"}],"source_content_type":"text/x-python","patch_set":13,"id":"dfbec78f_00e4a5ab","line":51,"updated":"2019-05-03 22:12:58.000000000","message":"Is this needed? This is not used afterwards","commit_id":"d51681208cedf40364e68c0dd95db1cbbb5716dc"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"678c97482e9c65b3266de98df0581f660695d39f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":49,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":50,"context_line":"            return solution"},{"line_number":51,"context_line":"        except Exception as e:"},{"line_number":52,"context_line":"            notifications.audit.send_action_notification("},{"line_number":53,"context_line":"                request_context, audit,"},{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"}],"source_content_type":"text/x-python","patch_set":13,"id":"dfbec78f_b9e94b81","line":51,"in_reply_to":"dfbec78f_00e4a5ab","updated":"2019-05-05 05:49:34.000000000","message":"Hello, i think \"as e\" is needed. In pep8, it recommend to use specific exception instend of a bare except.\nhttps://www.python.org/dev/peps/pep-0008/#programming-recommendations","commit_id":"d51681208cedf40364e68c0dd95db1cbbb5716dc"},{"author":{"_account_id":5575,"name":"Jose Castro Leon","email":"jose.castro.leon@cern.ch","username":"jose-castro-leon"},"change_message_id":"e127529730dbd72e8613fb55c7257b155320eda3","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":49,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":50,"context_line":"            return solution"},{"line_number":51,"context_line":"        except Exception as e:"},{"line_number":52,"context_line":"            notifications.audit.send_action_notification("},{"line_number":53,"context_line":"                request_context, audit,"},{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"}],"source_content_type":"text/x-python","patch_set":13,"id":"dfbec78f_e4507335","line":51,"in_reply_to":"dfbec78f_b9e94b81","updated":"2019-05-06 06:02:24.000000000","message":"But then why not raise e in L57?. I say that because e is not used in the block","commit_id":"d51681208cedf40364e68c0dd95db1cbbb5716dc"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"69c11135784eff6d62f08db651ea04489005968b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":49,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":50,"context_line":"            return solution"},{"line_number":51,"context_line":"        except Exception as e:"},{"line_number":52,"context_line":"            notifications.audit.send_action_notification("},{"line_number":53,"context_line":"                request_context, audit,"},{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"}],"source_content_type":"text/x-python","patch_set":13,"id":"dfbec78f_3dc21e35","line":51,"in_reply_to":"dfbec78f_c7fe9104","updated":"2019-05-06 09:43:19.000000000","message":"Done","commit_id":"d51681208cedf40364e68c0dd95db1cbbb5716dc"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"37d8f61630ad5efd66fca5ffa624320447e40aac","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":49,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":50,"context_line":"            return solution"},{"line_number":51,"context_line":"        except Exception as e:"},{"line_number":52,"context_line":"            notifications.audit.send_action_notification("},{"line_number":53,"context_line":"                request_context, audit,"},{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"}],"source_content_type":"text/x-python","patch_set":13,"id":"dfbec78f_c7fe9104","line":51,"in_reply_to":"dfbec78f_e4507335","updated":"2019-05-06 06:10:05.000000000","message":"Yes, i agree with you. If e is used, it\u0027s better ro raise e in L57 or remove e.","commit_id":"d51681208cedf40364e68c0dd95db1cbbb5716dc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":55,"context_line":"                priority\u003dfields.NotificationPriority.ERROR,"},{"line_number":56,"context_line":"                phase\u003dfields.NotificationPhase.ERROR)"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @abc.abstractmethod"},{"line_number":60,"context_line":"    def do_execute_strategy(self, audit, request_context):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_76f3d49f","line":57,"updated":"2019-05-06 15:08:54.000000000","message":"You shouldn\u0027t need this. If you do, a better way would be to use oslo_utils.executils.save_and_reraise_exception so you don\u0027t switch context during the notification (does watcher use eventlet btw?). So:\n\nexcept Exception:\n   with excutils.save_and_reraise_exception():\n       notifications.audit.send_action_notification(...)\n\nBut it\u0027s not clear why you need to make this change in this patch.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"8cb0be5ddb5440da3c5c189d3afce120161e348c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":55,"context_line":"                priority\u003dfields.NotificationPriority.ERROR,"},{"line_number":56,"context_line":"                phase\u003dfields.NotificationPhase.ERROR)"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @abc.abstractmethod"},{"line_number":60,"context_line":"    def do_execute_strategy(self, audit, request_context):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_9a81b44d","line":57,"in_reply_to":"dfbec78f_25dbceed","updated":"2019-05-07 19:21:34.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bbef67d327eff5a996c90cc28f8718f50f37069d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":55,"context_line":"                priority\u003dfields.NotificationPriority.ERROR,"},{"line_number":56,"context_line":"                phase\u003dfields.NotificationPhase.ERROR)"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @abc.abstractmethod"},{"line_number":60,"context_line":"    def do_execute_strategy(self, audit, request_context):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_25dbceed","line":57,"in_reply_to":"dfbec78f_350b098f","updated":"2019-05-07 16:21:25.000000000","message":"Hmm, but you didn\u0027t add the new code. So is this some pep8 failure or all watcher changes right now? If so, seems it should be fixed separately, else you can use # noqa to ignore it.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":55,"context_line":"                priority\u003dfields.NotificationPriority.ERROR,"},{"line_number":56,"context_line":"                phase\u003dfields.NotificationPhase.ERROR)"},{"line_number":57,"context_line":"            raise e"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @abc.abstractmethod"},{"line_number":60,"context_line":"    def do_execute_strategy(self, audit, request_context):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_350b098f","line":57,"in_reply_to":"dfbec78f_76f3d49f","updated":"2019-05-07 07:32:04.000000000","message":"Change is necessary because otherwise pep8 complains that exception is to broad.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef515170ddea1f4905b32fc368ddc722de10f9e8","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":49,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":50,"context_line":"            return solution"},{"line_number":51,"context_line":"        except Exception as e:"},{"line_number":52,"context_line":"            notifications.audit.send_action_notification("},{"line_number":53,"context_line":"                request_context, audit,"},{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_455b6253","line":51,"updated":"2019-05-07 16:39:57.000000000","message":"Still not sure why you need this - nothing else is failing without this. I pulled your change down, removed this change, and it passes pep8. -1 for this.","commit_id":"6ff973614ffc167c8d727bf8c326f150c258e1b5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5e52355181cc5940ba5dfe14570e1cb44f9a3161","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"},{"line_number":49,"context_line":"                phase\u003dfields.NotificationPhase.END)"},{"line_number":50,"context_line":"            return solution"},{"line_number":51,"context_line":"        except Exception as e:"},{"line_number":52,"context_line":"            notifications.audit.send_action_notification("},{"line_number":53,"context_line":"                request_context, audit,"},{"line_number":54,"context_line":"                action\u003dfields.NotificationAction.STRATEGY,"}],"source_content_type":"text/x-python","patch_set":16,"id":"dfbec78f_4b0e1133","line":51,"in_reply_to":"dfbec78f_455b6253","updated":"2019-05-07 17:13:37.000000000","message":"Also see https://review.opendev.org/#/c/657643/","commit_id":"6ff973614ffc167c8d727bf8c326f150c258e1b5"}],"watcher/decision_engine/strategy/strategies/base.py":[{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"fef1952ba4e44faca7458f173af2f2ddc4d33eb8","unresolved":false,"context_lines":[{"line_number":357,"context_line":""},{"line_number":358,"context_line":"            \"\"\"Load the global preferred datasource order but override it"},{"line_number":359,"context_line":"            if the strategy has a spefic datasource config\"\"\""},{"line_number":360,"context_line":"            datasources \u003d CONF.watcher_datasource"},{"line_number":361,"context_line":"            if self.config.datasources:"},{"line_number":362,"context_line":"                datasources \u003d self.config"},{"line_number":363,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ffb9cba7_45e780ad","line":360,"range":{"start_line":360,"start_character":31,"end_line":360,"end_character":49},"updated":"2019-04-30 07:52:37.000000000","message":"watcher_datasources","commit_id":"e33b0c5e654673d3ab983f32f49afc18ac5632cf"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"864ad6db4d1376791d69a5ccc960ff550f8c9084","unresolved":false,"context_lines":[{"line_number":357,"context_line":""},{"line_number":358,"context_line":"            \"\"\"Load the global preferred datasource order but override it"},{"line_number":359,"context_line":"            if the strategy has a spefic datasource config\"\"\""},{"line_number":360,"context_line":"            datasources \u003d CONF.watcher_datasource"},{"line_number":361,"context_line":"            if self.config.datasources:"},{"line_number":362,"context_line":"                datasources \u003d self.config"},{"line_number":363,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ffb9cba7_e501d407","line":360,"range":{"start_line":360,"start_character":31,"end_line":360,"end_character":49},"in_reply_to":"ffb9cba7_45e780ad","updated":"2019-04-30 08:13:00.000000000","message":"Good catch, done.","commit_id":"e33b0c5e654673d3ab983f32f49afc18ac5632cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    DATASOURCE_METRICS \u003d []"},{"line_number":133,"context_line":"    \"\"\"Contains all metrics the strategy requires from a datasource to properly"},{"line_number":134,"context_line":"        execute\"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def __init__(self, config, osc\u003dNone):"},{"line_number":137,"context_line":"        \"\"\"Constructor: the signature should be identical within the subclasses"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_163a9835","line":134,"range":{"start_line":134,"start_character":4,"end_line":134,"end_character":8},"updated":"2019-05-06 15:08:54.000000000","message":"nit: nix the whitespace","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    DATASOURCE_METRICS \u003d []"},{"line_number":133,"context_line":"    \"\"\"Contains all metrics the strategy requires from a datasource to properly"},{"line_number":134,"context_line":"        execute\"\"\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def __init__(self, config, osc\u003dNone):"},{"line_number":137,"context_line":"        \"\"\"Constructor: the signature should be identical within the subclasses"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_b5f6198f","line":134,"range":{"start_line":134,"start_character":4,"end_line":134,"end_character":8},"in_reply_to":"dfbec78f_163a9835","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            cfg.ListOpt("},{"line_number":207,"context_line":"                \"datasources\","},{"line_number":208,"context_line":"                help\u003d\"Datasources to use in order to query the needed metrics.\""},{"line_number":209,"context_line":"                     \" If the strategy requires a specific datasource,\""},{"line_number":210,"context_line":"                     \" options: {0}\".format(datasources_ops),"},{"line_number":211,"context_line":"                item_type\u003dcfg.types.String(choices\u003ddatasources_ops),"},{"line_number":212,"context_line":"                default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_161378b7","line":209,"range":{"start_line":209,"start_character":23,"end_line":209,"end_character":69},"updated":"2019-05-06 15:08:54.000000000","message":"This seems like an incomplete sentence. Isn\u0027t the intent here to say that there is a global datasources option but this allows overriding the datasource preference on a per-strategy basis?","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            cfg.ListOpt("},{"line_number":207,"context_line":"                \"datasources\","},{"line_number":208,"context_line":"                help\u003d\"Datasources to use in order to query the needed metrics.\""},{"line_number":209,"context_line":"                     \" If the strategy requires a specific datasource,\""},{"line_number":210,"context_line":"                     \" options: {0}\".format(datasources_ops),"},{"line_number":211,"context_line":"                item_type\u003dcfg.types.String(choices\u003ddatasources_ops),"},{"line_number":212,"context_line":"                default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_55f31d9f","line":209,"range":{"start_line":209,"start_character":23,"end_line":209,"end_character":69},"in_reply_to":"dfbec78f_161378b7","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e8d3816e2602026282096504ec3da02982f0078","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        return {}"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    @property"},{"line_number":355,"context_line":"    def datasource_backend(self):"},{"line_number":356,"context_line":"        if not self._datasource_backend:"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"            \"\"\"Load the global preferred datasources order but override it"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_d970b175","line":355,"updated":"2019-05-06 15:40:25.000000000","message":"There are docs that talk about this:\n\nhttps://docs.openstack.org/watcher/latest/contributor/plugin/strategy-plugin.html#read-usage-metrics-using-the-watcher-datasource-helper\n\nShould those docs be updated now for this change? Seems like they should.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        return {}"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    @property"},{"line_number":355,"context_line":"    def datasource_backend(self):"},{"line_number":356,"context_line":"        if not self._datasource_backend:"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"            \"\"\"Load the global preferred datasources order but override it"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_75f0a191","line":355,"in_reply_to":"dfbec78f_d970b175","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":355,"context_line":"    def datasource_backend(self):"},{"line_number":356,"context_line":"        if not self._datasource_backend:"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"            \"\"\"Load the global preferred datasources order but override it"},{"line_number":359,"context_line":"            if the strategy has a spefic datasources config\"\"\""},{"line_number":360,"context_line":"            datasources \u003d CONF.watcher_datasources"},{"line_number":361,"context_line":"            if self.config.datasources:"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_762194fb","line":358,"range":{"start_line":358,"start_character":12,"end_line":358,"end_character":15},"updated":"2019-05-06 15:08:54.000000000","message":"nit: just use regular code comments:\n\n# Load the global preferred datasources order but override it\n# if the strategy has a spefic datasources config","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":355,"context_line":"    def datasource_backend(self):"},{"line_number":356,"context_line":"        if not self._datasource_backend:"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"            \"\"\"Load the global preferred datasources order but override it"},{"line_number":359,"context_line":"            if the strategy has a spefic datasources config\"\"\""},{"line_number":360,"context_line":"            datasources \u003d CONF.watcher_datasources"},{"line_number":361,"context_line":"            if self.config.datasources:"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_152b65eb","line":358,"range":{"start_line":358,"start_character":12,"end_line":358,"end_character":15},"in_reply_to":"dfbec78f_762194fb","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        if not self._datasource_backend:"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"            \"\"\"Load the global preferred datasources order but override it"},{"line_number":359,"context_line":"            if the strategy has a spefic datasources config\"\"\""},{"line_number":360,"context_line":"            datasources \u003d CONF.watcher_datasources"},{"line_number":361,"context_line":"            if self.config.datasources:"},{"line_number":362,"context_line":"                datasources \u003d self.config"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_961e88b8","line":359,"range":{"start_line":359,"start_character":34,"end_line":359,"end_character":40},"updated":"2019-05-06 15:08:54.000000000","message":"specific","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        if not self._datasource_backend:"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"            \"\"\"Load the global preferred datasources order but override it"},{"line_number":359,"context_line":"            if the strategy has a spefic datasources config\"\"\""},{"line_number":360,"context_line":"            datasources \u003d CONF.watcher_datasources"},{"line_number":361,"context_line":"            if self.config.datasources:"},{"line_number":362,"context_line":"                datasources \u003d self.config"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_d534ed4c","line":359,"range":{"start_line":359,"start_character":34,"end_line":359,"end_character":40},"in_reply_to":"dfbec78f_961e88b8","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        return \"dummy\""},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    @classmethod"},{"line_number":453,"context_line":"    def get_config_opts(cls):"},{"line_number":454,"context_line":"        \"\"\"Override base class config options as do not use datasource \"\"\""},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_f68264c8","line":453,"updated":"2019-05-06 15:08:54.000000000","message":"Why are you overriding the BaseStrategy classmethod which already implements the default behavior of just returning an empty list here and below? Why not just let the parent class method handle that and only override if you need to implement something different?","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bbef67d327eff5a996c90cc28f8718f50f37069d","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        return \"dummy\""},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    @classmethod"},{"line_number":453,"context_line":"    def get_config_opts(cls):"},{"line_number":454,"context_line":"        \"\"\"Override base class config options as do not use datasource \"\"\""},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_c5f3d272","line":453,"in_reply_to":"dfbec78f_5548fdca","updated":"2019-05-07 16:21:25.000000000","message":"OK, maybe a note for the commit message, but I\u0027m not sure if it would have helped me.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":450,"context_line":"        return \"dummy\""},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    @classmethod"},{"line_number":453,"context_line":"    def get_config_opts(cls):"},{"line_number":454,"context_line":"        \"\"\"Override base class config options as do not use datasource \"\"\""},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_5548fdca","line":453,"in_reply_to":"dfbec78f_f68264c8","updated":"2019-05-07 07:32:04.000000000","message":"Not all strategies use datasources exposing config options about datasources to strategies that don\u0027t use them is confusing to end users.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"}],"watcher/decision_engine/strategy/strategies/basic_consolidation.py":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"95ee41861d1006581ea8e27c6c7aa81c58b839c6","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        return super(BasicConsolidation, cls).get_config_opts() + ["},{"line_number":176,"context_line":"            cfg.BoolOpt("},{"line_number":177,"context_line":"                \"check_optimize_metadata\","},{"line_number":178,"context_line":"                help\u003d\"Check optimize metadata field in instance before \""},{"line_number":179,"context_line":"                     \"migration\","},{"line_number":180,"context_line":"                default\u003dFalse),"},{"line_number":181,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_1f2fcdf6","line":178,"range":{"start_line":178,"start_character":70,"end_line":178,"end_character":71},"updated":"2019-04-26 05:59:57.000000000","message":"the same","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"e639f3e9541876621749126d5b6b01acdf2f723e","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        return super(BasicConsolidation, cls).get_config_opts() + ["},{"line_number":176,"context_line":"            cfg.BoolOpt("},{"line_number":177,"context_line":"                \"check_optimize_metadata\","},{"line_number":178,"context_line":"                help\u003d\"Check optimize metadata field in instance before \""},{"line_number":179,"context_line":"                     \"migration\","},{"line_number":180,"context_line":"                default\u003dFalse),"},{"line_number":181,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_42c0087c","line":178,"range":{"start_line":178,"start_character":70,"end_line":178,"end_character":71},"in_reply_to":"ffb9cba7_1f2fcdf6","updated":"2019-04-26 07:06:27.000000000","message":"Done","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"}],"watcher/decision_engine/strategy/strategies/noisy_neighbor.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                     \" datasource, the next datasource will be chosen.\","},{"line_number":105,"context_line":"                item_type\u003dcfg.types.String(choices\u003d[\u0027gnocchi\u0027, \u0027ceilometer\u0027,"},{"line_number":106,"context_line":"                                                    \u0027monasca\u0027]),"},{"line_number":107,"context_line":"                default\u003d[\u0027gnocchi\u0027, \u0027ceilometer\u0027, \u0027monasca\u0027])"},{"line_number":108,"context_line":"        ]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def get_current_and_previous_cache(self, instance):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_f65b4484","side":"PARENT","line":107,"updated":"2019-05-06 15:08:54.000000000","message":"There does appear to be a behavior change here, see the docs on this per-strategy option before this change:\n\nhttps://docs.openstack.org/watcher/latest/configuration/watcher.html#watcher-strategies-noisy-neighbor\n\nand then after:\n\nhttp://logs.openstack.org/94/645294/15/check/openstack-tox-docs/e7aeb4a/html/configuration/watcher.html#watcher-strategies-noisy-neighbor\n\nnote that the default is now None whereas it used to be gnocchi,ceilometer,monasca. I guess that\u0027s intentional though, right? Because the default is now global:\n\nhttp://logs.openstack.org/94/645294/15/check/openstack-tox-docs/e7aeb4a/html/configuration/watcher.html#watcher_datasources.datasources\n\nAnd not overridden per strategy, but you can if you want.\n\nAnd there should not be any upgrade impact right? If someone had per-strategy datasources configured they\u0027d continue to use those rather than the new global datasources option.","commit_id":"92c94f61cabeaa13e00f53909a1bc9df651c1f60"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bbef67d327eff5a996c90cc28f8718f50f37069d","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                     \" datasource, the next datasource will be chosen.\","},{"line_number":105,"context_line":"                item_type\u003dcfg.types.String(choices\u003d[\u0027gnocchi\u0027, \u0027ceilometer\u0027,"},{"line_number":106,"context_line":"                                                    \u0027monasca\u0027]),"},{"line_number":107,"context_line":"                default\u003d[\u0027gnocchi\u0027, \u0027ceilometer\u0027, \u0027monasca\u0027])"},{"line_number":108,"context_line":"        ]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def get_current_and_previous_cache(self, instance):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_e5fdb63a","side":"PARENT","line":107,"in_reply_to":"dfbec78f_d582adc8","updated":"2019-05-07 16:21:25.000000000","message":"Yup, I realized once I talked my way through this.","commit_id":"92c94f61cabeaa13e00f53909a1bc9df651c1f60"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                     \" datasource, the next datasource will be chosen.\","},{"line_number":105,"context_line":"                item_type\u003dcfg.types.String(choices\u003d[\u0027gnocchi\u0027, \u0027ceilometer\u0027,"},{"line_number":106,"context_line":"                                                    \u0027monasca\u0027]),"},{"line_number":107,"context_line":"                default\u003d[\u0027gnocchi\u0027, \u0027ceilometer\u0027, \u0027monasca\u0027])"},{"line_number":108,"context_line":"        ]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def get_current_and_previous_cache(self, instance):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_d582adc8","side":"PARENT","line":107,"in_reply_to":"dfbec78f_f65b4484","updated":"2019-05-07 07:32:04.000000000","message":"No behavioral change, this config options are still available to this strategy but they are now inherited from the strategy base class.\n\nSince the global default is the same order as before nothing changes. If the user has set specific strategy override it will still apply or if they did not it will still be gnocchi,ceilometer,monasca","commit_id":"92c94f61cabeaa13e00f53909a1bc9df651c1f60"}],"watcher/tests/decision_engine/loading/test_default_strategy_loader.py":[{"author":{"_account_id":5575,"name":"Jose Castro Leon","email":"jose.castro.leon@cern.ch","username":"jose-castro-leon"},"change_message_id":"fbaafcc49daed78964898648a5f999493d720710","unresolved":false,"context_lines":[{"line_number":65,"context_line":"class TestLoadStrategiesWithDefaultStrategyLoader(base.TestCase):"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    strategy_loader \u003d default_loading.DefaultStrategyLoader()"},{"line_number":68,"context_line":"    scenarios \u003d ["},{"line_number":69,"context_line":"        (strategy_name,"},{"line_number":70,"context_line":"         {\"strategy_name\": strategy_name, \"strategy_cls\": strategy_cls})"},{"line_number":71,"context_line":"        for strategy_name, strategy_cls"}],"source_content_type":"text/x-python","patch_set":13,"id":"dfbec78f_e0c2b1e9","line":68,"range":{"start_line":68,"start_character":4,"end_line":68,"end_character":13},"updated":"2019-05-03 22:12:58.000000000","message":"I don\u0027t think you need to remove this line as there is no changes in the whole test","commit_id":"d51681208cedf40364e68c0dd95db1cbbb5716dc"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"69c11135784eff6d62f08db651ea04489005968b","unresolved":false,"context_lines":[{"line_number":65,"context_line":"class TestLoadStrategiesWithDefaultStrategyLoader(base.TestCase):"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    strategy_loader \u003d default_loading.DefaultStrategyLoader()"},{"line_number":68,"context_line":"    scenarios \u003d ["},{"line_number":69,"context_line":"        (strategy_name,"},{"line_number":70,"context_line":"         {\"strategy_name\": strategy_name, \"strategy_cls\": strategy_cls})"},{"line_number":71,"context_line":"        for strategy_name, strategy_cls"}],"source_content_type":"text/x-python","patch_set":13,"id":"dfbec78f_dddc221a","line":68,"range":{"start_line":68,"start_character":4,"end_line":68,"end_character":13},"in_reply_to":"dfbec78f_e0c2b1e9","updated":"2019-05-06 09:43:19.000000000","message":"Done","commit_id":"d51681208cedf40364e68c0dd95db1cbbb5716dc"}],"watcher/tests/decision_engine/strategy/strategies/test_base.py":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"95ee41861d1006581ea8e27c6c7aa81c58b839c6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*"},{"line_number":2,"context_line":"# Copyright (c) 2019 European Organization for Nuclear Research (CERN)"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_9fcc1d62","line":1,"range":{"start_line":1,"start_character":22,"end_line":1,"end_character":24},"updated":"2019-04-26 05:59:57.000000000","message":"-*-","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"e639f3e9541876621749126d5b6b01acdf2f723e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*"},{"line_number":2,"context_line":"# Copyright (c) 2019 European Organization for Nuclear Research (CERN)"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"}],"source_content_type":"text/x-python","patch_set":9,"id":"ffb9cba7_62bbcc0d","line":1,"range":{"start_line":1,"start_character":22,"end_line":1,"end_character":24},"in_reply_to":"ffb9cba7_9fcc1d62","updated":"2019-04-26 07:06:27.000000000","message":"Done","commit_id":"e771ec7fb59e66f42ecf73ba221a500ef4826538"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aca8dd3e52e59349a4a30fdb981a5be0d7f11105","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        m_conf.watcher_datasources.datasources \u003d \\"},{"line_number":67,"context_line":"            [\u0027gnocchi\u0027, \u0027monasca\u0027, \u0027ceilometer\u0027]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        self.strategy.datasource_backend"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        m_manager.assert_called_once_with("},{"line_number":72,"context_line":"            config\u003dm_conf.watcher_datasources, osc\u003dNone)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_36c79c15","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":40},"updated":"2019-05-06 15:08:54.000000000","message":"This looks a bit weird, a comment would help. I guess the point is that DataSourceManager is constructed with the globally-configured datasources.","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"6a4cc72980fc31da66d2921d0f49f502ea3aa1c7","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        m_conf.watcher_datasources.datasources \u003d \\"},{"line_number":67,"context_line":"            [\u0027gnocchi\u0027, \u0027monasca\u0027, \u0027ceilometer\u0027]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        self.strategy.datasource_backend"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        m_manager.assert_called_once_with("},{"line_number":72,"context_line":"            config\u003dm_conf.watcher_datasources, osc\u003dNone)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfbec78f_956c3537","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":40},"in_reply_to":"dfbec78f_36c79c15","updated":"2019-05-07 07:32:04.000000000","message":"Done","commit_id":"c64acf4033cdc15c25ac98d3486cc866b5041019"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"3c0926b8bf7c0b01675c3e353cc79b8c1f97a9db","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # Access the property so that the configuration is read in order to"},{"line_number":86,"context_line":"        # get the correct datasource"},{"line_number":87,"context_line":"        self.strategy.datasource_backend"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        m_manager.assert_called_once_with("},{"line_number":90,"context_line":"            config\u003dm_conf.watcher_datasources, osc\u003dNone)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_6d4d1271","line":87,"range":{"start_line":87,"start_character":7,"end_line":87,"end_character":40},"updated":"2019-05-09 03:04:30.000000000","message":"Hello, i understand your purpose to acess the property. But looking at this line of code alone is a bit strange. Maybe we could add an assertNone like this: self.assertNone( self.strategy.datasource_backend)","commit_id":"463c9230404cd1cb60b5cc05a72fb264f74df4c3"},{"author":{"_account_id":29911,"name":"Dantali0n","email":"info@dantalion.nl","username":"Dantali0n"},"change_message_id":"60fcacd75209a43b49443bf5184a7f6dbc654f6c","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # Access the property so that the configuration is read in order to"},{"line_number":86,"context_line":"        # get the correct datasource"},{"line_number":87,"context_line":"        self.strategy.datasource_backend"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        m_manager.assert_called_once_with("},{"line_number":90,"context_line":"            config\u003dm_conf.watcher_datasources, osc\u003dNone)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_b06a82b0","line":87,"range":{"start_line":87,"start_character":7,"end_line":87,"end_character":40},"in_reply_to":"dfbec78f_6d4d1271","updated":"2019-05-09 07:31:14.000000000","message":"I think the comment should suffice if anything I think adding assertNone will add to the confusion. Additionally, assertNone is never used in Watcher\u0027s code so developers might not expect it.","commit_id":"463c9230404cd1cb60b5cc05a72fb264f74df4c3"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"09816792a5aceb981a320668c5e0e50e8b95783d","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # Access the property so that the configuration is read in order to"},{"line_number":86,"context_line":"        # get the correct datasource"},{"line_number":87,"context_line":"        self.strategy.datasource_backend"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        m_manager.assert_called_once_with("},{"line_number":90,"context_line":"            config\u003dm_conf.watcher_datasources, osc\u003dNone)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_3015329d","line":87,"range":{"start_line":87,"start_character":7,"end_line":87,"end_character":40},"in_reply_to":"dfbec78f_b06a82b0","updated":"2019-05-09 08:35:18.000000000","message":"In watcher, Many tests use assertIsNone and assertIsNotNone, such as: test_nova_helper.py https://github.com/openstack/watcher/blob/d1f80f9d5a3fa7efce2d67c6e1f624a557cdfee2/watcher/tests/common/test_nova_helper.py\n\nIn this part, your comment is already full. I agree that we add assert will bring confusion to developers. I think we can use\nself.strategy.datasource_backend() replace self.strategy.datasource_backend, although they have the same result.","commit_id":"463c9230404cd1cb60b5cc05a72fb264f74df4c3"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"3c0926b8bf7c0b01675c3e353cc79b8c1f97a9db","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # Access the property so that the configuration is read in order to"},{"line_number":107,"context_line":"        # get the correct datasource"},{"line_number":108,"context_line":"        self.strategy.datasource_backend"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        m_manager.assert_called_once_with("},{"line_number":111,"context_line":"            config\u003ddatasources, osc\u003dNone)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfbec78f_8d50860c","line":108,"range":{"start_line":108,"start_character":8,"end_line":108,"end_character":40},"updated":"2019-05-09 03:04:30.000000000","message":"ditto","commit_id":"463c9230404cd1cb60b5cc05a72fb264f74df4c3"}]}
