OCL API 2

Build: #2149 failed

Job: Run tests failed

Stages & jobs

  1. Build

  2. Test

  3. Deploy for testing

    Requires a user to start manually
  4. Release

    Requires a user to start manually

Job result summary

Completed
Duration
21 minutes
Agent
xindi.openmrs.org
Revision
e56afa2155c3492b516af2ef4b931527128e540d e56afa2155c3492b516af2ef4b931527128e540d
Fixed in
#2150 (Manual run from the stage: Release by Sunny Aggarwal.)
No failed test found. A possible compilation error occurred.

Error summary

The build generated some errors. See the full build log for more details.

  File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: each UNION query must have the same number of columns
LINE 1: ..._object_url" = '/orgs/waynecorp/')) UNION (SELECT "organizat...
                                                             ^

======================================================================
ERROR: test_get_orgs_events (core.integration_tests.tests_events.UserEventsViewTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.SyntaxError: each UNION query must have the same number of columns
LINE 1: ..._object_url" = '/orgs/waynecorp/')) UNION (SELECT "organizat...
                                                             ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/code/core/integration_tests/tests_events.py", line 278, in test_get_orgs_events
    response = self.client.get(
  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 "/code/core/events/views.py", line 40, in get
    return self.list(request, *args, **kwargs)
  File "/code/core/common/mixins.py", line 194, in list
    paginator = CustomPaginator(
  File "/code/core/common/mixins.py", line 56, in __init__
    self.page_object = self.paginator.get_page(self.page_number)
  File "/usr/local/lib/python3.10/site-packages/django/core/paginator.py", line 63, in get_page
    number = self.validate_number(number)
  File "/usr/local/lib/python3.10/site-packages/django/core/paginator.py", line 53, in validate_number
    if number > self.num_pages:
  File "/usr/local/lib/python3.10/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.10/site-packages/django/core/paginator.py", line 99, in num_pages
    if self.count == 0 and not self.allow_empty_first_page:
  File "/usr/local/lib/python3.10/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.10/site-packages/django/core/paginator.py", line 94, in count
    return len(self.object_list)
  File "/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 380, in __len__
    self._fetch_all()
  File "/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 1881, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 91, in __iter__
    results = compiler.execute_sql(
  File "/usr/local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/usr/local/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: each UNION query must have the same number of columns
LINE 1: ..._object_url" = '/orgs/waynecorp/')) UNION (SELECT "organizat...
                                                             ^

----------------------------------------------------------------------
Ran 896 tests in 1151.879s

FAILED (errors=2)
Preserving test database for alias 'default' ('test_postgres')...
1
Stopping ocl-oclapi2-rt_es_1 ...
Stopping ocl-oclapi2-rt_db_1 ...
Stopping ocl-oclapi2-rt_db_1 ... done
Stopping ocl-oclapi2-rt_es_1 ... done
Removing ocl-oclapi2-rt_es_1 ...
Removing ocl-oclapi2-rt_db_1 ...
Removing ocl-oclapi2-rt_es_1 ... done
Removing ocl-oclapi2-rt_db_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