Skip to content

Hotfix v0.2048.2

Hotfix v0.2048.2 #709

GitHub Actions / Test Results failed Feb 7, 2024 in 0s

13 errors, 1 fail, 348 skipped, 2 894 pass in 2h 47m 31s

     47 files       47 suites   2h 47m 31s ⏱️
3 256 tests 2 894 ✔️ 348 💤 1  13 🔥
3 262 runs  2 900 ✔️ 348 💤 1  13 🔥

Results for commit e13ff23.

Annotations

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_basic_result (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 8s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '21c7e9d7-199e-448b-8635-70d89ebe7545', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '16818f4a-1465-4813-a306-8c8ddc01b418', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'fcuikik46buu3', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '21c7e9d7-199e-448b-8635-70d89ebe7545', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': 'f558bf6c5973dbb3', 'virtual': False, 'valid': False, 'connection_id': 'fcuikik46buu3', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '16818f4a-1465-4813-a306-8c8ddc01b418', 'managed_by': 'user', 'source_id': '21c7e9d7-199e-448b-8635-70d89ebe7545', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '21c7e9d7-199e-448b-8635-70d89ebe7545', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_basic_result>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='cf36dfd3-bf84-4f14-b9b1-2ed7c1d2a584', created_=False, name=None, revision_id=None, sources=Container({'21...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='21c7e9d7-199e-448b-8635-70d89ebe7545', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '21c7e9d7-199e-448b-8635-70d89ebe7545', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '16818f4a-1465-4813-a306-8c8ddc01b418', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'fcuikik46buu3', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '21c7e9d7-199e-448b-8635-70d89ebe7545', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': 'f558bf6c5973dbb3', 'virtual': False, 'valid': False, 'connection_id': 'fcuikik46buu3', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '16818f4a-1465-4813-a306-8c8ddc01b418', 'managed_by': 'user', 'source_id': '21c7e9d7-199e-448b-8635-70d89ebe7545', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '21c7e9d7-199e-448b-8635-70d89ebe7545', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_duplicated_expressions (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 9s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '0f597c13-fe8e-4972-965b-b1d96de00a03', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'hewknkvi66wi5', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': 'b818b3fcbb41fa19', 'virtual': False, 'valid': False, 'connection_id': 'hewknkvi66wi5', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '0f597c13-fe8e-4972-965b-b1d96de00a03', 'managed_by': 'user', 'source_id': '2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_duplicated_expressions>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='e5de73c0-8a5b-4059-8e6d-ede7351590ca', created_=False, name=None, revision_id=None, sources=Container({'2b...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '0f597c13-fe8e-4972-965b-b1d96de00a03', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'hewknkvi66wi5', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': 'b818b3fcbb41fa19', 'virtual': False, 'valid': False, 'connection_id': 'hewknkvi66wi5', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '0f597c13-fe8e-4972-965b-b1d96de00a03', 'managed_by': 'user', 'source_id': '2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '2bfe1206-b894-4fc6-9c70-9ce2f31c7fbd', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_dates (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 9s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '20578d30-e256-4a0e-884a-ed38f8b4ba1a', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'bb6e5f38-2ad9-41f4-bca7-22846396fd5c', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'ro6uyxb93d76f', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '20578d30-e256-4a0e-884a-ed38f8b4ba1a', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '73032051164326db', 'virtual': False, 'valid': False, 'connection_id': 'ro6uyxb93d76f', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'bb6e5f38-2ad9-41f4-bca7-22846396fd5c', 'managed_by': 'user', 'source_id': '20578d30-e256-4a0e-884a-ed38f8b4ba1a', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '20578d30-e256-4a0e-884a-ed38f8b4ba1a', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_dates>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='2f17547e-d6a3-4d45-bcd1-014d58fe19b1', created_=False, name=None, revision_id=None, sources=Container({'20...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='20578d30-e256-4a0e-884a-ed38f8b4ba1a', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '20578d30-e256-4a0e-884a-ed38f8b4ba1a', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'bb6e5f38-2ad9-41f4-bca7-22846396fd5c', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'ro6uyxb93d76f', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '20578d30-e256-4a0e-884a-ed38f8b4ba1a', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '73032051164326db', 'virtual': False, 'valid': False, 'connection_id': 'ro6uyxb93d76f', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'bb6e5f38-2ad9-41f4-bca7-22846396fd5c', 'managed_by': 'user', 'source_id': '20578d30-e256-4a0e-884a-ed38f8b4ba1a', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '20578d30-e256-4a0e-884a-ed38f8b4ba1a', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_get_result_with_formula_in_where (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 9s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '5a199698-c453-455d-91fb-debb40c73999', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '41f7fada-f685-4110-8c24-1c4ac9db67b4', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'qn5tyxtamyk0e', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '5a199698-c453-455d-91fb-debb40c73999', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': 'f906b54c3c6cf22d', 'virtual': False, 'valid': False, 'connection_id': 'qn5tyxtamyk0e', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '41f7fada-f685-4110-8c24-1c4ac9db67b4', 'managed_by': 'user', 'source_id': '5a199698-c453-455d-91fb-debb40c73999', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '5a199698-c453-455d-91fb-debb40c73999', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_get_result_with_formula_in_where>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='c78e1e29-8aba-44fd-acf1-d4c4459601ed', created_=False, name=None, revision_id=None, sources=Container({'5a...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='5a199698-c453-455d-91fb-debb40c73999', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '5a199698-c453-455d-91fb-debb40c73999', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '41f7fada-f685-4110-8c24-1c4ac9db67b4', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'qn5tyxtamyk0e', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '5a199698-c453-455d-91fb-debb40c73999', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': 'f906b54c3c6cf22d', 'virtual': False, 'valid': False, 'connection_id': 'qn5tyxtamyk0e', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '41f7fada-f685-4110-8c24-1c4ac9db67b4', 'managed_by': 'user', 'source_id': '5a199698-c453-455d-91fb-debb40c73999', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '5a199698-c453-455d-91fb-debb40c73999', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_get_result_with_string_filter_operations_for_numbers (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataResult) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 9s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'b2e5bc81-a1a5-4323-9b06-658a241b0630', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'b0262d1a-ce39-481f-ae19-5d2e107fd5a7', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'ro6u00a5evwqf', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'b2e5bc81-a1a5-4323-9b06-658a241b0630', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '462edc97e0575146', 'virtual': False, 'valid': False, 'connection_id': 'ro6u00a5evwqf', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'b0262d1a-ce39-481f-ae19-5d2e107fd5a7', 'managed_by': 'user', 'source_id': 'b2e5bc81-a1a5-4323-9b06-658a241b0630', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'b2e5bc81-a1a5-4323-9b06-658a241b0630', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_get_result_with_string_filter_operations_for_numbers>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='2d9c6a42-d082-4bcb-a63c-dcabaa69797f', created_=False, name=None, revision_id=None, sources=Container({'b2...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='b2e5bc81-a1a5-4323-9b06-658a241b0630', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'b2e5bc81-a1a5-4323-9b06-658a241b0630', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'b0262d1a-ce39-481f-ae19-5d2e107fd5a7', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'ro6u00a5evwqf', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'b2e5bc81-a1a5-4323-9b06-658a241b0630', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '462edc97e0575146', 'virtual': False, 'valid': False, 'connection_id': 'ro6u00a5evwqf', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'b0262d1a-ce39-481f-ae19-5d2e107fd5a7', 'managed_by': 'user', 'source_id': 'b2e5bc81-a1a5-4323-9b06-658a241b0630', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'b2e5bc81-a1a5-4323-9b06-658a241b0630', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataGroupBy

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ordered_result (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataGroupBy) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 11s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '24d615d3-7fa5-4515-8ab9-c84b2c4850c5', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '4b6dddb0-e479-41da-9454-eb719ff31ede', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'dasgs5uyvhki1', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '24d615d3-7fa5-4515-8ab9-c84b2c4850c5', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '418d4c0327b170ef', 'virtual': False, 'valid': False, 'connection_id': 'dasgs5uyvhki1', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '4b6dddb0-e479-41da-9454-eb719ff31ede', 'managed_by': 'user', 'source_id': '24d615d3-7fa5-4515-8ab9-c84b2c4850c5', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '24d615d3-7fa5-4515-8ab9-c84b2c4850c5', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_ordered_result>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='c71e8bce-e6a1-4b29-bbf1-7c8114e80f12', created_=False, name=None, revision_id=None, sources=Container({'24...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='24d615d3-7fa5-4515-8ab9-c84b2c4850c5', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '24d615d3-7fa5-4515-8ab9-c84b2c4850c5', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '4b6dddb0-e479-41da-9454-eb719ff31ede', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'dasgs5uyvhki1', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '24d615d3-7fa5-4515-8ab9-c84b2c4850c5', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '418d4c0327b170ef', 'virtual': False, 'valid': False, 'connection_id': 'dasgs5uyvhki1', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '4b6dddb0-e479-41da-9454-eb719ff31ede', 'managed_by': 'user', 'source_id': '24d615d3-7fa5-4515-8ab9-c84b2c4850c5', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '24d615d3-7fa5-4515-8ab9-c84b2c4850c5', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataGroupBy

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_complex_result (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataGroupBy) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 10s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '5cc57ece-e9ac-4530-bf7a-f3920ed9d169', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '9f1726e6-1913-4ec5-b4f6-0443b0c79979', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'jgymzkfg2ovm7', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '5cc57ece-e9ac-4530-bf7a-f3920ed9d169', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': 'dc6d3ed1a7cf698b', 'virtual': False, 'valid': False, 'connection_id': 'jgymzkfg2ovm7', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '9f1726e6-1913-4ec5-b4f6-0443b0c79979', 'managed_by': 'user', 'source_id': '5cc57ece-e9ac-4530-bf7a-f3920ed9d169', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '5cc57ece-e9ac-4530-bf7a-f3920ed9d169', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_complex_result>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='70ea90f1-fb41-4325-84e4-7c84d72a8281', created_=False, name=None, revision_id=None, sources=Container({'5c...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='5cc57ece-e9ac-4530-bf7a-f3920ed9d169', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '5cc57ece-e9ac-4530-bf7a-f3920ed9d169', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '9f1726e6-1913-4ec5-b4f6-0443b0c79979', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'jgymzkfg2ovm7', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '5cc57ece-e9ac-4530-bf7a-f3920ed9d169', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': 'dc6d3ed1a7cf698b', 'virtual': False, 'valid': False, 'connection_id': 'jgymzkfg2ovm7', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '9f1726e6-1913-4ec5-b4f6-0443b0c79979', 'managed_by': 'user', 'source_id': '5cc57ece-e9ac-4530-bf7a-f3920ed9d169', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '5cc57ece-e9ac-4530-bf7a-f3920ed9d169', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataRange

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_basic_range (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataRange) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 10s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'cee1d680-1c2b-46dd-96f9-2c8baa680f92', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'b52fc110-e830-4d7d-9a87-a21cb6d078aa', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': '96ocqbnvvtnmx', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'cee1d680-1c2b-46dd-96f9-2c8baa680f92', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '52d8e87b0ea35cfe', 'virtual': False, 'valid': False, 'connection_id': '96ocqbnvvtnmx', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'b52fc110-e830-4d7d-9a87-a21cb6d078aa', 'managed_by': 'user', 'source_id': 'cee1d680-1c2b-46dd-96f9-2c8baa680f92', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'cee1d680-1c2b-46dd-96f9-2c8baa680f92', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_basic_range>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='f0ed765f-59fd-4598-bf06-941e71ea4be2', created_=False, name=None, revision_id=None, sources=Container({'ce...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='cee1d680-1c2b-46dd-96f9-2c8baa680f92', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'cee1d680-1c2b-46dd-96f9-2c8baa680f92', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'b52fc110-e830-4d7d-9a87-a21cb6d078aa', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': '96ocqbnvvtnmx', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'cee1d680-1c2b-46dd-96f9-2c8baa680f92', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '52d8e87b0ea35cfe', 'virtual': False, 'valid': False, 'connection_id': '96ocqbnvvtnmx', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'b52fc110-e830-4d7d-9a87-a21cb6d078aa', 'managed_by': 'user', 'source_id': 'cee1d680-1c2b-46dd-96f9-2c8baa680f92', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'cee1d680-1c2b-46dd-96f9-2c8baa680f92', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataDistinct

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_basic_distinct (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataDistinct) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 11s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'a4e0582e-aa4d-473c-917b-7c14f209307d', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '14f4fef6-12c5-45d4-ade2-c240fd2436d7', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'ro6u916kz2ref', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'a4e0582e-aa4d-473c-917b-7c14f209307d', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '159421213fa1b48e', 'virtual': False, 'valid': False, 'connection_id': 'ro6u916kz2ref', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '14f4fef6-12c5-45d4-ade2-c240fd2436d7', 'managed_by': 'user', 'source_id': 'a4e0582e-aa4d-473c-917b-7c14f209307d', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'a4e0582e-aa4d-473c-917b-7c14f209307d', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_basic_distinct>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='5b09c1ab-c64a-4030-a5a4-8781ab209d15', created_=False, name=None, revision_id=None, sources=Container({'a4...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='a4e0582e-aa4d-473c-917b-7c14f209307d', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'a4e0582e-aa4d-473c-917b-7c14f209307d', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '14f4fef6-12c5-45d4-ade2-c240fd2436d7', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'ro6u916kz2ref', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'a4e0582e-aa4d-473c-917b-7c14f209307d', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '159421213fa1b48e', 'virtual': False, 'valid': False, 'connection_id': 'ro6u916kz2ref', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '14f4fef6-12c5-45d4-ade2-c240fd2436d7', 'managed_by': 'user', 'source_id': 'a4e0582e-aa4d-473c-917b-7c14f209307d', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'a4e0582e-aa4d-473c-917b-7c14f209307d', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataDistinct

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_distinct_with_nonexistent_filter (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataDistinct) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 12s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'e0c7f9a7-ce94-4661-8d34-ed964f371f8a', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'a797cf93-1307-424f-a8a9-503d93a2ada5', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'tq8wccxxm4lmh', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'e0c7f9a7-ce94-4661-8d34-ed964f371f8a', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '77669ba39e6e351f', 'virtual': False, 'valid': False, 'connection_id': 'tq8wccxxm4lmh', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'a797cf93-1307-424f-a8a9-503d93a2ada5', 'managed_by': 'user', 'source_id': 'e0c7f9a7-ce94-4661-8d34-ed964f371f8a', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'e0c7f9a7-ce94-4661-8d34-ed964f371f8a', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_distinct_with_nonexistent_filter>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='0efe9192-19a6-42dd-8560-eb94193903bb', created_=False, name=None, revision_id=None, sources=Container({'e0...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='e0c7f9a7-ce94-4661-8d34-ed964f371f8a', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'e0c7f9a7-ce94-4661-8d34-ed964f371f8a', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'a797cf93-1307-424f-a8a9-503d93a2ada5', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'tq8wccxxm4lmh', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'e0c7f9a7-ce94-4661-8d34-ed964f371f8a', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '77669ba39e6e351f', 'virtual': False, 'valid': False, 'connection_id': 'tq8wccxxm4lmh', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'a797cf93-1307-424f-a8a9-503d93a2ada5', 'managed_by': 'user', 'source_id': 'e0c7f9a7-ce94-4661-8d34-ed964f371f8a', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'e0c7f9a7-ce94-4661-8d34-ed964f371f8a', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataPreview

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_basic_preview (dl_connector_bitrix_gds_tests.ext.api.test_data.TestBitrixDataPreview) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 9s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '0f60151c-9b31-44f1-9a39-632f518155af', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'dd0cadc2-bd9d-432f-910f-4a46d21ca58b', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'b8qew159m5siz', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '0f60151c-9b31-44f1-9a39-632f518155af', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '98cfd54082520975', 'virtual': False, 'valid': False, 'connection_id': 'b8qew159m5siz', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'dd0cadc2-bd9d-432f-910f-4a46d21ca58b', 'managed_by': 'user', 'source_id': '0f60151c-9b31-44f1-9a39-632f518155af', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '0f60151c-9b31-44f1-9a39-632f518155af', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_basic_preview>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
                    item.funcargs[param] = request.getfixturevalue(param)
    
>       _fillfixtures()

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='dfaa4a44-14a8-4ae4-be47-93e319c7b184', created_=False, name=None, revision_id=None, sources=Container({'0f...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='0f60151c-9b31-44f1-9a39-632f518155af', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '0f60151c-9b31-44f1-9a39-632f518155af', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'dd0cadc2-bd9d-432f-910f-4a46d21ca58b', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'b8qew159m5siz', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '0f60151c-9b31-44f1-9a39-632f518155af', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '98cfd54082520975', 'virtual': False, 'valid': False, 'connection_id': 'b8qew159m5siz', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'dd0cadc2-bd9d-432f-910f-4a46d21ca58b', 'managed_by': 'user', 'source_id': '0f60151c-9b31-44f1-9a39-632f518155af', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '0f60151c-9b31-44f1-9a39-632f518155af', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_dataset.TestBitrixDataset

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_create_basic_dataset[pyloop] (dl_connector_bitrix_gds_tests.ext.api.test_dataset.TestBitrixDataset) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 10s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'ef9c4b79-8d21-4019-9dda-e2f4e587e34f', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '7c1bbb66-4cbe-4731-ae4c-b74142ea0d3e', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': '30i6qcdak46qr', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'ef9c4b79-8d21-4019-9dda-e2f4e587e34f', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '4e25f714bb337f11', 'virtual': False, 'valid': False, 'connection_id': '30i6qcdak46qr', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '7c1bbb66-4cbe-4731-ae4c-b74142ea0d3e', 'managed_by': 'user', 'source_id': 'ef9c4b79-8d21-4019-9dda-e2f4e587e34f', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'ef9c4b79-8d21-4019-9dda-e2f4e587e34f', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_create_basic_dataset[pyloop]>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
>                   item.funcargs[param] = request.getfixturevalue(param)

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='c2f3ebe1-c3cf-494d-99cb-a1c4420ae08a', created_=False, name=None, revision_id=None, sources=Container({'ef...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='ef9c4b79-8d21-4019-9dda-e2f4e587e34f', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': 'ef9c4b79-8d21-4019-9dda-e2f4e587e34f', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': '7c1bbb66-4cbe-4731-ae4c-b74142ea0d3e', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': '30i6qcdak46qr', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': 'ef9c4b79-8d21-4019-9dda-e2f4e587e34f', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '4e25f714bb337f11', 'virtual': False, 'valid': False, 'connection_id': '30i6qcdak46qr', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': '7c1bbb66-4cbe-4731-ae4c-b74142ea0d3e', 'managed_by': 'user', 'source_id': 'ef9c4b79-8d21-4019-9dda-e2f4e587e34f', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': 'ef9c4b79-8d21-4019-9dda-e2f4e587e34f', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_dataset.TestBitrixDataset

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_remove_connection[pyloop] (dl_connector_bitrix_gds_tests.ext.api.test_dataset.TestBitrixDataset) with error

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 10s]
Raw output
failed on setup with "AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '99a6fc33-40ea-4aed-974c-3523b9495362', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'fd194d74-9154-4288-9506-0506b68a202c', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'li0p900uempa9', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '99a6fc33-40ea-4aed-974c-3523b9495362', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '2bacc31d691c0658', 'virtual': False, 'valid': False, 'connection_id': 'li0p900uempa9', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'fd194d74-9154-4288-9506-0506b68a202c', 'managed_by': 'user', 'source_id': '99a6fc33-40ea-4aed-974c-3523b9495362', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '99a6fc33-40ea-4aed-974c-3523b9495362', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}"
request = <FixtureRequest for <Function test_remove_connection[pyloop]>>

    def fill(request):
        item = request._pyfuncitem
        fixturenames = getattr(item, "fixturenames", None)
        if fixturenames is None:
            fixturenames = request.fixturenames
    
        if hasattr(item, 'callspec'):
            for param, val in sorted_by_dependency(item.callspec.params, fixturenames):
                if val is not None and is_lazy_fixture(val):
                    item.callspec.params[param] = request.getfixturevalue(val.name)
                elif param not in item.funcargs:
>                   item.funcargs[param] = request.getfixturevalue(param)

/venv/lib/python3.10/site-packages/pytest_lazyfixture.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:41: in saved_dataset
    ds = self.make_basic_dataset(
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), headers={}, _created_dataset_id_list=[], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='e1a3c5ad-50cc-4358-97f6-6bda047f069b', created_=False, name=None, revision_id=None, sources=Container({'99...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='99a6fc33-40ea-4aed-974c-3523b9495362', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '99a6fc33-40ea-4aed-974c-3523b9495362', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'fd194d74-9154-4288-9506-0506b68a202c', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'li0p900uempa9', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '99a6fc33-40ea-4aed-974c-3523b9495362', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '2bacc31d691c0658', 'virtual': False, 'valid': False, 'connection_id': 'li0p900uempa9', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'fd194d74-9154-4288-9506-0506b68a202c', 'managed_by': 'user', 'source_id': '99a6fc33-40ea-4aed-974c-3523b9495362', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '99a6fc33-40ea-4aed-974c-3523b9495362', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError

Check failure on line 0 in dl_connector_bitrix_gds_tests.ext.api.test_sources.TestBitrixSources

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_sources (dl_connector_bitrix_gds_tests.ext.api.test_sources.TestBitrixSources) failed

./report/pytest_reports_dl_connector_bitrix_gds_659227731/_src_lib_dl_connector_bitrix_gds_dl_connector_bitrix_gds_tests-ext-84cdd76e8fef4d079961aa311e1bc90d.xml [took 29s]
Raw output
AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'b0ac48f9-8bb1-4526-8c42-33c50afe1b9b', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'vsazmihwnwfuj', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '4196a678a8831b42', 'virtual': False, 'valid': False, 'connection_id': 'vsazmihwnwfuj', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'b0ac48f9-8bb1-4526-8c42-33c50afe1b9b', 'managed_by': 'user', 'source_id': '450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}
self = <dl_connector_bitrix_gds_tests.ext.api.test_sources.TestBitrixSources object at 0x7f2083c80d60>
control_api_sync_client = FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>)
control_api = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), he...dataset_id_list=['hewl9nj182na5', 'vsazoocseqy2j', 'dash6ubqj1li1'], serial_adapter=DatasetApiV1SerializationAdapter())
saved_connection_id = 'vsazmihwnwfuj'
data_api = SyncHttpDataApiV2(client=WrappedAioSyncApiClient(_int_wrapped_client=TestClientConverterAiohttpToFlask(_loop=<_UnixSel...t at 0x7f208287f0a0>, _extra_headers=None, _cookies=None)), headers={}, serial_adapter=DataApiV2SerializationAdapter())

    def test_sources(
        self,
        control_api_sync_client: SyncHttpClientBase,
        control_api: SyncHttpDatasetApiV1,
        saved_connection_id: str,
        data_api: SyncHttpDataApiV2,
    ):
        conn_id = saved_connection_id
    
        sources_resp = control_api_sync_client.get(f"/api/v1/connections/{conn_id}/info/sources")
        assert sources_resp.status_code == 200, sources_resp.json
    
        sources_checked = 0
        for source in sources_resp.json["sources"]:
            if not self.do_check_source(source):
                continue
    
            dataset_params = dict(
                source_type=SOURCE_TYPE_BITRIX_GDS.name,
                title=source["title"],
                parameters=dict(
                    db_name=DB_NAME,
                    table_name=source["title"],
                ),
            )
>           ds = self.make_basic_dataset(
                control_api=control_api,
                connection_id=saved_connection_id,
                dataset_params=dataset_params,
            )

ext/api/test_sources.py:48: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/venv/lib/python3.10/site-packages/dl_api_lib_testing/dataset_base.py:30: in make_basic_dataset
    ds = control_api.apply_updates(dataset=ds, fail_ok=False).dataset
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = SyncHttpDatasetApiV1(client=FlaskSyncApiClient(_int_wclient=<TestClient <Flask 'dl_api_lib.app.control_api.app'>>), he...dataset_id_list=['hewl9nj182na5', 'vsazoocseqy2j', 'dash6ubqj1li1'], serial_adapter=DatasetApiV1SerializationAdapter())
dataset = Dataset(id='97997a6c-6fe3-4b43-9b95-bb3a00c46eef', created_=False, name=None, revision_id=None, sources=Container({'45...sultSchemaAux(inter_dependencies={}), rls={}, component_errors=ComponentErrorRegistry(items=[]), obligatory_filters=[])
updates = [UpdateAction(action=<Action.add: 'add'>, item=DataSource(id='450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', created_=False, c...', title='avatar_1', is_root=False, managed_by=<ManagedBy.user: 'user'>, valid=True), custom_data=None, order_index=0)]
fail_ok = False

    def apply_updates(  # type: ignore  # TODO: fix
        self,
        dataset: Dataset,
        updates: list[Union[UpdateAction, dict]] = None,  # type: ignore  # 2024-01-24 # TODO: Incompatible default for argument "updates" (default has type "None", argument has type "list[UpdateAction | dict[Any, Any]]")  [assignment]
        fail_ok: bool = False,
    ) -> HttpDatasetApiResponse:
        if dataset.created_:
            url = f"/api/v1/datasets/{dataset.id}/versions/draft/validators/schema"
        else:
            url = "/api/v1/datasets/validators/dataset"
    
        data = self.dump_dataset_to_request_body(dataset)
        updates = list(updates or ()) + self.serial_adapter.generate_implicit_updates(dataset)  # type: ignore  # 2024-01-24 # TODO: Unsupported operand types for + ("list[UpdateAction | dict[Any, Any]]" and "list[UpdateAction]")  [operator]
        data["updates"] = self.serial_adapter.dump_updates(updates)
        response = self._request(url, method="post", data=data)
    
        if fail_ok:
            # `fail_ok` should not mean `allow 5xx`
            assert response.status_code < 500, response.json
        else:
            try:
>               assert response.status_code == HTTPStatus.OK, response.json
E               AssertionError: {'dataset_errors': [], 'message': 'Validation finished with errors.', 'code': 'ERR.DS_API.VALIDATION.ERROR', 'options': {'preview': {'enabled': True}, 'supports_offset': True, 'schema_update_enabled': False, 'sources': {'items': [{'id': '450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', 'schema_update_enabled': False}], 'compatible_types': [{'source_type': 'BITRIX_GDS'}]}, 'source_avatars': {'max': 1, 'items': [{'id': 'b0ac48f9-8bb1-4526-8c42-33c50afe1b9b', 'schema_update_enabled': False}]}, 'supported_functions': ['abs', 'acos', 'all_concat', 'any', 'arr_remove', 'arr_str', 'array', 'ascii', 'asin', 'atan', 'atan2', 'avg', 'avg_if', 'bold', 'bool', 'case', 'cast_arr_float', 'cast_arr_int', 'cast_arr_str', 'ceiling', 'char', 'concat', 'contains', 'contains_all', 'contains_any', 'cos', 'cot', 'count', 'count_if', 'count_item', 'countd', 'countd_if', 'date', 'dateadd', 'datepart', 'datetime', 'datetrunc', 'day', 'dayofweek', 'db_cast', 'degrees', 'div', 'div_safe', 'endswith', 'exp', 'fdiv_safe', 'find', 'first', 'float', 'floor', 'geopoint', 'geopolygon', 'get_item', 'greatest', 'hour', 'icontains', 'iendswith', 'if', 'ifnan', 'ifnull', 'iif', 'int', 'isnan', 'isnull', 'istartswith', 'italic', 'lag', 'last', 'least', 'left', 'len', 'ln', 'log', 'log10', 'lower', 'ltrim', 'markup', 'mavg', 'max', 'mcount', 'median', 'min', 'minute', 'mmax', 'mmin', 'month', 'msum', 'notcontains', 'now', 'pi', 'power', 'quantile', 'quarter', 'radians', 'rank', 'rank_dense', 'rank_percentile', 'rank_unique', 'ravg', 'rcount', 'regexp_extract', 'regexp_extract_nth', 'regexp_match', 'regexp_replace', 'replace', 'right', 'rmax', 'rmin', 'round', 'rsum', 'rtrim', 'second', 'sign', 'sin', 'slice', 'space', 'split', 'sqrt', 'square', 'startswith', 'stdev', 'stdevp', 'str', 'substr', 'sum', 'sum_if', 'tan', 'today', 'tree', 'trim', 'unnest', 'upper', 'url', 'var', 'varp', 'week', 'year', 'zn'], 'fields': {'items': []}, 'data_types': {'items': [{'aggregations': ['count', 'countunique'], 'casts': ['string', 'date', 'genericdatetime', 'boolean', 'integer', 'float', 'geopoint', 'geopolygon'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'string'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['integer', 'float', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'integer'}, {'aggregations': ['count', 'sum', 'avg', 'min', 'max', 'countunique'], 'casts': ['float', 'integer', 'string', 'boolean', 'date', 'genericdatetime'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'float'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['date', 'genericdatetime', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'date'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['genericdatetime', 'datetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetime'}, {'aggregations': ['count'], 'casts': ['boolean', 'integer', 'float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'boolean'}, {'aggregations': ['count'], 'casts': ['geopoint', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopoint'}, {'aggregations': ['count'], 'casts': ['geopolygon', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'IN', 'NIN'], 'type': 'geopolygon'}, {'aggregations': ['count', 'countunique'], 'casts': ['uuid', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'STARTSWITH', 'ISTARTSWITH', 'ENDSWITH', 'IENDSWITH', 'CONTAINS', 'ICONTAINS', 'NOTCONTAINS', 'NOTICONTAINS', 'NOTICONTAINS', 'IN', 'NIN', 'BETWEEN'], 'type': 'uuid'}, {'aggregations': ['count'], 'casts': ['markup'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'markup'}, {'aggregations': ['count', 'min', 'max', 'countunique', 'avg'], 'casts': ['datetimetz', 'genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'datetimetz'}, {'aggregations': [], 'casts': ['unsupported'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL'], 'type': 'unsupported'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_str', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_str'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_int', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_int'}, {'aggregations': ['count', 'countunique'], 'casts': ['array_float', 'string'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'array_float'}, {'aggregations': ['count', 'countunique'], 'casts': ['tree_str'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'STARTSWITH', 'CONTAINS', 'NOTCONTAINS', 'LENEQ', 'LENEQ', 'LENNE', 'LENNE', 'LENGT', 'LENGT', 'LENGTE', 'LENGTE', 'LENLT', 'LENLT', 'LENLTE', 'LENLTE'], 'type': 'tree_str'}, {'aggregations': ['count', 'min', 'max', 'countunique'], 'casts': ['genericdatetime', 'date', 'string', 'integer', 'float', 'boolean'], 'filter_operations': ['ISNULL', 'ISNOTNULL', 'ISNOTNULL', 'EQ', 'NE', 'GT', 'GTE', 'LT', 'LTE', 'IN', 'NIN', 'BETWEEN'], 'type': 'genericdatetime'}]}, 'connections': {'max': 1, 'items': [{'id': 'vsazmihwnwfuj', 'replacement_types': [{'conn_type': 'postgres'}]}], 'compatible_types': []}, 'join': {'types': [], 'operators': ['eq']}}, 'dataset': {'revision_id': None, 'sources': [{'id': '450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', 'source_type': 'BITRIX_GDS', 'managed_by': 'user', 'parameters': {'db_version': None, 'table_name': 'crm_deal', 'db_name': 'default'}, 'parameter_hash': '4196a678a8831b42', 'virtual': False, 'valid': False, 'connection_id': 'vsazmihwnwfuj', 'raw_schema': [], 'index_info_set': None, 'title': 'crm_deal'}], 'source_avatars': [{'id': 'b0ac48f9-8bb1-4526-8c42-33c50afe1b9b', 'managed_by': 'user', 'source_id': '450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', 'virtual': False, 'is_root': True, 'valid': True, 'title': 'avatar_1'}], 'component_errors': {'items': [{'errors': [{'level': 'error', 'message': 'Unexpected API response body: Unexpected response format', 'code': 'ERR.DS_API.DB', 'details': {'db_message': ''}}], 'id': '450d24f4-ba50-49cd-b3ea-f6d11b6caa8a', 'type': 'data_source'}]}, 'rls': {}, 'preview_enabled': True, 'obligatory_filters': [], 'result_schema_aux': {'inter_dependencies': {'deps': []}}, 'avatar_relations': [], 'result_schema': []}}

/venv/lib/python3.10/site-packages/dl_api_client/dsmaker/api/dataset_api.py:233: AssertionError