)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"0e75cdc3ce3a39af7dd7892a9333167ce62cc27c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7a7765d6_d5844cbc","updated":"2022-10-28 16:52:37.000000000","message":"Can you show how exactly you produce the error you mention? For me \"-c\" always wins, if I use it, only the specified columns are shown, and that is IMO the expected behavior.","commit_id":"42a3e7c14cb1783d01e60264ac872bdf1df7d1f9"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"e7215857ee726eac21d4c4eb2e7dcbeca8f40423","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6f8d4c73_7b332967","updated":"2022-11-03 13:13:28.000000000","message":"O.k., I can reproduce the issue with the latest release, it doesn\u0027t seem to be present for 5.8.0. But I still do not completely understand what is happening, so leaving this for other reviewers.","commit_id":"42a3e7c14cb1783d01e60264ac872bdf1df7d1f9"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"943e322e90c11c8a88bddfa0653e0d8a3074b7bf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d616c926_b49c8937","updated":"2022-11-03 14:14:23.000000000","message":"Thank you for reviewing it.\n\nThis is for additional columns only:\nhttps://opendev.org/openstack/python-openstackclient/src/commit/a03b2352d941cf283f5519c1dc46929550ce373a/openstackclient/compute/v2/server.py#L2447\n\nThe current code is leaving duplicated entry on tuples\nhttps://opendev.org/openstack/python-openstackclient/src/branch/master/openstackclient/compute/v2/server.py#L2484\n\nThis is returned to command (osc_lib). Osc_lib uses cliff lib that uses prettytable to show the output table.\nprettytable does not accept duplicated column names.\n\nIf we use a different output formatter it works as expected.\nopenstack server list --long -c ID -c Name -c Host -f csv\n\nIn order to fix, we could remove columns that are added with --long options:\nhttps://opendev.org/openstack/python-openstackclient/src/commit/a03b2352d941cf283f5519c1dc46929550ce373a/openstackclient/compute/v2/server.py#L2434\nhttps://opendev.org/openstack/python-openstackclient/src/commit/a03b2352d941cf283f5519c1dc46929550ce373a/openstackclient/compute/v2/server.py#L2473\n\nOr just remove duplicated columns.\n","commit_id":"42a3e7c14cb1783d01e60264ac872bdf1df7d1f9"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"c361ce3a6943d0bc5670b3ee290899663cff08c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"291b6d7f_67365569","updated":"2022-10-25 17:25:36.000000000","message":"looks quite fair to me","commit_id":"42a3e7c14cb1783d01e60264ac872bdf1df7d1f9"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"fc4a32be3a1b25efab3334429b8c2ca41914be4a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"07812c72_a7f5e0a6","in_reply_to":"7a7765d6_d5844cbc","updated":"2022-10-28 17:31:40.000000000","message":"Hi, \n\nThank you for reviewing this patch!\n\nI am able to reproduce this error with the following command:\n\n$ openstack server list --long -c ID -c Name -c Host\nField names must be unique!","commit_id":"42a3e7c14cb1783d01e60264ac872bdf1df7d1f9"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"3923632c05779fc209920f96d244cf723d11d607","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"395d01ff_50823b06","updated":"2022-11-29 20:43:53.000000000","message":"Done","commit_id":"15d6d2acfbfa074f9824174bd4a9346ba4a11c4d"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"e45b9d4cb4de7f20f13a4406cc5b1eadb35c3699","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"42debcab_35229ad3","updated":"2022-11-29 20:57:25.000000000","message":"The only point is that if someone add/remove column from --long option and forget to review/update additional columns, we will face the same issue again. We will always have to crosscheck --long and additional columns code.\n\n\nUp to you. If you prefer, I can certanly implement that.\n\nThank you ","commit_id":"15d6d2acfbfa074f9824174bd4a9346ba4a11c4d"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"780537f8d2cb42f0e437d19befca34b7a1d40b4f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"84d52ac9_aa7b9c5d","updated":"2022-11-29 20:58:30.000000000","message":"The only point is that if someone add/remove column from --long option and forget to review/update columns, we will face the same issue again. We will always have to crosscheck --long and additional columns code.\n\n\nUp to you. If you prefer, I can certainly implement that.\n\nThank you","commit_id":"15d6d2acfbfa074f9824174bd4a9346ba4a11c4d"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"d12ba9493a01c80b8731b31d3e357eca9183eb37","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"72b06d83_250ee15b","updated":"2022-11-29 20:59:18.000000000","message":"The only point is that if someone add/remove column from --long option and forget to review/update columns, we will face the same issue again. We will always have to crosscheck --long and additional columns code.\n\n\nUp to you. If you prefer, I can certainly implement that.\n\nThank you\n","commit_id":"15d6d2acfbfa074f9824174bd4a9346ba4a11c4d"}],"openstackclient/compute/v2/server.py":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"e7215857ee726eac21d4c4eb2e7dcbeca8f40423","unresolved":true,"context_lines":[{"line_number":2444,"context_line":""},{"line_number":2445,"context_line":"        marker_id \u003d None"},{"line_number":2446,"context_line":""},{"line_number":2447,"context_line":"        # support for additional columns"},{"line_number":2448,"context_line":"        if parsed_args.columns:"},{"line_number":2449,"context_line":"            for c in parsed_args.columns:"},{"line_number":2450,"context_line":"                if c in (\u0027Project ID\u0027, \u0027project_id\u0027):"},{"line_number":2451,"context_line":"                    columns +\u003d (\u0027tenant_id\u0027,)"},{"line_number":2452,"context_line":"                    column_headers +\u003d (\u0027Project ID\u0027,)"}],"source_content_type":"text/x-python","patch_set":1,"id":"6ad60954_77672256","line":2449,"range":{"start_line":2447,"start_character":8,"end_line":2449,"end_character":41},"updated":"2022-11-03 13:13:28.000000000","message":"I think the bug is really in this block. The -c option isn\u0027t adding additional columns, it should override the default list of columns. So columns and column_headers should be reset to empty here.\n\nBut I also must admit that I don\u0027t completely understand how this is currently working. Like when I do \"server list -c ID\", only the ID column is being output, but that doesn\u0027t match what is being done in this code.","commit_id":"42a3e7c14cb1783d01e60264ac872bdf1df7d1f9"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"70f2af64843d75332a371fd015d143da78216984","unresolved":false,"context_lines":[{"line_number":2444,"context_line":""},{"line_number":2445,"context_line":"        marker_id \u003d None"},{"line_number":2446,"context_line":""},{"line_number":2447,"context_line":"        # support for additional columns"},{"line_number":2448,"context_line":"        if parsed_args.columns:"},{"line_number":2449,"context_line":"            for c in parsed_args.columns:"},{"line_number":2450,"context_line":"                if c in (\u0027Project ID\u0027, \u0027project_id\u0027):"},{"line_number":2451,"context_line":"                    columns +\u003d (\u0027tenant_id\u0027,)"},{"line_number":2452,"context_line":"                    column_headers +\u003d (\u0027Project ID\u0027,)"}],"source_content_type":"text/x-python","patch_set":1,"id":"4e2fe6e0_e7f914f0","line":2449,"range":{"start_line":2447,"start_character":8,"end_line":2449,"end_character":41},"in_reply_to":"05df6bfd_a1602166","updated":"2022-11-11 13:33:30.000000000","message":"We can\u0027t override columns here, otherwise it would lose other columns that are added before in the code.","commit_id":"42a3e7c14cb1783d01e60264ac872bdf1df7d1f9"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"ff7c29caa968517556f8fbb902d0c6ac153fae2d","unresolved":false,"context_lines":[{"line_number":2444,"context_line":""},{"line_number":2445,"context_line":"        marker_id \u003d None"},{"line_number":2446,"context_line":""},{"line_number":2447,"context_line":"        # support for additional columns"},{"line_number":2448,"context_line":"        if parsed_args.columns:"},{"line_number":2449,"context_line":"            for c in parsed_args.columns:"},{"line_number":2450,"context_line":"                if c in (\u0027Project ID\u0027, \u0027project_id\u0027):"},{"line_number":2451,"context_line":"                    columns +\u003d (\u0027tenant_id\u0027,)"},{"line_number":2452,"context_line":"                    column_headers +\u003d (\u0027Project ID\u0027,)"}],"source_content_type":"text/x-python","patch_set":1,"id":"05df6bfd_a1602166","line":2449,"range":{"start_line":2447,"start_character":8,"end_line":2449,"end_character":41},"in_reply_to":"6ad60954_77672256","updated":"2022-11-11 13:21:33.000000000","message":"Done","commit_id":"42a3e7c14cb1783d01e60264ac872bdf1df7d1f9"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"682923ba2a930d60b8ca4084fb92c8485366163c","unresolved":true,"context_lines":[{"line_number":2530,"context_line":"                if c in (\u0027Security Groups\u0027, \u0027security_groups\u0027):"},{"line_number":2531,"context_line":"                    columns +\u003d (\u0027security_groups_name\u0027,)"},{"line_number":2532,"context_line":"                    column_headers +\u003d (\u0027Security Groups\u0027,)"},{"line_number":2533,"context_line":"                if c in (\"Task State\", \"task_state\"):"},{"line_number":2534,"context_line":"                    columns +\u003d (\u0027OS-EXT-STS:task_state\u0027,)"},{"line_number":2535,"context_line":"                    column_headers +\u003d (\u0027Task State\u0027,)"},{"line_number":2536,"context_line":"                if c in (\"Power State\", \"power_state\"):"}],"source_content_type":"text/x-python","patch_set":2,"id":"d71dafb3_b696d3b1","line":2533,"updated":"2022-11-29 15:38:02.000000000","message":"Rather than doing what you\u0027re doing below, you could avoid adding certain columns if the user already requested \u0027--long\u0027. Something like this:\n\n  if c in (\u0027Project ID\u0027, \u0027project_id\u0027):\n      ...\n  ... # check for all the columns that aren\u0027t emitted with \u0027--long\u0027 first\n\n  # some of these options are already emitted when passing --long,\n  # so if the user requested them again simply ignore the request\n  if parsed_args.long:\n      continue\n\n  if c in (\"Task State\", \"task_state\"):\n      ...\n  ...  # check for all the columns that would be emitted with \u0027--long\u0027 after\n  ...  # we checked for \u0027--long\u0027 itself and determined it wasn\u0027t\n  ...  # present\n\nHopefully that makes sense?","commit_id":"d84d185b71a29421d2d0a6a820e5284b4f522fbb"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"d12ba9493a01c80b8731b31d3e357eca9183eb37","unresolved":false,"context_lines":[{"line_number":2530,"context_line":"                if c in (\u0027Security Groups\u0027, \u0027security_groups\u0027):"},{"line_number":2531,"context_line":"                    columns +\u003d (\u0027security_groups_name\u0027,)"},{"line_number":2532,"context_line":"                    column_headers +\u003d (\u0027Security Groups\u0027,)"},{"line_number":2533,"context_line":"                if c in (\"Task State\", \"task_state\"):"},{"line_number":2534,"context_line":"                    columns +\u003d (\u0027OS-EXT-STS:task_state\u0027,)"},{"line_number":2535,"context_line":"                    column_headers +\u003d (\u0027Task State\u0027,)"},{"line_number":2536,"context_line":"                if c in (\"Power State\", \"power_state\"):"}],"source_content_type":"text/x-python","patch_set":2,"id":"8a791888_f8eb1ae6","line":2533,"in_reply_to":"d71dafb3_b696d3b1","updated":"2022-11-29 20:59:18.000000000","message":"Done","commit_id":"d84d185b71a29421d2d0a6a820e5284b4f522fbb"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"682923ba2a930d60b8ca4084fb92c8485366163c","unresolved":true,"context_lines":[{"line_number":2552,"context_line":"                    columns +\u003d (\u0027Metadata\u0027,)"},{"line_number":2553,"context_line":"                    column_headers +\u003d (\u0027Properties\u0027,)"},{"line_number":2554,"context_line":""},{"line_number":2555,"context_line":"            # convert back to tuple and remove duplicates"},{"line_number":2556,"context_line":"            column_headers \u003d tuple(collections.OrderedDict.fromkeys("},{"line_number":2557,"context_line":"                column_headers))"},{"line_number":2558,"context_line":"            columns \u003d tuple(collections.OrderedDict.fromkeys(columns))"}],"source_content_type":"text/x-python","patch_set":2,"id":"77ac1648_44cfeba0","line":2555,"range":{"start_line":2555,"start_character":14,"end_line":2555,"end_character":40},"updated":"2022-11-29 15:38:02.000000000","message":"This is misleading. It\u0027s already a tuple before start this. I expect you meant to say \"covert to an ordered dict and then back to a tuple to remove duplicates\", but you could just say \"remove duplicates\" and leave it to the user to figure out how it\u0027s working.","commit_id":"d84d185b71a29421d2d0a6a820e5284b4f522fbb"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"3923632c05779fc209920f96d244cf723d11d607","unresolved":false,"context_lines":[{"line_number":2552,"context_line":"                    columns +\u003d (\u0027Metadata\u0027,)"},{"line_number":2553,"context_line":"                    column_headers +\u003d (\u0027Properties\u0027,)"},{"line_number":2554,"context_line":""},{"line_number":2555,"context_line":"            # convert back to tuple and remove duplicates"},{"line_number":2556,"context_line":"            column_headers \u003d tuple(collections.OrderedDict.fromkeys("},{"line_number":2557,"context_line":"                column_headers))"},{"line_number":2558,"context_line":"            columns \u003d tuple(collections.OrderedDict.fromkeys(columns))"}],"source_content_type":"text/x-python","patch_set":2,"id":"e151ade6_12ecd264","line":2555,"range":{"start_line":2555,"start_character":14,"end_line":2555,"end_character":40},"in_reply_to":"77ac1648_44cfeba0","updated":"2022-11-29 20:43:53.000000000","message":"Done","commit_id":"d84d185b71a29421d2d0a6a820e5284b4f522fbb"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"682923ba2a930d60b8ca4084fb92c8485366163c","unresolved":true,"context_lines":[{"line_number":2555,"context_line":"            # convert back to tuple and remove duplicates"},{"line_number":2556,"context_line":"            column_headers \u003d tuple(collections.OrderedDict.fromkeys("},{"line_number":2557,"context_line":"                column_headers))"},{"line_number":2558,"context_line":"            columns \u003d tuple(collections.OrderedDict.fromkeys(columns))"},{"line_number":2559,"context_line":""},{"line_number":2560,"context_line":"        if parsed_args.marker:"},{"line_number":2561,"context_line":"            # Check if both \"--marker\" and \"--deleted\" are used."}],"source_content_type":"text/x-python","patch_set":2,"id":"4fbf1262_e5eccbda","line":2558,"updated":"2022-11-29 15:38:02.000000000","message":"dicts are ordered by default in Python 3.7 or later. Can we replace \u0027collections.OrderedDict\u0027 with \u0027dict\u0027 here? This is kind of nitty but it would read better (KISS).","commit_id":"d84d185b71a29421d2d0a6a820e5284b4f522fbb"},{"author":{"_account_id":32118,"name":"Thobias Salazar Trevisan","email":"thobiast@gmail.com","username":"thobiastrevisan"},"change_message_id":"3d607f04cfba94ca03e80d18cf666983a1ae6bc9","unresolved":false,"context_lines":[{"line_number":2555,"context_line":"            # convert back to tuple and remove duplicates"},{"line_number":2556,"context_line":"            column_headers \u003d tuple(collections.OrderedDict.fromkeys("},{"line_number":2557,"context_line":"                column_headers))"},{"line_number":2558,"context_line":"            columns \u003d tuple(collections.OrderedDict.fromkeys(columns))"},{"line_number":2559,"context_line":""},{"line_number":2560,"context_line":"        if parsed_args.marker:"},{"line_number":2561,"context_line":"            # Check if both \"--marker\" and \"--deleted\" are used."}],"source_content_type":"text/x-python","patch_set":2,"id":"afe02d8d_a72b0600","line":2558,"in_reply_to":"4fbf1262_e5eccbda","updated":"2022-11-29 20:43:08.000000000","message":"Hi Stephen, Thanks for reviewing this patch. \n\nGood catch. Done","commit_id":"d84d185b71a29421d2d0a6a820e5284b4f522fbb"}]}
