)]}'
{"ironic/common/config_generator/generator.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"f550ae12f51d05837ca1c29cf644f2c0f547e904","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    if not opt_help:"},{"line_number":269,"context_line":"        sys.stderr.write(\u0027WARNING: \"%s\" is missing help string.\\n\u0027 % opt_name)"},{"line_number":270,"context_line":"        opt_help \u003d \"\""},{"line_number":271,"context_line":"    opt_type \u003d OPTION_REGEX.search(str(type(opt))).group(0)"},{"line_number":272,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":273,"context_line":"                             OPT_TYPES[opt_type])"},{"line_number":274,"context_line":"    print(\u0027#\u0027, \"\\n# \".join(textwrap.wrap(opt_help, WORDWRAP_WIDTH)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_65d281d4","line":271,"updated":"2015-12-07 01:51:47.000000000","message":"I play around with a new option like IPopt, it did throw the exception but said \"\u0027NoneType\u0027 object has no attribute \u0027group\u0027\", it is still meaningless to users. What about add things like \"This is caused by an unacceptable option with opt_name\"","commit_id":"81f82e6bde2ada6d400707b7a50c2faca2dc57e0"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"919df0f32cffae408c57a03c63f6884632f747ab","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    if not opt_help:"},{"line_number":269,"context_line":"        sys.stderr.write(\u0027WARNING: \"%s\" is missing help string.\\n\u0027 % opt_name)"},{"line_number":270,"context_line":"        opt_help \u003d \"\""},{"line_number":271,"context_line":"    opt_type \u003d OPTION_REGEX.search(str(type(opt))).group(0)"},{"line_number":272,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":273,"context_line":"                             OPT_TYPES[opt_type])"},{"line_number":274,"context_line":"    print(\u0027#\u0027, \"\\n# \".join(textwrap.wrap(opt_help, WORDWRAP_WIDTH)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_052cdda9","line":271,"in_reply_to":"7a740942_65d281d4","updated":"2015-12-07 02:12:19.000000000","message":"Done :)","commit_id":"81f82e6bde2ada6d400707b7a50c2faca2dc57e0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8f0fd7556084f04142d0a0ebab1918e34778ba1b","unresolved":false,"context_lines":[{"line_number":271,"context_line":"    result \u003d OPTION_REGEX.search(str(type(opt)))"},{"line_number":272,"context_line":"    if not result:"},{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a710552_fb9d115a","line":274,"updated":"2015-12-14 22:41:34.000000000","message":"This will output something like\n\nValueError: Config option: \u0027foo\u0027 Unknown option type: \u003cclass \u0027oslo_config.cfg.FooOpt\u0027\u003e\n\nGrammatically awkward. But I don\u0027t really care :)","commit_id":"b09ffa234585898034ede030355287ce64b8485b"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"db98a12fcfc63fb048ae092b63d63f8c6c312bd8","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    if not result:"},{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":278,"context_line":"                             OPT_TYPES[opt_type])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_81f50c58","line":275,"updated":"2015-12-07 12:25:00.000000000","message":"Hi John,\n\nAny reason why we are raising an exception here instead of callling sys.exit() as before? \n\nSince this is a script I feel that sys.exit() + printing the error to stderr is the right way of exiting it. (Tho I can see a mix of unhandled exceptions being raised and sys.exit() in this script as a whole)","commit_id":"b09ffa234585898034ede030355287ce64b8485b"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"77146b792ac5e744f25ff48da30afed375f62287","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    if not result:"},{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":278,"context_line":"                             OPT_TYPES[opt_type])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_9bd1105a","line":275,"updated":"2015-12-07 03:13:30.000000000","message":"nit: this will print \u0027 Unknown option type: \u003cclass \u0027oslo.config.cfg.Opt\u0027\u003e\u0027\u0027\n\nunacceptable option class is better","commit_id":"b09ffa234585898034ede030355287ce64b8485b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"4f73f13b5673633988b364dea8b1b625de7b1f5b","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    if not result:"},{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":278,"context_line":"                             OPT_TYPES[opt_type])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_879c3c10","line":275,"in_reply_to":"7a740942_81f50c58","updated":"2015-12-07 13:00:16.000000000","message":"Hi Lucas,\n\nI did that intentionally. In fact I had plans to get rid of some of the other sys.exit() calls. In my opinion the sys.exit() method is giving very little debug information to the user. And makes it difficult for them to determine the root cause.\n\nFor example before this patch the error when running \u0027tox -egenconfig\u0027 is:\n \u0027NoneType\u0027 object has no attribute \u0027group\u0027\n Can not generate etc/ironic/ironic.conf.sample\n\nI have no idea what file the error occurred in. Grepping for the error gets me nothing :(\n\nAfter this patch the error while running \u0027tox -egenconfig\u0027 is:\n Traceback (most recent call last):\n   File \"/usr/lib64/python2.7/runpy.py\", line 162, in _run_module_as_main\n    \"__main__\", fname, loader, pkg_name)\n   File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n   File \"/home/john/unix/openstack/ironic/ironic/common/config_generator/generator.py\", line 339, in \u003cmodule\u003e\n     main()\n   File \"/home/john/unix/openstack/ironic/ironic/common/config_generator/generator.py\", line 336, in main\n    generate(sys.argv[1:])\n   File \"/home/john/unix/openstack/ironic/ironic/common/config_generator/generator.py\", line 142, in generate\n     print_group_opts(group, opts_by_group[group])\n   File \"/home/john/unix/openstack/ironic/ironic/common/config_generator/generator.py\", line 224, in print_group_opts\n     _print_opt(opt)\n   File \"/home/john/unix/openstack/ironic/ironic/common/config_generator/generator.py\", line 275, in _print_opt\n     opt_name, type(opt)))\n ValueError: Config option: \u0027auth_type\u0027 Unknown option type: \u003cclass \u0027oslo_config.cfg.Opt\u0027\u003e\n\nNow I feel I have a better chance to fix the issue. I now know the problem is in generator.py and the line number to go look at.","commit_id":"b09ffa234585898034ede030355287ce64b8485b"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ddc4cbd41bddde2e1eac4fcd9caad77dfbbeccfe","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    if not result:"},{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":278,"context_line":"                             OPT_TYPES[opt_type])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_721a307f","line":275,"in_reply_to":"7a740942_879c3c10","updated":"2015-12-07 13:19:16.000000000","message":"After talking the author on IRC I agree that raising an exception in this case is beneficial since this script is only used with tox.\n\n \u003clucasagomes\u003e jlvillal, morning\n \u003clucasagomes\u003e jlvillal, yeah I see the point there, it\u0027s definetly valuable to have the traceback \n \u003clucasagomes\u003e I wonder tho if that should be the right behavior or we should have a way of making debuggable and only then show the traceback\n \u003clucasagomes\u003e but yeah I feel divided, since the script is wrapped in tox and so on, I think the traceback is more valuable indeed\n \u003cjlvillal\u003e lucasagomes, The only real uses of that are people doing \u0027tox -egenconfig\u0027\n \u003clucasagomes\u003e jlvillal, yeah\n \u003cjlvillal\u003e Who are usually somewhat developer type people\n \u003cjlvillal\u003e Since we do check in the same generated from it.\n \u003cjlvillal\u003e s/same/sample/\n \u003clucasagomes\u003e right yeah, I agree with it","commit_id":"b09ffa234585898034ede030355287ce64b8485b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c5b2cb7d217a8088ba93cecb587ce65b0bc1ae8e","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    if not result:"},{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":278,"context_line":"                             OPT_TYPES[opt_type])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_bbf2cc6d","line":275,"in_reply_to":"7a740942_9bd1105a","updated":"2015-12-07 03:33:00.000000000","message":"I prefer the word \u0027unknown\u0027 and I do think it is a type and not a class. It is a class but the class is representing a type.","commit_id":"b09ffa234585898034ede030355287ce64b8485b"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"77146b792ac5e744f25ff48da30afed375f62287","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":278,"context_line":"                             OPT_TYPES[opt_type])"},{"line_number":279,"context_line":"    print(\u0027#\u0027, \"\\n# \".join(textwrap.wrap(opt_help, WORDWRAP_WIDTH)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_5bcba8a5","line":276,"updated":"2015-12-07 03:13:30.000000000","message":"BTW, as you are try to get the opt_type, I would recommend to directly use ’opt.type‘ which is good enough.","commit_id":"b09ffa234585898034ede030355287ce64b8485b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5081c500d45b6b3f9278cd384e1a0d4e0259424c","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":278,"context_line":"                             OPT_TYPES[opt_type])"},{"line_number":279,"context_line":"    print(\u0027#\u0027, \"\\n# \".join(textwrap.wrap(opt_help, WORDWRAP_WIDTH)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_fba61452","line":276,"in_reply_to":"7a740942_3bd81cef","updated":"2015-12-07 03:36:17.000000000","message":"Also I tested it and for the \u0027Opt\u0027 type: opt.type \u003d\u003d str\n\nWhich is not what is wanted.","commit_id":"b09ffa234585898034ede030355287ce64b8485b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c5b2cb7d217a8088ba93cecb587ce65b0bc1ae8e","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        raise ValueError("},{"line_number":274,"context_line":"            \"Config option: {!r} Unknown option type: {}\\n\".format("},{"line_number":275,"context_line":"                opt_name, type(opt)))"},{"line_number":276,"context_line":"    opt_type \u003d result.group(0)"},{"line_number":277,"context_line":"    opt_help \u003d u\u0027%s (%s)\u0027 % (opt_help,"},{"line_number":278,"context_line":"                             OPT_TYPES[opt_type])"},{"line_number":279,"context_line":"    print(\u0027#\u0027, \"\\n# \".join(textwrap.wrap(opt_help, WORDWRAP_WIDTH)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_3bd81cef","line":276,"in_reply_to":"7a740942_5bcba8a5","updated":"2015-12-07 03:33:00.000000000","message":"That changes the logic of the code. I was trying to maintain the current logic and only change the output. I don\u0027t know about opt.type and don\u0027t see it used anywhere in this code. But I am not an expert on oslo.config :)\n\nAlso not sure how oslo.config is used by keystoneauth\n\nThe title of the keystoneauth patch that caused this issue confuses me:\n https://review.openstack.org/#/c/209348/\n Remove oslo_config from auth plugin loading","commit_id":"b09ffa234585898034ede030355287ce64b8485b"}]}
