OCL API 2

Build: #2245 failed Changes by Sunny Aggarwal.

Stages & jobs

  1. Build

  2. Test

  3. Deploy for testing

    Requires a user to start manually
  4. Release

    Requires a user to start manually

Build result summary

Details

Completed
Queue duration
< 1 second
Duration
13 minutes
Labels
None
Revisions
OCL API 2
4b95fb0f0fc2968138a20f18f14e15f2c9f50c9e
OCL CI
6544e7ed40ead274ba8b0995efe09bb9edfd8319
No failed test found. A possible compilation error occurred.

Responsible

  • Sunny Aggarwal. Sunny Aggarwal. Automatically assigned

Code commits

OCL API 2
Author Commit Message Commit date
Sunny Aggarwal. Sunny Aggarwal. 4b95fb0f0fc2968138a20f18f14e15f2c9f50c9e OpenConceptLab/ocl_issues#2174 | concepts facets based on source summary properties

Error summary for Run tests

The job generated some errors, drill down into the full build log for more details.

Traceback (most recent call last):
  File "/code/core/value_sets/serializers.py", line 260, in to_representation
    IdentifierSerializer.include_ocl_identifier(instance.uri, RESOURCE_TYPE, rep)
  File "/code/core/common/serializers.py", line 141, in include_ocl_identifier
    return IdentifierSerializer.parse_identifier(ident)
  File "/code/core/common/serializers.py", line 88, in parse_identifier
    raise ValidationError(
rest_framework.exceptions.ValidationError: [ErrorDetail(string='Identifier must be in a format: /{owner_type}/{owner_id}/{resourceType}/{resource_id}/, given: /invalid/uri', code='invalid')]
ok
    test_update_with_compose ... ok
    test_validate_code ... ok
    test_validate_code_globally ... ok
    test_validate_code_globally_negative ... ok
    test_validate_code_globally_via_post ... ok
    test_validate_code_negative ... ok
core.tasks.tests.UtilsTest
    test_wait_until_task_complete_finished ... ok
    test_wait_until_task_complete_pending ... ok

======================================================================
ERROR: test_get_200_verbose (core.integration_tests.tests_sources.SourceSummaryViewTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/rest_framework/fields.py", line 446, in get_attribute
    return get_attribute(instance, self.source_attrs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/fields.py", line 96, in get_attribute
    instance = getattr(instance, attr)
  File "/code/core/common/models.py", line 1106, in concepts_distribution
    facets = self.get_concept_facets()
  File "/code/core/common/models.py", line 1175, in get_concept_facets
    return self._get_resource_facets(ConceptFacetedSearch, filters)
  File "/code/core/common/models.py", line 1182, in _get_resource_facets
    search = facet_class('', filters=self._get_resource_facet_filters(filters))
  File "/code/core/concepts/search.py", line 43, in __init__
    **self.build_property_facets_from_source(source)
  File "/code/core/concepts/search.py", line 52, in build_property_facets_from_source
    for prop in (source.concept_summary_properties or [])
AttributeError: 'str' object has no attribute 'concept_summary_properties'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/code/core/integration_tests/tests_sources.py", line 1389, in test_get_200_verbose
    response = self.client.get(self.source.url + 'summary/?verbose=true')
  File "/usr/local/lib/python3.10/site-packages/rest_framework/test.py", line 289, in get
    response = super().get(path, data=data, **extra)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/test.py", line 206, in get
    return self.generic('GET', path, **r)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/test.py", line 234, in generic
    return super().generic(
  File "/usr/local/lib/python3.10/site-packages/django/test/client.py", line 609, in generic
    return self.request(**r)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/test.py", line 286, in request
    return super().request(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/test.py", line 238, in request
    request = super().request(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/test/client.py", line 891, in request
    self.check_exception(response)
  File "/usr/local/lib/python3.10/site-packages/django/test/client.py", line 738, in check_exception
    raise exc_value
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/generics.py", line 208, in get
    return self.retrieve(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/mixins.py", line 56, in retrieve
    return Response(serializer.data)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/serializers.py", line 555, in data
    ret = super().data
  File "/usr/local/lib/python3.10/site-packages/rest_framework/serializers.py", line 253, in data
    self._data = self.to_representation(self.instance)
  File "/code/core/sources/serializers.py", line 275, in to_representation
    data = super().to_representation(instance)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/serializers.py", line 509, in to_representation
    attribute = field.get_attribute(instance)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/fields.py", line 479, in get_attribute
    raise type(exc)(msg)
AttributeError: Got AttributeError when attempting to get a value for field `concepts` on serializer `SourceSummaryVerboseSerializer`.
The serializer field might be named incorrectly and not match any attribute or key on the `Source` instance.
Original exception text was: 'str' object has no attribute 'concept_summary_properties'.

----------------------------------------------------------------------
Ran 914 tests in 532.589s

FAILED (errors=1)
Preserving test database for alias 'default' ('test_postgres')...
1
Stopping ocl-oclapi2-rt_db_1 ...
Stopping ocl-oclapi2-rt_es_1 ...
Stopping ocl-oclapi2-rt_db_1 ... done
Stopping ocl-oclapi2-rt_es_1 ... done
Removing ocl-oclapi2-rt_db_1 ...
Removing ocl-oclapi2-rt_es_1 ...
Removing ocl-oclapi2-rt_db_1 ... done
Removing ocl-oclapi2-rt_es_1 ... done
Removing network ocl-oclapi2-rt_default
Removing volume ocl-oclapi2-rt_postgres-data
Removing volume ocl-oclapi2-rt_es-data
Removing volume ocl-oclapi2-rt_redis-data
Removing volume ocl-oclapi2-rt_upload-data