)]}'
{"manifests/decision_engine.pp":[{"author":{"_account_id":9414,"name":"zhongshengping","email":"chdzsp@163.com","username":"ZhongShengping"},"change_message_id":"679cfc409c43e89206af640bdf999036f1c730db","unresolved":false,"context_lines":[{"line_number":25,"context_line":"#   Defaults to $::os_service_default"},{"line_number":26,"context_line":"#"},{"line_number":27,"context_line":"# [*decision_engine_notification_topics*]"},{"line_number":28,"context_line":"#   (Optional) The topic names from which notification events will be "},{"line_number":29,"context_line":"#   listened to (list value)"},{"line_number":30,"context_line":"#   Defaults to $::os_service_default"},{"line_number":31,"context_line":"#"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"ba5da102_cf56f305","line":28,"range":{"start_line":28,"start_character":69,"end_line":28,"end_character":70},"updated":"2016-11-07 00:59:31.000000000","message":"extra space :)","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"949a032f16fe75a04d85f8a32238e3381e8f6dea","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    $weights_real \u003d $weights"},{"line_number":75,"context_line":"  }"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"  if is_array($decision_engine_notification_topics) {"},{"line_number":78,"context_line":"    $decision_engine_notification_topics_real \u003d $decision_engine_notification_topics"},{"line_number":79,"context_line":"  } else {"},{"line_number":80,"context_line":"    warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"9a629dbe_be2cabac","line":77,"updated":"2016-11-07 16:33:46.000000000","message":"It should be noted that the is_array function is deprecated (along with the validate_array) so we should no longer use these.","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"},{"author":{"_account_id":15519,"name":"Iury Gregory Melo Ferreira","display_name":"Iury Gregory","email":"iurygregory@gmail.com","username":"iurygregory"},"change_message_id":"ac2ba9acc20f1bed23f3b6c8f110f1adc330fb1c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"  if is_array($decision_engine_notification_topics) {"},{"line_number":78,"context_line":"    $decision_engine_notification_topics_real \u003d $decision_engine_notification_topics"},{"line_number":79,"context_line":"  } else {"},{"line_number":80,"context_line":"    warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)"},{"line_number":81,"context_line":"    $decision_engine_notification_topics_real \u003d any2array($decision_engine_notification_topics)"},{"line_number":82,"context_line":"  }"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":1,"id":"ba5da102_6f17a7ed","line":80,"range":{"start_line":80,"start_character":4,"end_line":80,"end_character":95},"updated":"2016-11-07 01:09:10.000000000","message":"you can add a validation for is_service_default this will avoid receive warnings in our logs \u003d)","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"},{"author":{"_account_id":9414,"name":"zhongshengping","email":"chdzsp@163.com","username":"ZhongShengping"},"change_message_id":"e0fa3ae18198f5ba799440d35983fbf03d13af7d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"  if is_array($decision_engine_notification_topics) {"},{"line_number":78,"context_line":"    $decision_engine_notification_topics_real \u003d $decision_engine_notification_topics"},{"line_number":79,"context_line":"  } else {"},{"line_number":80,"context_line":"    warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)"},{"line_number":81,"context_line":"    $decision_engine_notification_topics_real \u003d any2array($decision_engine_notification_topics)"},{"line_number":82,"context_line":"  }"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":1,"id":"ba5da102_75d21436","line":80,"range":{"start_line":80,"start_character":4,"end_line":80,"end_character":95},"in_reply_to":"ba5da102_6f17a7ed","updated":"2016-11-07 03:05:20.000000000","message":"yes, like validate_array($decision_engine_notification_topics)","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"226649995628d446a4c38abfef1647fbfd07455a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"  if is_array($decision_engine_notification_topics) {"},{"line_number":78,"context_line":"    $decision_engine_notification_topics_real \u003d $decision_engine_notification_topics"},{"line_number":79,"context_line":"  } else {"},{"line_number":80,"context_line":"    warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)"},{"line_number":81,"context_line":"    $decision_engine_notification_topics_real \u003d any2array($decision_engine_notification_topics)"},{"line_number":82,"context_line":"  }"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":1,"id":"9a629dbe_4c377be3","line":80,"range":{"start_line":80,"start_character":4,"end_line":80,"end_character":95},"in_reply_to":"ba5da102_75d21436","updated":"2016-11-07 11:18:08.000000000","message":"no, validation is about:\n\nif ! is_service_default($decision_engine_notification_topics) {\n  warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)\n}","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"},{"author":{"_account_id":15519,"name":"Iury Gregory Melo Ferreira","display_name":"Iury Gregory","email":"iurygregory@gmail.com","username":"iurygregory"},"change_message_id":"ac2ba9acc20f1bed23f3b6c8f110f1adc330fb1c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    $decision_engine_notification_topics_real \u003d $decision_engine_notification_topics"},{"line_number":79,"context_line":"  } else {"},{"line_number":80,"context_line":"    warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)"},{"line_number":81,"context_line":"    $decision_engine_notification_topics_real \u003d any2array($decision_engine_notification_topics)"},{"line_number":82,"context_line":"  }"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"  Watcher_config\u003c||\u003e ~\u003e Service[\u0027watcher-decision-engine\u0027]"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"ba5da102_8fb95bef","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":95},"updated":"2016-11-07 01:09:10.000000000","message":"when the value is $::os_service_default you dont need to use any2array just put \n$decision_engine_notification_topics_real \u003d $decision_engine_notification_topics","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"},{"author":{"_account_id":9414,"name":"zhongshengping","email":"chdzsp@163.com","username":"ZhongShengping"},"change_message_id":"e0fa3ae18198f5ba799440d35983fbf03d13af7d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    $decision_engine_notification_topics_real \u003d $decision_engine_notification_topics"},{"line_number":79,"context_line":"  } else {"},{"line_number":80,"context_line":"    warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)"},{"line_number":81,"context_line":"    $decision_engine_notification_topics_real \u003d any2array($decision_engine_notification_topics)"},{"line_number":82,"context_line":"  }"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"  Watcher_config\u003c||\u003e ~\u003e Service[\u0027watcher-decision-engine\u0027]"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"ba5da102_d5af6092","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":95},"in_reply_to":"ba5da102_8fb95bef","updated":"2016-11-07 03:05:20.000000000","message":"maby it can be written:\nif !is_service_default($decision_engine_notification_topics) and !empty($decision_engine_notification_topics){\n    validate_array($decision_engine_notification_topics)\n    $decision_engine_notification_topics_real \u003d join($decision_engine_notification_topics, \u0027,\u0027)\n  } else {\n    $decision_engine_notification_topics_real \u003d $::os_service_default\n  }","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"},{"author":{"_account_id":7745,"name":"Denis Egorenko","email":"degorenko@mirantis.com","username":"degorenko"},"change_message_id":"226649995628d446a4c38abfef1647fbfd07455a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    $decision_engine_notification_topics_real \u003d $decision_engine_notification_topics"},{"line_number":79,"context_line":"  } else {"},{"line_number":80,"context_line":"    warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)"},{"line_number":81,"context_line":"    $decision_engine_notification_topics_real \u003d any2array($decision_engine_notification_topics)"},{"line_number":82,"context_line":"  }"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"  Watcher_config\u003c||\u003e ~\u003e Service[\u0027watcher-decision-engine\u0027]"}],"source_content_type":"text/x-puppet","patch_set":1,"id":"9a629dbe_8c48b35d","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":95},"in_reply_to":"ba5da102_d5af6092","updated":"2016-11-07 11:18:08.000000000","message":"There is no need to spawn \u0027if\u0027 constructions. In this case it\u0027s ok to leave it with any2array.","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"949a032f16fe75a04d85f8a32238e3381e8f6dea","unresolved":false,"context_lines":[{"line_number":79,"context_line":"  } else {"},{"line_number":80,"context_line":"    warning(\u0027decision_engine_notification_topics must be an array and will fail in the future\u0027)"},{"line_number":81,"context_line":"    $decision_engine_notification_topics_real \u003d any2array($decision_engine_notification_topics)"},{"line_number":82,"context_line":"  }"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"  Watcher_config\u003c||\u003e ~\u003e Service[\u0027watcher-decision-engine\u0027]"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-puppet","patch_set":1,"id":"9a629dbe_de179f52","line":82,"updated":"2016-11-07 16:33:46.000000000","message":"Do we need to pass the array to the config so it\u0027s written out as an array for watcher or does it support csv lists instead? If it supports csv lists we should just join(any2array($val), \u0027,\u0027). If it needs to be an array\n\nif !is_service_default($var) or empty($var) {\n  warning(\u0027$var needs to be an array\u0027)\n  $cfg_var \u003d any2array($var) \n} else {\n  $cfg_var \u003d $var\n}\n\nI\u0027m generally not a fan of forcing these types on people while still trying to support puppet 3. As we get into the puppet 4 specific syntaxes we should bring up a larger dicussion around how to handle this.","commit_id":"88abdf57718bc2bdfcb476903559adff60db31f2"}]}
