OCL API 2

Build: #1686 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
1 minute
Agent
xindi.openmrs.org
Revision
df2f40a9bc950911df50dbd6de80f4fede8b41f6 df2f40a9bc950911df50dbd6de80f4fede8b41f6
Failing since
#1685 (Code changes detected – )
Fixed in
#1688 (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.

Creating ocl-oclapi2-rt_es_1 ... done
Creating ocl-oclapi2-rt_db_1 ... done
Creating ocl-oclapi2-rt_api_run ...
Creating ocl-oclapi2-rt_api_run ... done
wait_for_it.sh: waiting 180 seconds for es:9200
wait_for_it.sh: es:9200 is available after 16 seconds
Using existing test database for alias 'default' ('test_postgres')...
Preserving test database for alias 'default' ('test_postgres')...
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/utils/module_loading.py", line 30, in import_string
    return cached_import(module_path, class_name)
  File "/usr/local/lib/python3.10/site-packages/django/utils/module_loading.py", line 15, in cached_import
    module = import_module(module_path)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/code/core/users/views.py", line 14, in <module>
    from rest_framework.authtoken.views import ObtainAuthToken
  File "/usr/local/lib/python3.10/site-packages/rest_framework/authtoken/views.py", line 11, in <module>
    class ObtainAuthToken(APIView):
  File "/usr/local/lib/python3.10/site-packages/rest_framework/authtoken/views.py", line 21, in ObtainAuthToken
    coreapi.Field(
AttributeError: 'NoneType' object has no attribute 'Field'

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

Traceback (most recent call last):
  File "/code/manage.py", line 21, in <module>
    main()
  File "/code/manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/test.py", line 24, in run_from_argv
    super().run_from_argv(argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/test.py", line 68, in handle
    failures = test_runner.run_tests(test_labels)
  File "/usr/local/lib/python3.10/site-packages/django/test/runner.py", line 1060, in run_tests
    self.run_checks(databases)
  File "/usr/local/lib/python3.10/site-packages/django/test/runner.py", line 977, in run_checks
    call_command("check", verbosity=self.verbosity, databases=databases)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 194, in call_command
    return command.execute(*args, **defaults)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/check.py", line 76, in handle
    self.check(
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 485, in check
    all_issues = checks.run_checks(
  File "/usr/local/lib/python3.10/site-packages/django/core/checks/registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/usr/local/lib/python3.10/site-packages/django/core/checks/urls.py", line 42, in check_url_namespaces_unique
    all_namespaces = _load_all_namespaces(resolver)
  File "/usr/local/lib/python3.10/site-packages/django/core/checks/urls.py", line 61, in _load_all_namespaces
    url_patterns = getattr(resolver, "url_patterns", [])
  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/urls/resolvers.py", line 715, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  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/urls/resolvers.py", line 708, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/code/core/urls.py", line 46, in <module>
    path('oidc/', include('mozilla_django_oidc.urls')),
  File "/usr/local/lib/python3.10/site-packages/django/urls/conf.py", line 38, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/site-packages/mozilla_django_oidc/urls.py", line 12, in <module>
    OIDCCallbackClass = import_string(CALLBACK_CLASS_PATH)
  File "/usr/local/lib/python3.10/site-packages/django/utils/module_loading.py", line 32, in import_string
    raise ImportError(
ImportError: Module "core.users.views" does not define a "OCLOIDCAuthenticationCallbackView" attribute/class
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