)]}'
{"tempest/api/image/v2/test_images.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f5b8f625d6e1f158359fc2a8cf11cdb35dcb3988","unresolved":true,"context_lines":[{"line_number":109,"context_line":"        self.assertEqual(1, len(tasks[\u0027tasks\u0027]))"},{"line_number":110,"context_line":"        task \u003d tasks[\u0027tasks\u0027][0]"},{"line_number":111,"context_line":"        waiters.wait_for_image_task_status("},{"line_number":112,"context_line":"            self.tasks_client, task[\u0027id\u0027], \u0027success\u0027)"},{"line_number":113,"context_line":"        self.assertEqual(resp.response[\u0027x-openstack-request-id\u0027],"},{"line_number":114,"context_line":"                         task[\u0027request_id\u0027])"},{"line_number":115,"context_line":"        self.assertEqual(\u0027glance-direct\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"86bcde53_20efba2e","line":112,"updated":"2021-04-30 16:47:56.000000000","message":"This is doing a different thing than my original implementation. The tasks API will normally be disabled for regular users and thus this should fail with the primary credentials. We expose just the relevant tasks under image/$id/tasks so that regular users can see when a task for their image is done.\n\nDuring the RBAC work this last cycle, we realized that the defaults-in-code, the sample file, and what devstack ends up with are all inconsistent and we have work planned for this cycle to refactor all of the policy layer to fix this.\n\nSo, I would expect that a real cloud would not be able to run this test anymore because the regular users can\u0027t see tasks via the /tasks/$task_id API, but this will also break when we fix the default policies.\n\nIdeally, we\u0027d just poll on show_image-tasks() from L108...","commit_id":"43c67f49f09432a6485dbc4745795736aea326d4"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"7a8a297a493d8ffd357f12f1cbb19ee2c195676c","unresolved":true,"context_lines":[{"line_number":109,"context_line":"        self.assertEqual(1, len(tasks[\u0027tasks\u0027]))"},{"line_number":110,"context_line":"        task \u003d tasks[\u0027tasks\u0027][0]"},{"line_number":111,"context_line":"        waiters.wait_for_image_task_status("},{"line_number":112,"context_line":"            self.tasks_client, task[\u0027id\u0027], \u0027success\u0027)"},{"line_number":113,"context_line":"        self.assertEqual(resp.response[\u0027x-openstack-request-id\u0027],"},{"line_number":114,"context_line":"                         task[\u0027request_id\u0027])"},{"line_number":115,"context_line":"        self.assertEqual(\u0027glance-direct\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"d8f2703c_3f9cacea","line":112,"in_reply_to":"86bcde53_20efba2e","updated":"2021-04-30 17:04:47.000000000","message":"I see, if that is admin by default (in future, as currently it seems open for all[1]) then we can avoid using that API so that this test can be non-admin test.\n\nBut I get your point of validating the workflow in same way users are supposed to do. \n\n[1] https://github.com/openstack/glance/blob/master/glance/policies/tasks.py#L42","commit_id":"43c67f49f09432a6485dbc4745795736aea326d4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7bc9c4fc0d57d9e79dacc7baeede6ba8cc24d55f","unresolved":true,"context_lines":[{"line_number":109,"context_line":"        self.assertEqual(1, len(tasks[\u0027tasks\u0027]))"},{"line_number":110,"context_line":"        task \u003d tasks[\u0027tasks\u0027][0]"},{"line_number":111,"context_line":"        waiters.wait_for_image_task_status("},{"line_number":112,"context_line":"            self.tasks_client, task[\u0027id\u0027], \u0027success\u0027)"},{"line_number":113,"context_line":"        self.assertEqual(resp.response[\u0027x-openstack-request-id\u0027],"},{"line_number":114,"context_line":"                         task[\u0027request_id\u0027])"},{"line_number":115,"context_line":"        self.assertEqual(\u0027glance-direct\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"77d319d4_d49e1edf","line":112,"in_reply_to":"86bcde53_20efba2e","updated":"2021-04-30 16:56:10.000000000","message":"Just to be clear: the thing this test is supposed to be validating is that we can see and follow the task status from the images/$id/tasks API as a regular user, as that\u0027s a new feature and is added so people can do an import and poll for completion. We\u0027re not checking it in this test just to make sure the tasks finishes, we\u0027re trying to actually validate that workflow of polling for task completion via images/$id/tasks, so changing this test in this way removes that validation.\n\nTBH, I\u0027m not sure why you\u0027re able to hit this with os_primary creds, as we have a master control on /tasks/* that requires admin for those...","commit_id":"43c67f49f09432a6485dbc4745795736aea326d4"}]}
