{"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 0x764d77d0c390>\nget_ff_supply_auth_header = {'Authorization': 'Bearer 6a02d681-8ae5-4977-8797-0bfc6a83c3e7', '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 0x764d771431d0>\nresource_path = '/api/v1/sku/batch', method = 'POST', path_params = {}\nquery_params = []\nheader_params = {'Accept': 'application/json', 'Authorization': 'Bearer 6a02d681-8ae5-4977-8797-0bfc6a83c3e7', 'User-Agent': 'Swagger-Codegen/1.0.220+develop/python', 'x-aer-app-name': 'python-autotests', ...}\nbody = None\npost_params = [('file', ('tmpzqx8cime.xlsx', b'PK\\x03\\x04\\x14\\x00\\x00\\x00\\x08\\x00\\x0e\\xbb\\x84\\\\F\\xc7MH\\x95\\x00\\x00\\x00\\xcd\\x00\\x00\\x...x00\\t\\x00>\\x02\\x00\\x00\\xa1\\x15\\x00\\x00\\x00\\x00', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'))]\nfiles = {'file': '/tmp/tmpzqx8cime.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": 1775345069480, "stop": 1775345069492}, {"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": "50b67c6d-c631-4009-98c0-595a6aaec6ae-attachment.json", "type": "application/json"}], "start": 1775345069681, "stop": 1775345069681}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "01cf1064-38bc-47e7-9085-ac8abc366444-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "dc236d45-2013-4e9d-a46e-b31445ed9c9f-attachment.json", "type": "application/json"}], "start": 1775345069681, "stop": 1775345069681}], "attachments": [{"name": "cURL", "source": "3919d0ff-0635-4f30-ad91-2c70528876ed-attachment.txt", "type": "text/plain"}], "start": 1775345069681, "stop": 1775345069681}, {"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": "931376b1-ccc3-4861-8f03-aa4eb7c6e089-attachment.json", "type": "application/json"}], "start": 1775345089726, "stop": 1775345089726}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "6abe77f2-385a-4ffa-a9f9-abd5f9349c59-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "1770924f-0aaf-4395-9350-453337bbbaf3-attachment.json", "type": "application/json"}], "start": 1775345089726, "stop": 1775345089726}], "attachments": [{"name": "cURL", "source": "73fd2f54-0d61-4e42-b7ea-41ae72b3f53d-attachment.txt", "type": "text/plain"}], "start": 1775345089726, "stop": 1775345089726}, {"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": "444a4168-1c4b-4ba0-a992-e04e140479b9-attachment.json", "type": "application/json"}], "start": 1775345109764, "stop": 1775345109765}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "b0c35691-9156-454c-a2b1-3f2f40b9d0ab-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "6f4efca5-9e9c-4bed-8383-2af031c8c1ae-attachment.json", "type": "application/json"}], "start": 1775345109765, "stop": 1775345109765}], "attachments": [{"name": "cURL", "source": "4e87a40e-cf7d-41d7-bc34-55fc2af0c90e-attachment.txt", "type": "text/plain"}], "start": 1775345109764, "stop": 1775345109765}, {"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": "e833e1df-b9e6-4ed7-93dc-47a34a8a6780-attachment.json", "type": "application/json"}], "start": 1775345129804, "stop": 1775345129804}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "4052f4a5-0362-478f-bd0c-4279b1836d51-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "78479eb7-eb27-4391-b7b1-08ae3487bf2f-attachment.json", "type": "application/json"}], "start": 1775345129804, "stop": 1775345129805}], "attachments": [{"name": "cURL", "source": "9f33cf98-abaa-433e-a0be-9605cf9934b3-attachment.txt", "type": "text/plain"}], "start": 1775345129804, "stop": 1775345129805}, {"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": "48927b96-b51b-43c3-afdd-ca724464b7a8-attachment.json", "type": "application/json"}], "start": 1775345149849, "stop": 1775345149849}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "70ba69ac-a001-4b0b-b95e-c591d1c24e49-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "5e7afc2a-c3d7-4ebb-9768-e5b264851cb0-attachment.json", "type": "application/json"}], "start": 1775345149849, "stop": 1775345149850}], "attachments": [{"name": "cURL", "source": "3a2e8608-36cd-4e19-bca9-f19428367ecb-attachment.txt", "type": "text/plain"}], "start": 1775345149849, "stop": 1775345149850}], "start": 1775345069532, "stop": 1775345149852}], "start": 1775345069492, "stop": 1775345149854}], "attachments": [{"name": "log", "source": "2cc293da-8747-44bb-8b5e-e388773bc62a-attachment.txt", "type": "text/plain"}], "start": 1775345069480, "stop": 1775345149854, "uuid": "920acc2d-3168-45a3-ad4a-09cb97754043", "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-6hl3ubv7"}, {"name": "thread", "value": "30-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"]}