)]}'
{"oslo_config/cfg.py":[{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":635,"context_line":"    found with the supplied name and extension."},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"    :param dirs: a list of directories"},{"line_number":638,"context_line":"    :param basename: the filename or direoctory name, for example \u0027glance-api\u0027"},{"line_number":639,"context_line":"    :param extension: the file extension, for example \u0027.conf\u0027"},{"line_number":640,"context_line":"    :returns: the path to a matching file or directory, or None"},{"line_number":641,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_5eb0cd8b","line":638,"range":{"start_line":638,"start_character":37,"end_line":638,"end_character":47},"updated":"2016-11-22 11:10:19.000000000","message":"nit: directory","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":635,"context_line":"    found with the supplied name and extension."},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"    :param dirs: a list of directories"},{"line_number":638,"context_line":"    :param basename: the filename or direoctory name, for example \u0027glance-api\u0027"},{"line_number":639,"context_line":"    :param extension: the file extension, for example \u0027.conf\u0027"},{"line_number":640,"context_line":"    :returns: the path to a matching file or directory, or None"},{"line_number":641,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_072e04fa","line":638,"range":{"start_line":638,"start_character":37,"end_line":638,"end_character":47},"in_reply_to":"7a77a97e_5eb0cd8b","updated":"2016-11-22 13:14:55.000000000","message":"Done","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":642,"context_line":"    for d in dirs:"},{"line_number":643,"context_line":"        path \u003d os.path.join(d, \u0027%s%s\u0027 % (basename, extension))"},{"line_number":644,"context_line":"        if os.path.exists(path):"},{"line_number":645,"context_line":"            return path"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"def find_config_files(project\u003dNone, prog\u003dNone, extension\u003d\u0027.conf\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_41eaacad","line":645,"updated":"2016-11-22 11:10:19.000000000","message":"not your problem but we should probably replace this function with os.walk!","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":642,"context_line":"    for d in dirs:"},{"line_number":643,"context_line":"        path \u003d os.path.join(d, \u0027%s%s\u0027 % (basename, extension))"},{"line_number":644,"context_line":"        if os.path.exists(path):"},{"line_number":645,"context_line":"            return path"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"def find_config_files(project\u003dNone, prog\u003dNone, extension\u003d\u0027.conf\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_873a1433","line":645,"in_reply_to":"7a77a97e_41eaacad","updated":"2016-11-22 13:14:55.000000000","message":"I leave that for volunteers","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":703,"context_line":"      /etc/${project}/"},{"line_number":704,"context_line":"      /etc/"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"    We return an absolute path for (at most) one of each the default config"},{"line_number":707,"context_line":"    dirs, for the topmost directory it exists in."},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    For example, if project\u003dfoo, prog\u003dbar and /etc/foo/foo.conf.d/,"},{"line_number":710,"context_line":"    /etc/bar.conf.d/ and ~/.foo/bar.conf.d/ all exist, then we return"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_c115dce5","line":707,"range":{"start_line":706,"start_character":5,"end_line":707,"end_character":49},"updated":"2016-11-22 11:10:19.000000000","message":"This para is unclear. Suggest:\n\n  We return an absolute path for each of the two config dirs,\n  in the first place we find it (iff we find it).\n\n\"iff\" is not a typo.","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":703,"context_line":"      /etc/${project}/"},{"line_number":704,"context_line":"      /etc/"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"    We return an absolute path for (at most) one of each the default config"},{"line_number":707,"context_line":"    dirs, for the topmost directory it exists in."},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    For example, if project\u003dfoo, prog\u003dbar and /etc/foo/foo.conf.d/,"},{"line_number":710,"context_line":"    /etc/bar.conf.d/ and ~/.foo/bar.conf.d/ all exist, then we return"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_67025840","line":707,"range":{"start_line":706,"start_character":5,"end_line":707,"end_character":49},"in_reply_to":"7a77a97e_c115dce5","updated":"2016-11-22 13:14:55.000000000","message":"It is a copy of the text from find_config_files(). But I changed it following your suggesting. But what stands iff for?","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":710,"context_line":"    /etc/bar.conf.d/ and ~/.foo/bar.conf.d/ all exist, then we return"},{"line_number":711,"context_line":"    [\u0027/etc/foo/foo.conf.d/\u0027, \u0027~/.foo/bar.conf.d/\u0027]"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    If no project name is supplied, we only look for ${prog.conf.d/}."},{"line_number":714,"context_line":"    \"\"\""},{"line_number":715,"context_line":"    if prog is None:"},{"line_number":716,"context_line":"        prog \u003d os.path.basename(sys.argv[0])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_41e0ecfa","line":713,"updated":"2016-11-22 11:10:19.000000000","message":"Suggest combining this line with L697.","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":710,"context_line":"    /etc/bar.conf.d/ and ~/.foo/bar.conf.d/ all exist, then we return"},{"line_number":711,"context_line":"    [\u0027/etc/foo/foo.conf.d/\u0027, \u0027~/.foo/bar.conf.d/\u0027]"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    If no project name is supplied, we only look for ${prog.conf.d/}."},{"line_number":714,"context_line":"    \"\"\""},{"line_number":715,"context_line":"    if prog is None:"},{"line_number":716,"context_line":"        prog \u003d os.path.basename(sys.argv[0])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_c78ecccf","line":713,"in_reply_to":"7a77a97e_41e0ecfa","updated":"2016-11-22 13:14:55.000000000","message":"Done","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":723,"context_line":"    config_dirs \u003d []"},{"line_number":724,"context_line":"    if project:"},{"line_number":725,"context_line":"        config_dirs.append(_search_dirs(cfg_base_dirs, project, extension))"},{"line_number":726,"context_line":"    config_dirs.append(_search_dirs(cfg_base_dirs, prog, extension))"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    return list(moves.filter(bool, config_dirs))"},{"line_number":729,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_617c0821","line":726,"updated":"2016-11-22 11:10:19.000000000","message":"Style, but I\u0027d use:\n\n  config_dirs \u003d [_search_dirs(cfg_base_dirs, p, extension)\n                 for p in [project, prog] if p]","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":723,"context_line":"    config_dirs \u003d []"},{"line_number":724,"context_line":"    if project:"},{"line_number":725,"context_line":"        config_dirs.append(_search_dirs(cfg_base_dirs, project, extension))"},{"line_number":726,"context_line":"    config_dirs.append(_search_dirs(cfg_base_dirs, prog, extension))"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    return list(moves.filter(bool, config_dirs))"},{"line_number":729,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_07660429","line":726,"in_reply_to":"7a77a97e_617c0821","updated":"2016-11-22 13:14:55.000000000","message":"It is a copy of find_config_files(). I would like to leave it as it is.","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":725,"context_line":"        config_dirs.append(_search_dirs(cfg_base_dirs, project, extension))"},{"line_number":726,"context_line":"    config_dirs.append(_search_dirs(cfg_base_dirs, prog, extension))"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    return list(moves.filter(bool, config_dirs))"},{"line_number":729,"context_line":""},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"def _is_opt_registered(opts, opt):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_a14e20bf","line":728,"updated":"2016-11-22 11:10:19.000000000","message":"I\u0027d prefer:\n\n  return [d for d in config_dirs if d]\n\nFar simpler. Please can you change L628 + L686 as well?","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":725,"context_line":"        config_dirs.append(_search_dirs(cfg_base_dirs, project, extension))"},{"line_number":726,"context_line":"    config_dirs.append(_search_dirs(cfg_base_dirs, prog, extension))"},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"    return list(moves.filter(bool, config_dirs))"},{"line_number":729,"context_line":""},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"def _is_opt_registered(opts, opt):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_675ed846","line":728,"in_reply_to":"7a77a97e_a14e20bf","updated":"2016-11-22 13:14:55.000000000","message":"It is a copy of find_config_files(). I would like to leave it as it is. And I don\u0027 want to change something unrelated to this changeset. We should do such cleanups in an extra changeset.","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":2199,"context_line":""},{"line_number":2200,"context_line":"    \"\"\""},{"line_number":2201,"context_line":"    disallow_names \u003d (\u0027project\u0027, \u0027prog\u0027, \u0027version\u0027,"},{"line_number":2202,"context_line":"                      \u0027usage\u0027, \u0027default_config_files\u0027, \u0027default_config_dirs\u0027)"},{"line_number":2203,"context_line":""},{"line_number":2204,"context_line":"    def __init__(self):"},{"line_number":2205,"context_line":"        \"\"\"Construct a ConfigOpts object.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_e149f88f","line":2202,"updated":"2016-11-22 11:10:19.000000000","message":"This is potentially an issue but I doubt a practical one. Just flagging it, I\u0027m OK.","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":2199,"context_line":""},{"line_number":2200,"context_line":"    \"\"\""},{"line_number":2201,"context_line":"    disallow_names \u003d (\u0027project\u0027, \u0027prog\u0027, \u0027version\u0027,"},{"line_number":2202,"context_line":"                      \u0027usage\u0027, \u0027default_config_files\u0027, \u0027default_config_dirs\u0027)"},{"line_number":2203,"context_line":""},{"line_number":2204,"context_line":"    def __init__(self):"},{"line_number":2205,"context_line":"        \"\"\"Construct a ConfigOpts object.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_273b00ed","line":2202,"in_reply_to":"7a77a97e_e149f88f","updated":"2016-11-22 13:14:55.000000000","message":"I\u0027ll mention it in the release note under the upgrade section. Is that enough?","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":2984,"context_line":"        \"\"\""},{"line_number":2985,"context_line":"        namespace \u003d _Namespace(self)"},{"line_number":2986,"context_line":""},{"line_number":2987,"context_line":"        # hande --config-file args or the default_config_files"},{"line_number":2988,"context_line":"        for arg in self._args:"},{"line_number":2989,"context_line":"            if arg \u003d\u003d \u0027--config-file\u0027 or arg.startswith(\u0027--config-file\u003d\u0027):"},{"line_number":2990,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_21121063","line":2987,"range":{"start_line":2987,"start_character":10,"end_line":2987,"end_character":15},"updated":"2016-11-22 11:10:19.000000000","message":"nit: handle","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":2984,"context_line":"        \"\"\""},{"line_number":2985,"context_line":"        namespace \u003d _Namespace(self)"},{"line_number":2986,"context_line":""},{"line_number":2987,"context_line":"        # hande --config-file args or the default_config_files"},{"line_number":2988,"context_line":"        for arg in self._args:"},{"line_number":2989,"context_line":"            if arg \u003d\u003d \u0027--config-file\u0027 or arg.startswith(\u0027--config-file\u003d\u0027):"},{"line_number":2990,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_1202c409","line":2987,"range":{"start_line":2987,"start_character":10,"end_line":2987,"end_character":15},"in_reply_to":"7a77a97e_21121063","updated":"2016-11-22 13:14:55.000000000","message":"Done","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":2992,"context_line":"            for config_file in self.default_config_files:"},{"line_number":2993,"context_line":"                ConfigParser._parse_file(config_file, namespace)"},{"line_number":2994,"context_line":""},{"line_number":2995,"context_line":"        # hande --config-dir args or the default_config_dirs"},{"line_number":2996,"context_line":"        for arg in self._args:"},{"line_number":2997,"context_line":"            if arg \u003d\u003d \u0027--config-dir\u0027 or arg.startswith(\u0027--config-dir\u003d\u0027):"},{"line_number":2998,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_c1015c08","line":2995,"range":{"start_line":2995,"start_character":10,"end_line":2995,"end_character":15},"updated":"2016-11-22 11:10:19.000000000","message":"same","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":2992,"context_line":"            for config_file in self.default_config_files:"},{"line_number":2993,"context_line":"                ConfigParser._parse_file(config_file, namespace)"},{"line_number":2994,"context_line":""},{"line_number":2995,"context_line":"        # hande --config-dir args or the default_config_dirs"},{"line_number":2996,"context_line":"        for arg in self._args:"},{"line_number":2997,"context_line":"            if arg \u003d\u003d \u0027--config-dir\u0027 or arg.startswith(\u0027--config-dir\u003d\u0027):"},{"line_number":2998,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_3209802d","line":2995,"range":{"start_line":2995,"start_character":10,"end_line":2995,"end_character":15},"in_reply_to":"7a77a97e_c1015c08","updated":"2016-11-22 13:14:55.000000000","message":"Done","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":13404,"name":"Alberto Planas","email":"aplanas@gmail.com","username":"aplanas"},"change_message_id":"2be569fbb8739d859f2bbcd80337afa0eb8d9af9","unresolved":false,"context_lines":[{"line_number":625,"context_line":"        os.path.join(\u0027/etc\u0027, project) if project else None,"},{"line_number":626,"context_line":"        \u0027/etc\u0027"},{"line_number":627,"context_line":"    ]"},{"line_number":628,"context_line":""},{"line_number":629,"context_line":"    return list(moves.filter(bool, cfg_dirs))"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_eaa8e479","side":"PARENT","line":628,"updated":"2016-11-22 15:05:17.000000000","message":"I would not remove this line","commit_id":"42af1ad069ce09c465101cd2dcad93940c856c94"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"5904dc0fd15d3b061feca52f04a55612a9e8154e","unresolved":false,"context_lines":[{"line_number":625,"context_line":"        os.path.join(\u0027/etc\u0027, project) if project else None,"},{"line_number":626,"context_line":"        \u0027/etc\u0027"},{"line_number":627,"context_line":"    ]"},{"line_number":628,"context_line":""},{"line_number":629,"context_line":"    return list(moves.filter(bool, cfg_dirs))"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_ac87e910","side":"PARENT","line":628,"in_reply_to":"7a77a97e_eaa8e479","updated":"2016-11-22 15:06:57.000000000","message":"it is removed","commit_id":"42af1ad069ce09c465101cd2dcad93940c856c94"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d4e1debf887600aed4ae83b796e1ffce5527d0bc","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    For example, if project\u003dfoo, prog\u003dbar and /etc/foo/foo.conf.d/,"},{"line_number":711,"context_line":"    /etc/bar.conf.d/ and ~/.foo/bar.conf.d/ all exist, then we return"},{"line_number":712,"context_line":"    [\u0027/etc/foo/foo.conf.d/\u0027, \u0027~/.foo/bar.conf.d/\u0027]"},{"line_number":713,"context_line":"    \"\"\""},{"line_number":714,"context_line":"    if prog is None:"},{"line_number":715,"context_line":"        prog \u003d os.path.basename(sys.argv[0])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_8cfce23f","line":712,"updated":"2016-11-22 18:48:55.000000000","message":"/etc/foo/foo.conf.d likely containing foo.conf feels a bit redundant, but I guess it\u0027s consistent with the file search logic.","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"a47ab965ae9a6f9aaa930bb69b554b1e7d33471f","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    For example, if project\u003dfoo, prog\u003dbar and /etc/foo/foo.conf.d/,"},{"line_number":711,"context_line":"    /etc/bar.conf.d/ and ~/.foo/bar.conf.d/ all exist, then we return"},{"line_number":712,"context_line":"    [\u0027/etc/foo/foo.conf.d/\u0027, \u0027~/.foo/bar.conf.d/\u0027]"},{"line_number":713,"context_line":"    \"\"\""},{"line_number":714,"context_line":"    if prog is None:"},{"line_number":715,"context_line":"        prog \u003d os.path.basename(sys.argv[0])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_8206691e","line":712,"in_reply_to":"7a77a97e_8cfce23f","updated":"2016-11-22 19:49:46.000000000","message":"Yes. It is using the same search logic that is used for the config-files.","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d4e1debf887600aed4ae83b796e1ffce5527d0bc","unresolved":false,"context_lines":[{"line_number":2251,"context_line":"                                 \u0027config files can be specified, with values \u0027"},{"line_number":2252,"context_line":"                                 \u0027in later files taking precedence. Defaults \u0027"},{"line_number":2253,"context_line":"                                 \u0027to %(default)s.\u0027)),"},{"line_number":2254,"context_line":"            _ConfigDirOpt(\u0027config-dir\u0027,"},{"line_number":2255,"context_line":"                          metavar\u003d\u0027DIR\u0027,"},{"line_number":2256,"context_line":"                          default\u003ddefault_config_dirs,"},{"line_number":2257,"context_line":"                          help\u003d\u0027Path to a config directory to pull *.conf \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_87b91b31","line":2254,"updated":"2016-11-22 18:48:55.000000000","message":"Wasn\u0027t something going to have to change to avoid having _ConfigDirOpt throw an error if the defaults don\u0027t exist? Is that being handled by not giving it defaults if the directories don\u0027t exist?","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"a47ab965ae9a6f9aaa930bb69b554b1e7d33471f","unresolved":false,"context_lines":[{"line_number":2251,"context_line":"                                 \u0027config files can be specified, with values \u0027"},{"line_number":2252,"context_line":"                                 \u0027in later files taking precedence. Defaults \u0027"},{"line_number":2253,"context_line":"                                 \u0027to %(default)s.\u0027)),"},{"line_number":2254,"context_line":"            _ConfigDirOpt(\u0027config-dir\u0027,"},{"line_number":2255,"context_line":"                          metavar\u003d\u0027DIR\u0027,"},{"line_number":2256,"context_line":"                          default\u003ddefault_config_dirs,"},{"line_number":2257,"context_line":"                          help\u003d\u0027Path to a config directory to pull *.conf \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_7d4bb259","line":2254,"in_reply_to":"7a77a97e_87b91b31","updated":"2016-11-22 19:49:46.000000000","message":"It is handled in lin 3003. So if a default_config_dir does not exist, it is ignored.","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"}],"oslo_config/fixture.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d4e1debf887600aed4ae83b796e1ffce5527d0bc","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        This method allows you to predefine the list of configuration dirs"},{"line_number":205,"context_line":"        that are loaded by oslo_config. It will ensure that your tests do not"},{"line_number":206,"context_line":"        attempt to autodetect, and accidentally pick up config files from"},{"line_number":207,"context_line":"        locally installed services."},{"line_number":208,"context_line":"        \"\"\""},{"line_number":209,"context_line":"        if not isinstance(config_dirs, list):"},{"line_number":210,"context_line":"            raise AttributeError(\"Please pass a list() to set_config_dirs()\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_ec339611","line":207,"updated":"2016-11-22 18:48:55.000000000","message":"This seems like it has potential to break apps under test. Maybe the fixture should set the search path to an empty list by default?","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"bb521188933f24761bb5ba1b25702d112640c3d3","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        This method allows you to predefine the list of configuration dirs"},{"line_number":205,"context_line":"        that are loaded by oslo_config. It will ensure that your tests do not"},{"line_number":206,"context_line":"        attempt to autodetect, and accidentally pick up config files from"},{"line_number":207,"context_line":"        locally installed services."},{"line_number":208,"context_line":"        \"\"\""},{"line_number":209,"context_line":"        if not isinstance(config_dirs, list):"},{"line_number":210,"context_line":"            raise AttributeError(\"Please pass a list() to set_config_dirs()\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_595cb14a","line":207,"in_reply_to":"5a74a57a_318420d3","updated":"2016-11-29 13:25:27.000000000","message":"I expect that developers run unit tests on the same systems where they\u0027ve run devstack, so yes I do expect them to have config files laying around.","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"b542a4f63f1252bd63f4ac56ff86f1896ede5920","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        This method allows you to predefine the list of configuration dirs"},{"line_number":205,"context_line":"        that are loaded by oslo_config. It will ensure that your tests do not"},{"line_number":206,"context_line":"        attempt to autodetect, and accidentally pick up config files from"},{"line_number":207,"context_line":"        locally installed services."},{"line_number":208,"context_line":"        \"\"\""},{"line_number":209,"context_line":"        if not isinstance(config_dirs, list):"},{"line_number":210,"context_line":"            raise AttributeError(\"Please pass a list() to set_config_dirs()\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_318420d3","line":207,"in_reply_to":"5a74a57a_4c1d9672","updated":"2016-11-24 05:44:15.000000000","message":"So calling self.set_config_dirs([]) in __init__ raises a \"oslo_config.cfg.ArgsAlreadyParsedError: arguments already parsed: cannot register CLI option\" exception.\nI still fail to see why the handling of set_config_dirs() should be different compared to set_config_files(). So do you really expect that, while running tests, people have directories like /etc/$project/${project,$prog}.conf.d/ available ? Or am I missing something here?\nBtw. according to codesearch, only ironic-inspector is using set_config_files().","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"ad12567ce992f04fc103732af8d39d7a41458860","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        This method allows you to predefine the list of configuration dirs"},{"line_number":205,"context_line":"        that are loaded by oslo_config. It will ensure that your tests do not"},{"line_number":206,"context_line":"        attempt to autodetect, and accidentally pick up config files from"},{"line_number":207,"context_line":"        locally installed services."},{"line_number":208,"context_line":"        \"\"\""},{"line_number":209,"context_line":"        if not isinstance(config_dirs, list):"},{"line_number":210,"context_line":"            raise AttributeError(\"Please pass a list() to set_config_dirs()\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_4c1d9672","line":207,"in_reply_to":"5a74a57a_8cb08ef6","updated":"2016-11-23 18:52:58.000000000","message":"That is exactly the sort of assumption that has broken us in the past. :-/\n\nI\u0027d go ahead and add a call in the fixture constructor, like your previous comment mentioned. That way at least unit test classes using the fixture will be insulated. Then you should work with harlowja to figure out how to test this in a few projects before we land the patch. He and dims have set up a way to do that, but I don\u0027t know enough about the details to get you set up myself.","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"a47ab965ae9a6f9aaa930bb69b554b1e7d33471f","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        This method allows you to predefine the list of configuration dirs"},{"line_number":205,"context_line":"        that are loaded by oslo_config. It will ensure that your tests do not"},{"line_number":206,"context_line":"        attempt to autodetect, and accidentally pick up config files from"},{"line_number":207,"context_line":"        locally installed services."},{"line_number":208,"context_line":"        \"\"\""},{"line_number":209,"context_line":"        if not isinstance(config_dirs, list):"},{"line_number":210,"context_line":"            raise AttributeError(\"Please pass a list() to set_config_dirs()\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_1d7f1e67","line":207,"in_reply_to":"7a77a97e_ec339611","updated":"2016-11-22 19:49:46.000000000","message":"Hm. Where would you set that? In the constructor?","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"60863ffdd51f35cbb7f38fb2c8c26f95475944f8","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        This method allows you to predefine the list of configuration dirs"},{"line_number":205,"context_line":"        that are loaded by oslo_config. It will ensure that your tests do not"},{"line_number":206,"context_line":"        attempt to autodetect, and accidentally pick up config files from"},{"line_number":207,"context_line":"        locally installed services."},{"line_number":208,"context_line":"        \"\"\""},{"line_number":209,"context_line":"        if not isinstance(config_dirs, list):"},{"line_number":210,"context_line":"            raise AttributeError(\"Please pass a list() to set_config_dirs()\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_8cb08ef6","line":207,"in_reply_to":"7a77a97e_ec339611","updated":"2016-11-23 18:37:28.000000000","message":"Thinking about it I guess it is very unlikely that somebody has the default directories available when running tests. And if so, the user needs to call set_config_dirs(). Maybe this is something that we should document in the release note?","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0b3ba5aae87d61d62c5a62f4eafb5b0333132861","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # Make sure the namespace exists for our tests."},{"line_number":213,"context_line":"        if not self.conf._namespace:"},{"line_number":214,"context_line":"            self.conf.__call__(args\u003d[])"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        self.conf.default_config_dirs \u003d config_dirs"},{"line_number":217,"context_line":"        self.conf.reload_config_files()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_749ed463","line":214,"updated":"2016-11-29 13:32:52.000000000","message":"The error you mention above shows the call method is only ever supposed to be invoked once, and the fixture shouldn\u0027t invoke it because tests need to try to use the method by passing values to it.\n\nInstead of parsing the arguments and then changing the values, try using set_default() to modify the option\u0027s default value. That way when the config is finally parsed the defaults will be set properly and you can also get rid of the reload_config_files() call.\n\nBecause set_default() modifies the definition of the Opt instance, the fixture will need to restore the old default value in its cleanUp().","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"9cfe26402bbe44976c5ec685e1d8a91abdd9c345","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # Make sure the namespace exists for our tests."},{"line_number":213,"context_line":"        if not self.conf._namespace:"},{"line_number":214,"context_line":"            self.conf.__call__(args\u003d[])"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        self.conf.default_config_dirs \u003d config_dirs"},{"line_number":217,"context_line":"        self.conf.reload_config_files()"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_cfbd41d9","line":214,"updated":"2016-11-29 17:34:43.000000000","message":"This is a little odd, but we can fix it in a follow-up.","commit_id":"38e5f0283b34c639557e89ef7e3e77e6b80deca4"}],"releasenotes/notes/add-default-config-dirs-03340ff6689afe94.yaml":[{"author":{"_account_id":6593,"name":"Dirk Mueller","email":"dirk@dmllr.de","username":"dmllr"},"change_message_id":"f920c975d2a9089c7d6cfe8cc2aeb562bfce2c92","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    If no --config-dir switches are given, oslo.config"},{"line_number":8,"context_line":"    searches now in a couple of directories (depending on"},{"line_number":9,"context_line":"    the given project name) for config file snippets. Non"},{"line_number":10,"context_line":"    existing directories are simply skipped."},{"line_number":11,"context_line":"other:"},{"line_number":12,"context_line":"  - Adding some default config-dirs makes it possible to"},{"line_number":13,"context_line":"    use config dir snippets also in wsgi environments (like"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7a77a97e_2135b045","line":10,"updated":"2016-11-22 10:57:24.000000000","message":"Would be nice to be more elaborate here and list the directories that it uses explictely (or mention that its the same like --config-file defaults with a .d suffix as a directory)","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    If no --config-dir switches are given, oslo.config"},{"line_number":8,"context_line":"    searches now in a couple of directories (depending on"},{"line_number":9,"context_line":"    the given project name) for config file snippets. Non"},{"line_number":10,"context_line":"    existing directories are simply skipped."},{"line_number":11,"context_line":"other:"},{"line_number":12,"context_line":"  - Adding some default config-dirs makes it possible to"},{"line_number":13,"context_line":"    use config dir snippets also in wsgi environments (like"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7a77a97e_841bf21b","line":10,"in_reply_to":"7a77a97e_2135b045","updated":"2016-11-22 11:10:19.000000000","message":"+1","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    If no --config-dir switches are given, oslo.config"},{"line_number":8,"context_line":"    searches now in a couple of directories (depending on"},{"line_number":9,"context_line":"    the given project name) for config file snippets. Non"},{"line_number":10,"context_line":"    existing directories are simply skipped."},{"line_number":11,"context_line":"other:"},{"line_number":12,"context_line":"  - Adding some default config-dirs makes it possible to"},{"line_number":13,"context_line":"    use config dir snippets also in wsgi environments (like"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7a77a97e_c506c11f","line":10,"in_reply_to":"7a77a97e_841bf21b","updated":"2016-11-22 13:14:55.000000000","message":"Done","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"395a7bdcf16fafb63eaca7add1fb6edbada9d0de","unresolved":false,"context_lines":[{"line_number":12,"context_line":"  - Adding some default config-dirs makes it possible to"},{"line_number":13,"context_line":"    use config dir snippets also in wsgi environments (like"},{"line_number":14,"context_line":"    Apache) where it is not easily possible to pass"},{"line_number":15,"context_line":"    command line parameters to a wsgi app."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7a77a97e_64e7b612","line":15,"updated":"2016-11-22 11:10:19.000000000","message":"nit: you\u0027ve wrapped very narrow, not sure why?","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"c8ca1835231dc230de61fc6e95d88b3f3c285df4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"  - Adding some default config-dirs makes it possible to"},{"line_number":13,"context_line":"    use config dir snippets also in wsgi environments (like"},{"line_number":14,"context_line":"    Apache) where it is not easily possible to pass"},{"line_number":15,"context_line":"    command line parameters to a wsgi app."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7a77a97e_72c4d891","line":15,"in_reply_to":"7a77a97e_64e7b612","updated":"2016-11-22 13:14:55.000000000","message":"Done","commit_id":"7f04f5d4d692f8609ad4e5c2f24d1f025ba8aa29"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d4e1debf887600aed4ae83b796e1ffce5527d0bc","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    * ~/${prog}.conf.d/"},{"line_number":13,"context_line":"    * /etc/${prog}.conf.d/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    Only the first directory is used if that is available."},{"line_number":16,"context_line":"    If a project is given, the directories searched is a bit more complicated."},{"line_number":17,"context_line":"    2 directories are searched, first search is for the project related dir:"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7a77a97e_4768e3ba","line":15,"updated":"2016-11-22 18:48:55.000000000","message":"How does this rule apply in the more complicated case below? Is the rule that we stop for the first directory found?","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"a47ab965ae9a6f9aaa930bb69b554b1e7d33471f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    * ~/${prog}.conf.d/"},{"line_number":13,"context_line":"    * /etc/${prog}.conf.d/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"    Only the first directory is used if that is available."},{"line_number":16,"context_line":"    If a project is given, the directories searched is a bit more complicated."},{"line_number":17,"context_line":"    2 directories are searched, first search is for the project related dir:"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7a77a97e_5d77d63a","line":15,"in_reply_to":"7a77a97e_4768e3ba","updated":"2016-11-22 19:49:46.000000000","message":"No. In the more complicated case where $project and $program are set, for both a config-dir is searched. It is the same mechanism we use for config-files.\nSo in the more complicated case 2 results are expected. One for the first search (line 19-22) and one for the second search (line 27-30).\nThis is fine because with that mechanism it is possible to have project wide configs (eg a single config-file/config-dir for nova-api and nova-compute) but also program specific config-files/config-dirs.\nAgain, this is already possible for config file. eg. /etc/nova/nova.conf is read by nova-compute *and* nova-api (assuming $project\u003dnova) but /etc/nova/nova-api.conf is only read by nova-api","commit_id":"a9482d4f89649d21c7b23ced34027195309490eb"}]}
