{"name": "test_sku_batch_upload_update_sku", "status": "skipped", "statusDetails": {"message": "XFAIL https://jira.dailymail-tech.uz/browse/FF-109\n\nAssertionError: Handler: POST https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch; \n Expected status code: 200; \n Actual status code: 500; \n Response body: {\"message\":\"could not execute statement; SQL [n/a]; constraint [idx_shaded_id_external]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement\",\"localizedMessage\":\"could not execute statement; SQL [n/a]; constraint [idx_shaded_id_external]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement\"}; \n X-Aer-Trace-Id:", "trace": "self = <tests.fulfillment.test_supply.test_sku.TestSKUBatch object at 0x758649b98510>\nget_ff_supply_auth_header = {'Authorization': 'Bearer 909e2014-5b7e-41b1-8399-d8feac0fcbdf', 'x-aer-mesh': 'dm-hub-service-package:master;dm-hub-s...hub-internal:master;dm-hub-workflow-integration:master;dm-hub-workflow-package:master;dm-hub-workflow-tracking:master'}\n\n    @pytest.mark.xfail(reason=\"https://jira.dailymail-tech.uz/browse/FF-109\")\n    def test_sku_batch_upload_update_sku(self, get_ff_supply_auth_header):\n        with allure.step(\"Get existing external SKU id and prepare data for batch upload\"):\n            existing_external_sku_ids = FFSupplyQueries().get_external_ids_by_type(\n                _type=FFSupplyShadedIdType.SKU_ID, limit_number=SKU_NUMBERS_FOR_BATCH_FILE\n            )\n            list_sku_for_batch_file = [\n                SKUBatch(is_price_float=False, external_sku_id=existing_external_sku_id).to_dict()\n                for existing_external_sku_id in existing_external_sku_ids\n            ]\n            sorted_list_sku_for_batch_file = sorted(list_sku_for_batch_file, key=lambda i: i[\"external_sku_id\"])\n    \n        with allure.step(\"Batch upload\"):\n>           SKUBuilder(headers=get_ff_supply_auth_header).batch_upload(data=list_sku_for_batch_file)\n\ntests/fulfillment/test_supply/test_sku.py:87: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nsrc/framework/fulfillment/builders/supply/sku.py:96: in batch_upload\n    wait_sku_batch_upload(headers=self.headers, file=prepared_file)\nsrc/framework/common/utils/utils.py:218: in wrapped_f\n    return Retrying(\n/usr/local/lib/python3.11/site-packages/retrying.py:289: in call\n    raise attempt.get()\n          ^^^^^^^^^^^^^\n/usr/local/lib/python3.11/site-packages/retrying.py:326: in get\n    raise exc.with_traceback(tb)\n/usr/local/lib/python3.11/site-packages/retrying.py:273: in call\n    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)\n                      ^^^^^^^^^^^^^^^^^^^\nsrc/framework/fulfillment/validation/waiters/sku_batch.py:13: in wait_sku_batch_upload\n    assert SkuApi(headers=headers).api_v1_sku_batch_post(file=file).status == HTTPStatus.OK\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api/sku_api.py:355: in api_v1_sku_batch_post\n    return self.api_v1_sku_batch_post_with_http_info(**kwargs)  # noqa: E501\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api/sku_api.py:422: in api_v1_sku_batch_post_with_http_info\n    return self.api_client.call_api(\n/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api_client.py:339: in call_api\n    return self.__call_api(resource_path, method,\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <qacl_dm_ff_be_service_supply.api_client.ApiClient object at 0x758648ff6450>\nresource_path = '/api/v1/sku/batch', method = 'POST', path_params = {}\nquery_params = []\nheader_params = {'Accept': 'application/json', 'Authorization': 'Bearer 909e2014-5b7e-41b1-8399-d8feac0fcbdf', 'User-Agent': 'Swagger-Codegen/1.0.220+develop/python', 'x-aer-app-name': 'python-autotests', ...}\nbody = None\npost_params = [('file', ('tmpqm7phn5p.xlsx', b'PK\\x03\\x04\\x14\\x00\\x00\\x00\\x08\\x00\\xfb\\xba\\x85\\\\F\\xc7MH\\x95\\x00\\x00\\x00\\xcd\\x00\\x00\\x...x00\\t\\x00>\\x02\\x00\\x00\\xa9\\x15\\x00\\x00\\x00\\x00', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'))]\nfiles = {'file': '/tmp/tmpqm7phn5p.xlsx'}, response_type = 'object'\nauth_settings = ['wms-authorization'], _return_http_data_only = False\ncollection_formats = {}, _preload_content = True, _request_timeout = None\nexpected_status_code = <HTTPStatus.OK: 200>\n\n    def __call_api(\n            self, resource_path, method, path_params=None,\n            query_params=None, header_params=None, body=None, post_params=None,\n            files=None, response_type=None, auth_settings=None,\n            _return_http_data_only=None, collection_formats=None,\n            _preload_content=True, _request_timeout=None,\n            expected_status_code=HTTPStatus.OK):\n    \n        config = self.configuration\n    \n        # header parameters\n        header_params = header_params or {}\n        header_params.update(self.default_headers)\n        if self.cookie:\n            header_params['Cookie'] = self.cookie\n        if header_params:\n            header_params = self.sanitize_for_serialization(header_params)\n            header_params = dict(self.parameters_to_tuples(header_params,\n                                                           collection_formats))\n    \n        # path parameters\n        if path_params:\n            path_params = self.sanitize_for_serialization(path_params)\n            path_params = self.parameters_to_tuples(path_params,\n                                                    collection_formats)\n            for k, v in path_params:\n                # specified safe chars, encode everything\n                resource_path = resource_path.replace(\n                    '{%s}' % k,\n                    quote(str(v), safe=config.safe_chars_for_path_param)\n                )\n    \n        # query parameters\n        if query_params:\n            query_params = self.sanitize_for_serialization(query_params)\n            query_params = self.parameters_to_tuples(query_params,\n                                                     collection_formats)\n    \n        # post parameters\n        if post_params or files:\n            post_params = self.prepare_post_parameters(post_params, files)\n            post_params = self.sanitize_for_serialization(post_params)\n            post_params = self.parameters_to_tuples(post_params,\n                                                    collection_formats)\n    \n        # auth setting\n        self.update_params_for_auth(header_params, query_params, auth_settings)\n    \n        # body\n        if body:\n            body = self.sanitize_for_serialization(body)\n    \n        # request url\n        url = self.configuration.host + resource_path\n    \n        # perform request and return response\n        response_data = self.request(\n            method, url, query_params=query_params, headers=header_params,\n            post_params=post_params, body=body,\n            _preload_content=_preload_content,\n            _request_timeout=_request_timeout)\n    \n        self.last_response = response_data\n    \n        return_data = response_data\n    \n        try:\n            response_data.data\n            trace_id = response_data.urllib3_response.headers.get('x-aer-trace-id', \"\")\n        except:\n            assert response_data.status == expected_status_code, \\\n                f'Handler: {method} {url}; \\n ' \\\n                f'Expected status code: {expected_status_code}; \\n ' \\\n                f'Actual status code: {response_data.status}'\n        else:\n>           assert response_data.status == expected_status_code, \\\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                f'Handler: {method} {url}; \\n ' \\\n                f'Expected status code: {expected_status_code}; \\n ' \\\n                f'Actual status code: {response_data.status}; \\n ' \\\n                f'Response body: {response_data.data}; \\n ' \\\n                f'X-Aer-Trace-Id: {trace_id}'\nE           AssertionError: Handler: POST https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch; \nE            Expected status code: 200; \nE            Actual status code: 500; \nE            Response body: {\"message\":\"could not execute statement; SQL [n/a]; constraint [idx_shaded_id_external]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement\",\"localizedMessage\":\"could not execute statement; SQL [n/a]; constraint [idx_shaded_id_external]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement\"}; \nE            X-Aer-Trace-Id:\n\n/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api_client.py:172: AssertionError"}, "steps": [{"name": "Get existing external SKU id and prepare data for batch upload", "status": "passed", "start": 1775431435219, "stop": 1775431435232}, {"name": "Batch upload", "status": "failed", "statusDetails": {"message": "AssertionError: Handler: POST https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch; \n Expected status code: 200; \n Actual status code: 500; \n Response body: {\"message\":\"could not execute statement; SQL [n/a]; constraint [idx_shaded_id_external]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement\",\"localizedMessage\":\"could not execute statement; SQL [n/a]; constraint [idx_shaded_id_external]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement\"}; \n X-Aer-Trace-Id: \n", "trace": "  File \"/app/tests/fulfillment/test_supply/test_sku.py\", line 87, in test_sku_batch_upload_update_sku\n    SKUBuilder(headers=get_ff_supply_auth_header).batch_upload(data=list_sku_for_batch_file)\n  File \"/app/src/framework/fulfillment/builders/supply/sku.py\", line 96, in batch_upload\n    wait_sku_batch_upload(headers=self.headers, file=prepared_file)\n  File \"/app/src/framework/common/utils/utils.py\", line 218, in wrapped_f\n    return Retrying(\n           ^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/retrying.py\", line 289, in call\n    raise attempt.get()\n          ^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/retrying.py\", line 326, in get\n    raise exc.with_traceback(tb)\n  File \"/usr/local/lib/python3.11/site-packages/retrying.py\", line 273, in call\n    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)\n                      ^^^^^^^^^^^^^^^^^^^\n  File \"/app/src/framework/fulfillment/validation/waiters/sku_batch.py\", line 13, in wait_sku_batch_upload\n    assert SkuApi(headers=headers).api_v1_sku_batch_post(file=file).status == HTTPStatus.OK\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api/sku_api.py\", line 355, in api_v1_sku_batch_post\n    return self.api_v1_sku_batch_post_with_http_info(**kwargs)  # noqa: E501\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api/sku_api.py\", line 422, in api_v1_sku_batch_post_with_http_info\n    return self.api_client.call_api(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api_client.py\", line 339, in call_api\n    return self.__call_api(resource_path, method,\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api_client.py\", line 172, in __call_api\n    assert response_data.status == expected_status_code, \\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"}, "steps": [{"name": "Waiter function: wait_sku_batch_upload", "status": "failed", "statusDetails": {"message": "AssertionError: Handler: POST https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch; \n Expected status code: 200; \n Actual status code: 500; \n Response body: {\"message\":\"could not execute statement; SQL [n/a]; constraint [idx_shaded_id_external]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement\",\"localizedMessage\":\"could not execute statement; SQL [n/a]; constraint [idx_shaded_id_external]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement\"}; \n X-Aer-Trace-Id: \n", "trace": "  File \"/app/src/framework/common/utils/utils.py\", line 218, in wrapped_f\n    return Retrying(\n           ^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/retrying.py\", line 289, in call\n    raise attempt.get()\n          ^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/retrying.py\", line 326, in get\n    raise exc.with_traceback(tb)\n  File \"/usr/local/lib/python3.11/site-packages/retrying.py\", line 273, in call\n    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)\n                      ^^^^^^^^^^^^^^^^^^^\n  File \"/app/src/framework/fulfillment/validation/waiters/sku_batch.py\", line 13, in wait_sku_batch_upload\n    assert SkuApi(headers=headers).api_v1_sku_batch_post(file=file).status == HTTPStatus.OK\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api/sku_api.py\", line 355, in api_v1_sku_batch_post\n    return self.api_v1_sku_batch_post_with_http_info(**kwargs)  # noqa: E501\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api/sku_api.py\", line 422, in api_v1_sku_batch_post_with_http_info\n    return self.api_client.call_api(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api_client.py\", line 339, in call_api\n    return self.__call_api(resource_path, method,\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/qacl_dm_ff_be_service_supply/api_client.py\", line 172, in __call_api\n    assert response_data.status == expected_status_code, \\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"}, "steps": [{"name": "POST → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "702cb998-1094-4924-ae09-abd939659d14-attachment.json", "type": "application/json"}], "start": 1775431435293, "stop": 1775431435293}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "379f2bbc-d67d-4a1b-905a-0481e242b14d-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "d2cdddf4-9609-4b97-8d7f-28d1c94420a2-attachment.json", "type": "application/json"}], "start": 1775431435293, "stop": 1775431435293}], "attachments": [{"name": "cURL", "source": "da8ebf54-90ba-44e6-bc60-afa4c5121f38-attachment.txt", "type": "text/plain"}], "start": 1775431435292, "stop": 1775431435293}, {"name": "POST → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "6c37b546-d6c9-4409-ab6c-7557a8ce786e-attachment.json", "type": "application/json"}], "start": 1775431455321, "stop": 1775431455321}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "5f055ffb-06c3-45ab-b083-3a2a6559bcec-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "711c4779-c04b-4dbb-be92-fd8f33a0535c-attachment.json", "type": "application/json"}], "start": 1775431455321, "stop": 1775431455321}], "attachments": [{"name": "cURL", "source": "f1843f24-14a0-4c29-9a07-18636aef5b58-attachment.txt", "type": "text/plain"}], "start": 1775431455321, "stop": 1775431455321}, {"name": "POST → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "afbd69e0-cbe6-4df3-acc8-d05e76aabfe3-attachment.json", "type": "application/json"}], "start": 1775431475352, "stop": 1775431475353}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "61f8a78c-8126-41c2-84eb-098d5b33041f-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "b59b4695-cad8-4c6d-bed1-fb6e6f79bd98-attachment.json", "type": "application/json"}], "start": 1775431475353, "stop": 1775431475353}], "attachments": [{"name": "cURL", "source": "85b55b6b-53af-4d4c-b719-d41afc61446c-attachment.txt", "type": "text/plain"}], "start": 1775431475352, "stop": 1775431475353}, {"name": "POST → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "d55db32f-c41d-48e6-8831-21671c6cd861-attachment.json", "type": "application/json"}], "start": 1775431495383, "stop": 1775431495383}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "54d26fd0-f13c-4309-91db-6f00fd8ab098-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "eb26ce55-d655-4e6b-8a2c-603c1c1c2757-attachment.json", "type": "application/json"}], "start": 1775431495383, "stop": 1775431495384}], "attachments": [{"name": "cURL", "source": "98a0b943-7858-4cc4-bab5-b9323cb2c6bc-attachment.txt", "type": "text/plain"}], "start": 1775431495383, "stop": 1775431495384}, {"name": "POST → https://dm-ff-be-service-supply.k8s-review.dailymail-tech.uz/api/v1/sku/batch", "status": "passed", "steps": [{"name": "Request", "status": "passed", "attachments": [{"name": "request.headers", "source": "e636955c-98af-4fb0-918d-16a44478864a-attachment.json", "type": "application/json"}], "start": 1775431515417, "stop": 1775431515418}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "01a5e98a-53f8-4476-b394-ced1752a4db7-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "1306ff76-39b0-4896-bdd5-922fd04bb16f-attachment.json", "type": "application/json"}], "start": 1775431515418, "stop": 1775431515418}], "attachments": [{"name": "cURL", "source": "94bfb00b-3837-495b-9053-b77d55ab6013-attachment.txt", "type": "text/plain"}], "start": 1775431515417, "stop": 1775431515418}], "start": 1775431435265, "stop": 1775431515420}], "start": 1775431435232, "stop": 1775431515422}], "attachments": [{"name": "log", "source": "be9f3e7f-90f5-431c-96fa-c6130d7f47f9-attachment.txt", "type": "text/plain"}], "start": 1775431435219, "stop": 1775431515422, "uuid": "de63b384-fa37-4e08-965d-74b9d0667d0c", "historyId": "5b8363e826b9c7f481b73567f6503152", "testCaseId": "5b8363e826b9c7f481b73567f6503152", "fullName": "tests.fulfillment.test_supply.test_sku.TestSKUBatch#test_sku_batch_upload_update_sku", "labels": [{"name": "tag", "value": "dm-ff-be-service-supply"}, {"name": "parentSuite", "value": "tests.fulfillment.test_supply"}, {"name": "suite", "value": "test_sku"}, {"name": "subSuite", "value": "TestSKUBatch"}, {"name": "host", "value": "runner-1rdl4o-mi-project-9-concurrent-1-b7441vj3"}, {"name": "thread", "value": "42-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "tests.fulfillment.test_supply.test_sku"}], "titlePath": ["tests", "fulfillment", "test_supply", "test_sku.py", "TestSKUBatch"]}