)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"550b4b73f8e25cd4a65d0a6d5de825b3ba87e7f3","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Both the \u0027api_db\u0027 and \u0027db\u0027 categories / commands define a \u0027sync\u0027"},{"line_number":10,"context_line":"(sub)command which takes an optional \u0027--version\u0027 parameter. We want to"},{"line_number":11,"context_line":"start using \u0027cliff\u0027 in Queens, but that framework does not support"},{"line_number":12,"context_line":"command-level parameters with the exception of \u0027--help\u0027 [1]. There"},{"line_number":13,"context_line":"really isn\u0027t any reason that these should be optional parameters instead"},{"line_number":14,"context_line":"of positional arguments so that\u0027s what we do. We keep aliases for the"},{"line_number":15,"context_line":"older commands to ease with the transition, but these raise a deprecated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1f1a1f67_9820e3f9","line":12,"range":{"start_line":11,"start_character":31,"end_line":12,"end_character":55},"updated":"2017-07-21 09:27:39.000000000","message":"Did you find out the reason for that?\nIt would be great to have comments from cliff people.","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cda9f254bdbeb6f1cd9393bddb9ce8f0be9cd7c4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Both the \u0027api_db\u0027 and \u0027db\u0027 categories / commands define a \u0027sync\u0027"},{"line_number":10,"context_line":"(sub)command which takes an optional \u0027--version\u0027 parameter. We want to"},{"line_number":11,"context_line":"start using \u0027cliff\u0027 in Queens, but that framework does not support"},{"line_number":12,"context_line":"command-level parameters with the exception of \u0027--help\u0027 [1]. There"},{"line_number":13,"context_line":"really isn\u0027t any reason that these should be optional parameters instead"},{"line_number":14,"context_line":"of positional arguments so that\u0027s what we do. We keep aliases for the"},{"line_number":15,"context_line":"older commands to ease with the transition, but these raise a deprecated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df3967d1_bd0c3441","line":12,"range":{"start_line":11,"start_character":31,"end_line":12,"end_character":55},"in_reply_to":"1f1a1f67_9820e3f9","updated":"2017-08-03 13:46:05.000000000","message":"Yeah, it\u0027s to do with how the framework adds commands using argparse. After working on this for hours, I\u0027ve come to conclusion that it\u0027s broken and can\u0027t be fixed without a significant rewrite.","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"}],"nova/cmd/manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"541833955bbdc4bb3b0fc54405867d4be4a60964","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        pass"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"    @args(\u0027--version\u0027, metavar\u003d\u0027\u003cversion\u003e\u0027, help\u003dargparse.SUPPRESS)"},{"line_number":680,"context_line":"    @args(\u0027--local_cell\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":681,"context_line":"          help\u003d\u0027Only sync db in the local cell: do not attempt to fan-out\u0027"},{"line_number":682,"context_line":"               \u0027to all cells\u0027)"},{"line_number":683,"context_line":"    @args(\u0027version2\u0027, metavar\u003d\u0027VERSION\u0027, nargs\u003d\u0027?\u0027, help\u003d\u0027Database version\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_771f045b","line":680,"range":{"start_line":680,"start_character":11,"end_line":680,"end_character":23},"updated":"2017-08-03 16:03:34.000000000","message":"Why don\u0027t we have to care about this?","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6675b00a8fb2082ab990b28f0d47eea83e6fc234","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        pass"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"    @args(\u0027--version\u0027, metavar\u003d\u0027\u003cversion\u003e\u0027, help\u003dargparse.SUPPRESS)"},{"line_number":680,"context_line":"    @args(\u0027--local_cell\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":681,"context_line":"          help\u003d\u0027Only sync db in the local cell: do not attempt to fan-out\u0027"},{"line_number":682,"context_line":"               \u0027to all cells\u0027)"},{"line_number":683,"context_line":"    @args(\u0027version2\u0027, metavar\u003d\u0027VERSION\u0027, nargs\u003d\u0027?\u0027, help\u003d\u0027Database version\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_9360b734","line":680,"range":{"start_line":680,"start_character":11,"end_line":680,"end_character":23},"in_reply_to":"bf3e73b7_41f03c91","updated":"2017-08-07 17:14:14.000000000","message":"You can also have optional positional arguments. They\u0027re written like so in man pages:\n\n    my-command [ARG]\n\nvs.\n\n    my-command ARG\n\nI can\u0027t find any guidelines about when to use optional positional arguments, vs. optional parameters. \u0027ls\u0027 was given as an example as an example because it uses optional positional arguments, however, it could just as well have used optional parameters:\n\n    ls [TARGET]\n    ls --target \u003cTARGET\u003e\n\nHowever, while both formats are completely valid, only one of these works with cliff and we want to use cliff in \u0027nova-manage\u0027. The reason the optional parameter format doesn\u0027t work with cliff is because of the name of the parameter - \u0027--version\u0027. cliff doesn\u0027t allow you to use parameters with the same name at multiple levels of the parser. Regardless of what you do, passing \u0027--version\u0027 as a parameter will return the version of the application. It\u0027s a flaw in the design, but we can\u0027t do anything about it without a huge refactor of cliff.\n\nNote that the second option, \u0027--local-cell\u0027, is a boolean \"flag\" (no arguments), and you always pass flags as options. There\u0027s also no competition with anything in cliff.\n\nI will note that the \u0027django-admin\u0027 command, which uses a \u0027migrate\u0027 nomenclature to achieve something very similar, takes the positional argument style [1]:\n\n    django-admin migrate [app_label] [migration_name]\n\nNote also the many boolean options that are present for that command.\n\n[1] https://docs.djangoproject.com/en/1.11/ref/django-admin/#django-admin-migrate\n[2] http://pubs.opengroup.org/onlinepubs/9699919799//basedefs/V1_chap12.html#tag_12_02","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4c83eea98e9c4d4058c48340e22ad05cf1727e98","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        pass"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"    @args(\u0027--version\u0027, metavar\u003d\u0027\u003cversion\u003e\u0027, help\u003dargparse.SUPPRESS)"},{"line_number":680,"context_line":"    @args(\u0027--local_cell\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":681,"context_line":"          help\u003d\u0027Only sync db in the local cell: do not attempt to fan-out\u0027"},{"line_number":682,"context_line":"               \u0027to all cells\u0027)"},{"line_number":683,"context_line":"    @args(\u0027version2\u0027, metavar\u003d\u0027VERSION\u0027, nargs\u003d\u0027?\u0027, help\u003d\u0027Database version\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_7f291688","line":680,"range":{"start_line":680,"start_character":11,"end_line":680,"end_character":23},"in_reply_to":"df3967d1_3ce4bcdf","updated":"2017-08-03 18:49:06.000000000","message":"...meanwhile, something like \u0027--recursive\u0027 wouldn\u0027t make sense as an argument.","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2dd3bca9d82aab02a5226545af283bdda23a6523","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        pass"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"    @args(\u0027--version\u0027, metavar\u003d\u0027\u003cversion\u003e\u0027, help\u003dargparse.SUPPRESS)"},{"line_number":680,"context_line":"    @args(\u0027--local_cell\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":681,"context_line":"          help\u003d\u0027Only sync db in the local cell: do not attempt to fan-out\u0027"},{"line_number":682,"context_line":"               \u0027to all cells\u0027)"},{"line_number":683,"context_line":"    @args(\u0027version2\u0027, metavar\u003d\u0027VERSION\u0027, nargs\u003d\u0027?\u0027, help\u003d\u0027Database version\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_3ce4bcdf","line":680,"range":{"start_line":680,"start_character":11,"end_line":680,"end_character":23},"in_reply_to":"df3967d1_771f045b","updated":"2017-08-03 18:37:16.000000000","message":"This doesn\u0027t have any harmful effects for cliff but, just as importantly, this is a feature flag. Think of something like the \u0027ls\u0027 command. You call that like so:\n\n  ls\n\nor\n\n  ls path/to/directory\n\nBasically, list a directory and, if that directory isn\u0027t provided, default to the current one. We\u0027re doing the same thing here but with syncing and versions.","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6898db4afd2d5c2140ec937469887c17ab0f6a51","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        pass"},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"    @args(\u0027--version\u0027, metavar\u003d\u0027\u003cversion\u003e\u0027, help\u003dargparse.SUPPRESS)"},{"line_number":680,"context_line":"    @args(\u0027--local_cell\u0027, action\u003d\u0027store_true\u0027,"},{"line_number":681,"context_line":"          help\u003d\u0027Only sync db in the local cell: do not attempt to fan-out\u0027"},{"line_number":682,"context_line":"               \u0027to all cells\u0027)"},{"line_number":683,"context_line":"    @args(\u0027version2\u0027, metavar\u003d\u0027VERSION\u0027, nargs\u003d\u0027?\u0027, help\u003d\u0027Database version\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_41f03c91","line":680,"range":{"start_line":680,"start_character":11,"end_line":680,"end_character":23},"in_reply_to":"df3967d1_7f291688","updated":"2017-08-07 16:19:06.000000000","message":"That doesn\u0027t really answer my question, or in a way that makes sense to me. We provide a default behavior for both --version and --local_cell (even though --local_cell isn\u0027t yet implemented), but since both are optional they are defined as options, using -- notation, rather than positional arguments. So why would --version be something we have to care about for cliff but --local_cell isn\u0027t?","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"}],"releasenotes/notes/reworked-nova-manage-db-commands-b958b0a41a4004a6.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"541833955bbdc4bb3b0fc54405867d4be4a60964","unresolved":false,"context_lines":[{"line_number":7,"context_line":""},{"line_number":8,"context_line":"        $ nova-manage api_db sync --version some-version"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    This is now an optional parameter. For example::"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"        $ nova-manage api_db sync some-version"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df3967d1_7706e41e","line":10,"range":{"start_line":10,"start_character":28,"end_line":10,"end_character":37},"updated":"2017-08-03 16:03:34.000000000","message":"argument? This is confusing to me since above you said it\u0027s an optional parameter, which is usually what people think of with --options. So reading this it\u0027s not clear to me that version is optional or not.","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2dd3bca9d82aab02a5226545af283bdda23a6523","unresolved":false,"context_lines":[{"line_number":7,"context_line":""},{"line_number":8,"context_line":"        $ nova-manage api_db sync --version some-version"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    This is now an optional parameter. For example::"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"        $ nova-manage api_db sync some-version"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df3967d1_7c07e483","line":10,"range":{"start_line":10,"start_character":28,"end_line":10,"end_character":37},"in_reply_to":"df3967d1_7706e41e","updated":"2017-08-03 18:37:16.000000000","message":"Yeah, argument makes more sense","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"541833955bbdc4bb3b0fc54405867d4be4a60964","unresolved":false,"context_lines":[{"line_number":16,"context_line":"deprecations:"},{"line_number":17,"context_line":"  - |"},{"line_number":18,"context_line":"    The ``--version`` parameters of the ``nova-manage api_db sync`` and"},{"line_number":19,"context_line":"    ``nova-manage db sync`` commands has been deprecated in favor of"},{"line_number":20,"context_line":"    positional arguments."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df3967d1_b729ec8a","line":20,"range":{"start_line":19,"start_character":60,"end_line":20,"end_character":24},"updated":"2017-08-03 16:03:34.000000000","message":"Which are usually assumed to be not optional, yes? Again, confusing.","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2dd3bca9d82aab02a5226545af283bdda23a6523","unresolved":false,"context_lines":[{"line_number":16,"context_line":"deprecations:"},{"line_number":17,"context_line":"  - |"},{"line_number":18,"context_line":"    The ``--version`` parameters of the ``nova-manage api_db sync`` and"},{"line_number":19,"context_line":"    ``nova-manage db sync`` commands has been deprecated in favor of"},{"line_number":20,"context_line":"    positional arguments."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df3967d1_5c0c20a4","line":20,"range":{"start_line":19,"start_character":60,"end_line":20,"end_character":24},"in_reply_to":"df3967d1_b729ec8a","updated":"2017-08-03 18:37:16.000000000","message":"Per previous comment, \u0027ls\u0027 vs. \u0027ls path/to/dir\u0027","commit_id":"d29b583b4cb3cd3880a94fb0d9ce6e39560e1078"}]}
