{"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 0x7f6fdeed5410>\nget_ff_supply_auth_header = {'Authorization': 'Bearer 55532e1c-b457-4666-b255-4ec6d772c53a', '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 0x7f6fde13efd0>\nresource_path = '/api/v1/sku/batch', method = 'POST', path_params = {}\nquery_params = []\nheader_params = {'Accept': 'application/json', 'Authorization': 'Bearer 55532e1c-b457-4666-b255-4ec6d772c53a', 'User-Agent': 'Swagger-Codegen/1.0.224+develop/python', 'x-aer-app-name': 'python-autotests', ...}\nbody = None\npost_params = [('file', ('tmpx068vwt8.xlsx', b'PK\\x03\\x04\\x14\\x00\\x00\\x00\\x08\\x00\\xfb\\xba\\x89\\\\F\\xc7MH\\x95\\x00\\x00\\x00\\xcd\\x00\\x00\\x...x00\\t\\x00>\\x02\\x00\\x00\\xd9\\x15\\x00\\x00\\x00\\x00', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'))]\nfiles = {'file': '/tmp/tmpx068vwt8.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": 1775777034288, "stop": 1775777034301}, {"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": "8925ba63-8cbd-46ed-928d-e8f1334ad535-attachment.json", "type": "application/json"}], "start": 1775777034450, "stop": 1775777034450}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "487e29eb-367f-4716-8e7c-15601d71090d-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "a60c3d08-33de-4ae6-b27b-18c4127c5ced-attachment.txt", "type": "text/plain"}], "start": 1775777034450, "stop": 1775777034450}], "attachments": [{"name": "cURL", "source": "2ab353d7-01ef-43e6-b5e3-892351c9577f-attachment.txt", "type": "text/plain"}], "start": 1775777034450, "stop": 1775777034450}, {"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": "ede55f7f-a02a-4583-81cc-af282026b07b-attachment.json", "type": "application/json"}], "start": 1775777054485, "stop": 1775777054486}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "157a692a-c3b7-48c7-b681-ffc3760acf26-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "b2ac73dc-1207-41ab-9bd8-9f55c037ff6b-attachment.json", "type": "application/json"}], "start": 1775777054486, "stop": 1775777054486}], "attachments": [{"name": "cURL", "source": "ba8f1e48-0f6e-4da4-a298-310b3e1527aa-attachment.txt", "type": "text/plain"}], "start": 1775777054485, "stop": 1775777054486}, {"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": "1c627aa8-f852-4e35-8861-5640fe72e7c3-attachment.json", "type": "application/json"}], "start": 1775777074526, "stop": 1775777074526}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "cd302c8d-d509-4c4b-84b1-8608d6a6af39-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "94fe8ad1-ef36-43f6-ae6e-db164bd574b4-attachment.json", "type": "application/json"}], "start": 1775777074526, "stop": 1775777074526}], "attachments": [{"name": "cURL", "source": "78a91282-ffc5-4153-b16e-a3ff1f403108-attachment.txt", "type": "text/plain"}], "start": 1775777074526, "stop": 1775777074526}, {"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": "f5360e89-c7f8-4c98-b3bf-c2cd084ed3d4-attachment.json", "type": "application/json"}], "start": 1775777094569, "stop": 1775777094569}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "0b02798a-4a7c-468c-97c2-e113ce6b7d2d-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "adc37649-0ce1-45a0-b9f1-90957c2f7f24-attachment.json", "type": "application/json"}], "start": 1775777094569, "stop": 1775777094570}], "attachments": [{"name": "cURL", "source": "43ed22d6-7032-46be-a4dd-ba7301205176-attachment.txt", "type": "text/plain"}], "start": 1775777094569, "stop": 1775777094570}, {"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": "3e3dee81-00e8-4d13-933b-a44421642a3e-attachment.json", "type": "application/json"}], "start": 1775777114608, "stop": 1775777114608}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "e7551c0a-52ef-4590-bbf0-592aa941aff4-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "719cc514-f6bf-4fab-ae5d-a4b574dc8edc-attachment.json", "type": "application/json"}], "start": 1775777114608, "stop": 1775777114608}], "attachments": [{"name": "cURL", "source": "c83d1747-4002-4531-8a0d-481fa8e7af48-attachment.txt", "type": "text/plain"}], "start": 1775777114608, "stop": 1775777114608}], "start": 1775777034331, "stop": 1775777114612}], "start": 1775777034301, "stop": 1775777114613}], "attachments": [{"name": "log", "source": "c9675459-8844-4301-9984-d5265f335e4e-attachment.txt", "type": "text/plain"}], "start": 1775777034288, "stop": 1775777114614, "uuid": "8820b188-2bff-44e4-8242-74edaec5f9d5", "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-6k0ktp5e"}, {"name": "thread", "value": "33-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"]}