OCL API 2

Build: #71 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
Revision
bc7534a55ffc514aed7b24227e7bc7ddcce426eb bc7534a55ffc514aed7b24227e7bc7ddcce426eb
Fixed in
#72 (Code changes detected)
No failed test found. A possible compilation error occurred.

Error summary

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

+ export API_IMAGE=openconceptlab/oclapi2@sha256:cc786308990f5860212d23c4f0934a08835aa82fd73e191587165b3cc74d2ba3
+ API_IMAGE=openconceptlab/oclapi2@sha256:cc786308990f5860212d23c4f0934a08835aa82fd73e191587165b3cc74d2ba3
+ docker pull openconceptlab/oclapi2@sha256:cc786308990f5860212d23c4f0934a08835aa82fd73e191587165b3cc74d2ba3
+ echo 'Running Tests'
+ docker-compose -f docker-compose.yml -f docker-compose.ci.yml run --rm api bash coverage.sh
Creating network "ocl-oclapi20-rt_default" with the default driver
Creating volume "ocl-oclapi20-rt_postgres-data" with default driver
Creating volume "ocl-oclapi20-rt_es-data" with default driver
Pulling es (elasticsearch:7.17.1)...
Pulling db (postgres:14.4-alpine)...
Creating ocl-oclapi20-rt_db_1 ...
Creating ocl-oclapi20-rt_es_1 ...
Creating ocl-oclapi20-rt_es_1 ... done
Creating ocl-oclapi20-rt_db_1 ... done
Creating ocl-oclapi20-rt_api_run ...
Creating ocl-oclapi20-rt_api_run ... done
wait_for_it.sh: waiting for es:9200 without a timeout
wait_for_it.sh: es:9200 is available after 18 seconds
Using existing test database for alias 'default' ('test_postgres')...
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute
    return self.cursor.execute(sql)
psycopg2.errors.SyntaxError: syntax error at end of input
LINE 1: ...d, name, type, locale, locale_preferred, created_at) values
                                                                       ^


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 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, 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 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 448, 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 1051, in run_tests
    old_config = self.setup_databases(
  File "/usr/local/lib/python3.10/site-packages/django/test/runner.py", line 947, in setup_databases
    return _setup_databases(
  File "/usr/local/lib/python3.10/site-packages/django/test/utils.py", line 220, in setup_databases
    connection.creation.create_test_db(
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/creation.py", line 78, in create_test_db
    call_command(
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 198, in call_command
    return command.execute(*args, **defaults)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 96, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 349, in handle
    post_migrate_state = executor.migrate(
  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 135, in migrate
    state = self._migrate_all_forwards(
  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
    state = self.apply_migration(
  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/migration.py", line 130, in apply
    operation.database_forwards(
  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/operations/special.py", line 193, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "/code/core/concepts/migrations/0038_auto_20221122_0522.py", line 28, in populate_concept_descriptions
    cursor.execute(statement)
  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 87, in _execute
    return self.cursor.execute(sql)
django.db.utils.ProgrammingError: syntax error at end of input
LINE 1: ...d, name, type, locale, locale_preferred, created_at) values
                                                                       ^

1
Stopping ocl-oclapi20-rt_es_1 ...
Stopping ocl-oclapi20-rt_db_1 ...
Stopping ocl-oclapi20-rt_db_1 ... done
Stopping ocl-oclapi20-rt_es_1 ... done
Removing ocl-oclapi20-rt_es_1 ...
Removing ocl-oclapi20-rt_db_1 ...
Removing ocl-oclapi20-rt_es_1 ... done
Removing ocl-oclapi20-rt_db_1 ... done
Removing network ocl-oclapi20-rt_default
Removing volume ocl-oclapi20-rt_postgres-data
Removing volume ocl-oclapi20-rt_es-data