{"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 0x7a9878445750>\nget_ff_supply_auth_header = {'Authorization': 'Bearer 85bef20a-c514-437b-954b-99ccd5639665', '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 0x7a98775ebb50>\nresource_path = '/api/v1/sku/batch', method = 'POST', path_params = {}\nquery_params = []\nheader_params = {'Accept': 'application/json', 'Authorization': 'Bearer 85bef20a-c514-437b-954b-99ccd5639665', 'User-Agent': 'Swagger-Codegen/1.0.224+develop/python', 'x-aer-app-name': 'python-autotests', ...}\nbody = None\npost_params = [('file', ('tmpuvb9upgm.xlsx', b'PK\\x03\\x04\\x14\\x00\\x00\\x00\\x08\\x00\\xfd\\xba\\x87\\\\F\\xc7MH\\x95\\x00\\x00\\x00\\xcd\\x00\\x00\\x...x00\\t\\x00>\\x02\\x00\\x00\\xcd\\x15\\x00\\x00\\x00\\x00', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'))]\nfiles = {'file': '/tmp/tmpuvb9upgm.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": 1775604239851, "stop": 1775604239860}, {"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": "88b7190d-4a07-4aae-be0c-55ad302e73c8-attachment.json", "type": "application/json"}], "start": 1775604239961, "stop": 1775604239961}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "0979dce2-cf5d-4cd9-a8f6-c6399b12baaa-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "3cc37c47-029c-442a-80a0-d43fd1ad35e5-attachment.json", "type": "application/json"}], "start": 1775604239961, "stop": 1775604239961}], "attachments": [{"name": "cURL", "source": "dd4fe029-322c-4b3c-9421-1dde536cf593-attachment.txt", "type": "text/plain"}], "start": 1775604239961, "stop": 1775604239961}, {"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": "cdec7929-6cb9-48f8-8791-2a32cbaeebe2-attachment.json", "type": "application/json"}], "start": 1775604259997, "stop": 1775604259997}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "5702eb90-b123-43f7-8258-47bd58d19da6-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "65ca1060-e80e-41a6-b339-d3ff0f7cb438-attachment.json", "type": "application/json"}], "start": 1775604259997, "stop": 1775604259997}], "attachments": [{"name": "cURL", "source": "ac00ed10-b358-43c2-9efd-66eb19078447-attachment.txt", "type": "text/plain"}], "start": 1775604259997, "stop": 1775604259997}, {"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": "fde2437e-88a0-458f-9c5c-acc5c0fdddf3-attachment.json", "type": "application/json"}], "start": 1775604280032, "stop": 1775604280032}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "05c7c025-0206-4d6e-8fb3-3d9eed4759bf-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "57838f53-4633-4a83-8420-41c24706eefd-attachment.json", "type": "application/json"}], "start": 1775604280032, "stop": 1775604280032}], "attachments": [{"name": "cURL", "source": "1a05edc7-812f-4a79-8bdc-6b9d404aff0b-attachment.txt", "type": "text/plain"}], "start": 1775604280032, "stop": 1775604280032}, {"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": "8bed7094-32ea-4129-bafa-aa7a9e8023fd-attachment.json", "type": "application/json"}], "start": 1775604300074, "stop": 1775604300075}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "51fc4e98-3eba-4069-a51a-339254907c91-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "56ad47bd-289e-437e-9159-e24fb52fe86d-attachment.json", "type": "application/json"}], "start": 1775604300075, "stop": 1775604300075}], "attachments": [{"name": "cURL", "source": "280f5cad-ca2d-416e-a5cf-4985337e7712-attachment.txt", "type": "text/plain"}], "start": 1775604300074, "stop": 1775604300075}, {"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": "cb755228-2bb7-4000-9e7f-5bd604f800e2-attachment.json", "type": "application/json"}], "start": 1775604320152, "stop": 1775604320153}, {"name": "Response → 500, trace_id: None", "status": "passed", "attachments": [{"name": "response.headers", "source": "21513458-a59f-4d74-b7b9-df42e992db58-attachment.json", "type": "application/json"}, {"name": "response.body", "source": "e7dc812a-ce20-4385-944a-34584639e783-attachment.json", "type": "application/json"}], "start": 1775604320153, "stop": 1775604320153}], "attachments": [{"name": "cURL", "source": "3f6d762b-5a3e-42c6-8cd8-db46d9a65f47-attachment.txt", "type": "text/plain"}], "start": 1775604320152, "stop": 1775604320153}], "start": 1775604239893, "stop": 1775604320156}], "start": 1775604239860, "stop": 1775604320157}], "attachments": [{"name": "log", "source": "4ee8b862-7767-42bf-ba26-20647d1ad2cb-attachment.txt", "type": "text/plain"}], "start": 1775604239851, "stop": 1775604320157, "uuid": "e691e476-0a56-4039-9ccf-386fc33b6ea0", "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-o0wfdzrk"}, {"name": "thread", "value": "45-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"]}