Project

General

Profile

Bug #73760

Erreur récuprente sur les tests/build paserelle la relation « filr_rest_filr » n'existe pas

Added by Nicolas Roche 8 days ago. Updated about 20 hours ago.

Status:
Nouveau
Priority:
Normal
Target version:
-
Start date:
23 January 2023
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

Je l'ai eu ici et là :
https://jenkins.entrouvert.org/job/gitea-wip/job/passerelle/job/PR-51/
https://jenkins.entrouvert.org/job/gitea-wip/job/passerelle/job/PR-52/
Sur le second ticket, c'est passé juste en relançant jenkins au bout de la troisième fois.
Sur le premier c'est passé aussi au bout de la troisième fois, mais suite à un commit.
Cependant, je ne l'ai pas eu ici :
https://jenkins.entrouvert.org/job/gitea-wip/job/passerelle/job/PR-53/

Je la reproduis en locale, mais uniquement si je tourne le tests complets :

$ tox -e py3-django22-xmlschema10
self = <django.db.backends.utils.CursorWrapper object at 0x7fe2a3ce52b0>
sql = 'SELECT "filr_rest_filr"."id", "filr_rest_filr"."title", "filr_rest_filr"."slug", "filr_rest_filr"."description", "fil...ies", "filr_rest_filr"."verify_cert", "filr_rest_filr"."http_proxy", "filr_rest_filr"."base_url" FROM "filr_rest_filr"'
params = ()
ignored_wrapper_args = (False, {'connection': <django.db.backends.postgresql.base.DatabaseWrapper object at 0x7fe2e18b8400>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7fe2a3ce52b0>})

    def _execute(self, sql, params, *ignored_wrapper_args):
        self.db.validate_no_broken_transaction()
        with self.db.wrap_database_errors:
            if params is None:
                return self.cursor.execute(sql)
            else:
>               return self.cursor.execute(sql, params)
E               psycopg2.errors.UndefinedTable: ERREUR:  la relation « filr_rest_filr » n'existe pas
E               LINE 1: ...r"."http_proxy", "filr_rest_filr"."base_url" FROM "filr_rest...
E                                                                            ^

/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/backends/utils.py:84: UndefinedTable

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

self = <tests.ldap.test_manager.TestImportExport object at 0x7fe2d8aefbb0>, app = <django_webtest.DjangoTestApp object at 0x7fe2a31b6160>, resource_class = <class 'passerelle.apps.ldap.models.Resource'>
resource_params = {'description': 'resource', 'ldap_tls_cert': <ContentFile: Raw content>, 'ldap_tls_key': <ContentFile: Raw content>, 'ldap_url': 'ldap://localhost.entrouvert.org:52271', ...}

    def test_import(self, app, resource_class, resource_params):
        assert not resource_class.objects.count()
>       response = app.get('/manage/')

tests/ldap/test_manager.py:151: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django_webtest/__init__.py:124: in get
    response = super(DjangoTestApp, self).get(url, **kwargs)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/webtest/app.py:324: in get
    return self.do_request(req, status=status,
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django_webtest/__init__.py:86: in do_request
    response = super(DjangoTestApp, self).do_request(req, status,
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/webtest/app.py:620: in do_request
    res = req.get_response(app, catch_exc_info=True)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/webob/request.py:1309: in send
    status, headers, app_iter, exc_info = self.call_application(
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/webob/request.py:1278: in call_application
    app_iter = application(self.environ, start_response)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/webtest/lint.py:196: in lint_app
    iterator = application(environ, start_response_wrapper)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/contrib/staticfiles/handlers.py:65: in __call__
    return self.application(environ, start_response)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/wsgi.py:141: in __call__
    response = self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/base.py:75: in get_response
    response = self._middleware_chain(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/utils/deprecation.py:94: in __call__
    response = response or self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/utils/deprecation.py:94: in __call__
    response = response or self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/utils/deprecation.py:94: in __call__
    response = response or self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/utils/deprecation.py:94: in __call__
    response = response or self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/utils/deprecation.py:94: in __call__
    response = response or self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/utils/deprecation.py:94: in __call__
    response = response or self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/utils/deprecation.py:94: in __call__
    response = response or self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/utils/deprecation.py:94: in __call__
    response = response or self.get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:36: in inner
    response = response_for_exception(request, exc)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:90: in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/exception.py:34: in inner
    response = get_response(request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/base.py:115: in _get_response
    response = self.process_exception_by_middleware(e, request)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/core/handlers/base.py:113: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/contrib/auth/decorators.py:21: in _wrapped_view
    return view_func(request, *args, **kwargs)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/views/generic/base.py:71: in view
    return self.dispatch(request, *args, **kwargs)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/views/generic/base.py:97: in dispatch
    return handler(request, *args, **kwargs)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/views/generic/base.py:158: in get
    context = self.get_context_data(**kwargs)
passerelle/views.py:136: in get_context_data
    context['apps'].extend(app.objects.all())
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/models/query.py:274: in __iter__
    self._fetch_all()
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/models/query.py:1242: in _fetch_all
    self._result_cache = list(self._iterable_class(self))
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/model_utils/managers.py:38: in __iter__
    yield from iter
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/models/query.py:55: in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/models/sql/compiler.py:1142: in execute_sql
    cursor.execute(sql, params)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/backends/utils.py:67: in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/backends/utils.py:76: in _execute_with_wrappers
    return executor(sql, params, many, context)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/backends/utils.py:84: in _execute
    return self.cursor.execute(sql, params)
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/utils.py:89: in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <django.db.backends.utils.CursorWrapper object at 0x7fe2a3ce52b0>
sql = 'SELECT "filr_rest_filr"."id", "filr_rest_filr"."title", "filr_rest_filr"."slug", "filr_rest_filr"."description", "fil...ies", "filr_rest_filr"."verify_cert", "filr_rest_filr"."http_proxy", "filr_rest_filr"."base_url" FROM "filr_rest_filr"'
params = ()
ignored_wrapper_args = (False, {'connection': <django.db.backends.postgresql.base.DatabaseWrapper object at 0x7fe2e18b8400>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7fe2a3ce52b0>})

    def _execute(self, sql, params, *ignored_wrapper_args):
        self.db.validate_no_broken_transaction()
        with self.db.wrap_database_errors:
            if params is None:
                return self.cursor.execute(sql)
            else:
>               return self.cursor.execute(sql, params)
E               django.db.utils.ProgrammingError: ERREUR:  la relation « filr_rest_filr » n'existe pas
E               LINE 1: ...r"."http_proxy", "filr_rest_filr"."base_url" FROM "filr_rest...
E                                                                            ^

=============================================================================================
/tmp/tox-nroche/passerelle/py3-django22-xmlschema10/lib/python3.9/site-packages/django/db/backends/utils.py:84: ProgrammingError

FAILED tests/ldap/test_manager.py::TestImportExport::test_import - django.db.utils.ProgrammingError: ERREUR: la relation « filr_rest_filr » n'existe pas

History

#1

Updated by Emmanuel Cazenave about 20 hours ago

  • Assignee set to Emmanuel Cazenave

Also available in: Atom PDF