Development #67760
Publik - Project management #64274: montée de version django (→ 3.2 LTS)
fonctionner avec django 3.2
0%
Description
cf tache parente
Fichiers
Demandes liées
Révisions associées
django32: do not instanciate ServiceBase abstract model (#67760)
django32: check message content directly in the page (#67760)
Which is the point of interest anyway.
https://code.djangoproject.com/ticket/32191 for details on why it is not possible anymore to check the plain text in the response header.
django32: implement clear_tenants_settings as a global function (#67760)
Django 3.2 introduced a constraint on the access of settings object
attributes, they can only be in uppercase. As clear_tenants_settings is
only used by tests on the multitenant framework, clear_tenants_settings
is reimplemented as a global function using a global variable
_tenant_settings_wrapper to access the global multitenant aware wrapper
around the setting object.
django32: honor django's generated error formats (#67760)
django32: use public API to clear caches (#67760)
django32: change the way Thread are made tenant aware (#67760)
Django 3.2. changed the implementation of django.db.ConnectionHandler it
now uses asgiref.local.Local as a thread/asyncio-task local dictionnary
instead of threading.local. This new implementation use
threading.current_thread() to get a reference to the current thread
instead of threading._get_ident(), but inside __bootstrap_inner, the
_active dictionnary is not initialized and current_thread() returns a
dummy value instead of the current thread.
To work around this behaviour I made _bootstrap_inner wrap the run
method with the code needed to setup the tenant, so that it's run after
_boostrap_inner initialization of the current thread in the _active
dictionnary.
Historique
Mis à jour par A. Berriot il y a plus d'un an
- Assigné à
A. Berriotsupprimé
Je suis en train de travailler sur la branche wip/67760-fonctionner-avec-django-
Visiblement ça plante sur des tests liés à authentic en django 3.2, je vais regarder avec cette brique dans un premier temps. L'erreur est la suivante:
psycopg2.errors.UndefinedTable: relation "a2_rbac_organizationalunit" does not exist
Mis à jour par A. Berriot il y a plus d'un an
Agate Berriot a écrit :
Je suis en train de travailler sur la branche wip/67760-fonctionner-avec-django-
Visiblement ça plante sur des tests liés à authentic en django 3.2, je vais regarder avec cette brique dans un premier temps. L'erreur est la suivante:
psycopg2.errors.UndefinedTable: relation "a2_rbac_organizationalunit" does not exist
On est sur un problème de tenant / schema pas utilisé correctement, possiblement lié au threading.
Mis à jour par A. Berriot il y a plus d'un an
- Fichier 0003-Fix-authentic-tests-under-django-3.2.patch 0003-Fix-authentic-tests-under-django-3.2.patch ajouté
- Fichier 0002-Fix-hobo-tests-under-django-3.2.patch 0002-Fix-hobo-tests-under-django-3.2.patch ajouté
- Fichier 0001-Enabled-django-3.2-testing-in-tox-file.patch 0001-Enabled-django-3.2-testing-in-tox-file.patch ajouté
- Fichier 0004-Fix-multitenant-tests-under-django-3.2.patch 0004-Fix-multitenant-tests-under-django-3.2.patch ajouté
- Fichier 0005-Fix-schemas-tests-under-django-3.2-67760.patch 0005-Fix-schemas-tests-under-django-3.2-67760.patch ajouté
- Patch proposed changé de Non à Oui
Mis à jour par A. Berriot il y a plus d'un an
Les tests crashent parce que passerelle est toujours bloqué sur django <2.3 donc il y a un conflit de dépendances à l'installation. En local, toutes les suites de testent passent sur django 2.2 et 3.3 sauf test_passerelle
Mis à jour par A. Berriot il y a plus d'un an
- Bloqué par Development #67781: fonctionner avec django 3.2 ajouté
Mis à jour par Paul Marillonnet il y a plus d'un an
- Lié à Development #64289: fonctionner avec djangorestframework 3.12 ajouté
Mis à jour par A. Berriot il y a plus d'un an
Bon, chez moi ça passe en local:
py3-django22-coverage-hobo: commands succeeded
py3-django22-coverage-multipublik: commands succeeded
py3-django22-coverage-multitenant: commands succeeded
py3-django22-coverage-schemas: commands succeeded
py3-django22-coverage-authentic: commands succeeded
py3-django22-coverage-passerelle: commands succeeded
py3-django32-hobo: commands succeeded
py3-django32-multipublik: commands succeeded
py3-django32-multitenant: commands succeeded
py3-django32-schemas: commands succeeded
py3-django32-authentic: commands succeeded
py3-django32-passerelle: commands succeeded
py3-black: commands succeeded
congratulations :)
Mais pas sur le jenkins, je n'ai pas encore réussi à comprendre pourquoi
Mis à jour par A. Berriot il y a plus d'un an
- Fichier 0003-Fix-authentic-tests-under-django-3.2.patch 0003-Fix-authentic-tests-under-django-3.2.patch ajouté
- Fichier 0007-Test-drf-3.9-under-django-2-and-drf-3.12-under-cjang.patch 0007-Test-drf-3.9-under-django-2-and-drf-3.12-under-cjang.patch ajouté
- Fichier 0002-Fix-hobo-tests-under-django-3.2.patch 0002-Fix-hobo-tests-under-django-3.2.patch ajouté
- Fichier 0001-Enabled-django-3.2-testing-in-tox-file.patch 0001-Enabled-django-3.2-testing-in-tox-file.patch ajouté
- Fichier 0006-Parallelize-tests.patch 0006-Parallelize-tests.patch ajouté
- Fichier 0004-Fix-multitenant-tests-under-django-3.2.patch 0004-Fix-multitenant-tests-under-django-3.2.patch ajouté
- Fichier 0005-Fix-schemas-tests-under-django-3.2-67760.patch 0005-Fix-schemas-tests-under-django-3.2-67760.patch ajouté
Mis à jour par Frédéric Péters il y a plus d'un an
(sans rapport avec l'erreur), dans les commits il n'y a toujours pas ton nom complet, tu peux faire un coup de git commit --amend ?
Mis à jour par A. Berriot il y a plus d'un an
- Lié à Development #67911: paralléliser les tests via tox -p ajouté
Mis à jour par A. Berriot il y a plus d'un an
Frédéric Péters a écrit :
(sans rapport avec l'erreur), dans les commits il n'y a toujours pas ton nom complet, tu peux faire un coup de git commit --amend ?
Fait !
Pour les test qui flanchent:
============================= test session starts ============================== platform linux -- Python 3.9.2, pytest-7.1.2, pluggy-1.0.0 cachedir: /tmp/tox-jenkins/hobo/wip/67760-fonctionner-avec-django-/py3-django32-multitenant/.pytest_cache django: settings: settings (from env) rootdir: /var/lib/jenkins/workspace/p_67760-fonctionner-avec-django- plugins: django-4.5.2, mock-3.8.2, cov-3.0.0, freezegun-0.4.2, django-webtest-1.9.10 collected 54 items tests_multitenant/test_create_tenant.py ....... [ 12%] tests_multitenant/test_showmigrations_schemas.py . [ 14%] tests_multitenant/test_tenant_command.py ... [ 20%] tests_multitenant/test_hobo_notify.py ... [ 25%] tests_multitenant/test_logger.py . [ 27%] tests_multitenant/test_middleware.py .. [ 31%] tests_multitenant/test_objects.py . [ 33%] tests_multitenant/test_request_context_filter.py .. [ 37%] tests_multitenant/test_settings.py .......... [ 55%] tests_multitenant/test_tenant_command.py ........ [ 70%] tests_multitenant/test_threading.py ERROR: InvocationError for command /tmp/tox-jenkins/hobo/wip/67760-fonctionner-avec-django-/py3-django32-multitenant/bin/py.test --junitxml=junit-py3-django32-multitenant.xml tests_multitenant/ (exited with code -6 (SIGABRT)) (exited with code -6)
Et
============================= test session starts ============================== platform linux -- Python 3.9.2, pytest-7.1.2, pluggy-1.0.0 cachedir: /tmp/tox-jenkins/hobo/wip/67760-fonctionner-avec-django-/py3-django32-authentic/.pytest_cache django: settings: authentic2.settings (from env) rootdir: /var/lib/jenkins/workspace/p_67760-fonctionner-avec-django- plugins: django-4.5.2, mock-3.8.2, cov-3.0.0, freezegun-0.4.2, django-webtest-1.9.10 collected 13 items tests_authentic/test_hobo_deploy.py ... [ 23%] tests_authentic/test_provisionning.py ERROR: InvocationError for command /tmp/tox-jenkins/hobo/wip/67760-fonctionner-avec-django-/py3-django32-authentic/bin/py.test --junitxml=junit-py3-django32-authentic.xml tests_authentic/ (exited with code -6 (SIGABRT)) (exited with code -6)
(logs complete ici : https://jenkins.entrouvert.org/job/hobo-wip/job/wip%252F67760-fonctionner-avec-django-/21/consoleFull)
C'est visiblement un problème lié au threading, mais je ne reproduis pas en local et je n'ai pas la moindre idée de par ou commencer pour le débug :/
Mis à jour par Frédéric Péters il y a plus d'un an
(pas regardé le bug mais reçu un rebond de jenkins parce que typo dans @entrouvert.com, Agate Berriot <aberriot@entreouvert.com>)
Mis à jour par A. Berriot il y a plus d'un an
Frédéric Péters a écrit :
(pas regardé le bug mais reçu un rebond de jenkins parce que typo dans @entrouvert.com, Agate Berriot <aberriot@entreouvert.com>)
décidémment, je vais pas y arriver x) (normalement c'est bon)
Mis à jour par A. Berriot il y a plus d'un an
- Bloque Development #67950: fonctionner avec django 3.2 ajouté
Mis à jour par A. Berriot il y a plus d'un an
- Fichier 0003-Fix-authentic-tests-under-django-3.2.patch 0003-Fix-authentic-tests-under-django-3.2.patch ajouté
- Fichier 0002-Fix-hobo-tests-under-django-3.2.patch 0002-Fix-hobo-tests-under-django-3.2.patch ajouté
- Fichier 0001-Enabled-django-3.2-testing-in-tox-file.patch 0001-Enabled-django-3.2-testing-in-tox-file.patch ajouté
- Fichier 0006-WIP.patch 0006-WIP.patch ajouté
- Fichier 0004-Fix-multitenant-tests-under-django-3.2.patch 0004-Fix-multitenant-tests-under-django-3.2.patch ajouté
- Fichier 0005-Fix-schemas-tests-under-django-3.2-67760.patch 0005-Fix-schemas-tests-under-django-3.2-67760.patch ajouté
Mis à jour par A. Berriot il y a plus d'un an
- Statut changé de Nouveau à Résolu (à déployer)
Bon, je suis bloquée. Pour authentic, j'ai réussi à isoler le problème à un souci lié au threading, dans la fixture tenant_factory
.
En CI, on peut reproduire le souci avec cd /var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-
puis sudo -u jenkins tox -e py3-django32-authentic -- tests_authentic/test_provisionning.py::test_provision_user -vvv --setup-only -s
, ce qui sort un truc comme ça:
aberriot@jenkins.entrouvert.org:/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-$ sudo -u jenkins tox -e py3-django32-authentic -- tests_authentic/test_provisionning.py::test_provision_user -vvv --setup-only -s py3-django32-authentic develop-inst-noop: /var/lib/jenkins/workspace/p_67760-fonctionner-avec-django- py3-django32-authentic installed: WARNING: The directory '/home/aberriot/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.,amqp==5.1.1,asgiref==3.5.2,atomicwrites==1.4.1,attrs==22.1.0,authentic2 @ https://git.entrouvert.org/authentic.git/snapshot/authentic-main.tar.gz,beautifulsoup4==4.11.1,billiard==3.6.4.0,celery==5.2.7,certifi==2022.6.15,cffi==1.15.1,chardet==5.0.0,charset-normalizer==2.1.0,click==8.1.3,click-didyoumean==0.3.0,click-plugins==1.1.1,click-repl==0.2.0,coverage==6.4.3,cryptography==37.0.4,cssselect==1.1.0,defusedxml==0.7.1,Deprecated==1.2.13,diff-match-patch==20200713,Django==3.2.15,django-appconf==1.0.5,django-filter==22.1,django-import-export==2.5.0,django-mellon==1.34,django-model-utils==4.2.0,django-ratelimit==3.0.1,django-select2==7.7.3,django-tables2==2.4.1,django-tenant-schemas @ https://git.entrouvert.org/debian/django-tenant-schemas.git/snapshot/django-tenant-schemas-main.tar.gz,django-webtest==1.9.10,djangorestframework==3.12.4,dnspython==2.2.1,docopt==0.6.2,elementpath==1.3.3,enum34==1.1.6,et-xmlfile==1.1.0,freezegun==1.2.1,gadjo==1.18,-e git://repos.entrouvert.org/hobo.git@fe32fd9e1268d43407f0afbd18fb27e2599b9c20#egg=hobo,httmock==1.4.0,idna==3.3,iniconfig==1.1.1,isodate==0.6.1,jwcrypto==0.9.1,kombu==5.2.4,lxml==4.9.1,Markdown==2.6.11,MarkupPy==1.14,mock==3.0.5,num2words==0.5.9,oauthlib==3.2.0,odfpy==1.4.1,openpyxl==3.0.10,packaging==21.3,Pillow==9.2.0,pluggy==1.0.0,prometheus-client==0.14.1,prompt-toolkit==3.0.30,psycopg2==2.9.3,psycopg2-binary==2.9.3,py==1.11.0,pyasn1==0.4.8,pyasn1-modules==0.2.8,pycparser==2.21,pycryptodomex==3.15.0,pyparsing==3.0.9,pytest==7.1.2,pytest-cov==3.0.0,pytest-django==4.5.2,pytest-freezegun==0.4.2,pytest-mock==3.8.2,python-dateutil==2.8.2,python-ldap==3.4.2,pytz==2022.1,PyYAML==6.0,requests==2.28.1,requests-oauthlib==1.3.1,six==1.16.0,soupsieve==2.3.2.post1,sqlparse==0.4.2,tablib==3.2.1,tomli==2.0.1,urllib3==1.26.11,vine==5.0.0,waitress==2.1.2,wcwidth==0.2.5,WebOb==1.8.7,WebTest==3.0.0,wrapt==1.14.1,xlrd==2.0.1,xlwt==1.3.0,xmlschema==1.0.18,XStatic==1.0.2,XStatic-Font-Awesome==4.7.0.0,XStatic-jQuery==3.5.1.1,XStatic-jquery-ui==1.13.0.1,XStatic-OpenSans==1.0.0,XStatic-Select2==4.0.13.1 py3-django32-authentic run-test-pre: PYTHONHASHSEED='3431510552' py3-django32-authentic run-test: commands[0] | ./getlasso3.sh '/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/lasso.py' -> '/usr/lib/python3/dist-packages/lasso.py' '/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_lasso.cpython-39-x86_64-linux-gnu.so' -> '/usr/lib/python3/dist-packages/_lasso.cpython-39-x86_64-linux-gnu.so' py3-django32-authentic run-test: commands[1] | py.test --junitxml=junit-py3-django32-authentic.xml tests_authentic/test_provisionning.py::test_provision_user -vvv --setup-only -s ======================= test session starts ======================== platform linux -- Python 3.9.2, pytest-7.1.2, pluggy-1.0.0 -- /tmp/tox-jenkins/hobo/py3-django32-authentic/bin/python cachedir: /tmp/tox-jenkins/hobo/py3-django32-authentic/.pytest_cache django: settings: authentic2.settings (from env) rootdir: /var/lib/jenkins/workspace/p_67760-fonctionner-avec-django- plugins: django-4.5.2, mock-3.8.2, cov-3.0.0, freezegun-0.4.2, django-webtest-1.9.10 collected 1 item tests_authentic/test_provisionning.py::test_provision_user SETUP S _fail_for_invalid_template_variable SETUP S django_test_environment SETUP S django_db_blocker SETUP S django_db_use_migrations SETUP S django_db_keepdb SETUP S django_db_createdb SETUP S django_db_modify_db_settings_tox_suffix SETUP S django_db_modify_db_settings_xdist_suffix SETUP S django_db_modify_db_settings_parallel_suffix (fixtures used: django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix) SETUP S django_db_modify_db_settings (fixtures used: django_db_modify_db_settings_parallel_suffix)Creating test database for alias 'default' ('test__py3-django32-authentic')... SETUP S django_db_setup (fixtures used: django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_use_migrations, django_test_environment) SETUP S tmp_path_factory SETUP C _django_setup_unittest (fixtures used: django_db_blocker) SETUP F _dj_autoclear_mailbox SETUP F _django_clear_site_cache SETUP F _django_db_helper (fixtures used: django_db_blocker, django_db_setup) SETUP F _django_db_marker SETUP F _django_set_urlconf SETUP F _live_server_helper SETUP F _template_string_if_invalid_marker SETUP F transactional_db (fixtures used: _django_db_helper) SETUP F tmp_path (fixtures used: tmp_path_factory) SETUP F tmpdir (fixtures used: tmp_path) SETUP F settings SETUP F tenant_base (fixtures used: settings, tmpdir) SETUP F tenant_factory (fixtures used: settings, tenant_base, transactional_db)=== Running migrate for schema authentic_example_net Operations to perform: Apply all migrations: a2_rbac, admin, attribute_aggregator, auth, authentic2, authentic2_auth_fc, authentic2_auth_oidc, authentic2_auth_saml, authentic2_idp_cas, authentic2_idp_oidc, authenticators, common, contenttypes, custom_user, django_rbac, idp, journal, mellon, nonce, saml, sessions Running migrations: Applying contenttypes.0001_initial... OK Applying contenttypes.0002_remove_content_type_name... OK Applying auth.0001_initial... OK Applying custom_user.0001_initial... OK Applying admin.0001_initial... OK Applying custom_user.0002_auto_20150410_1823... OK Applying custom_user.0003_auto_20150504_1410... OK Applying django_rbac.0001_initial... OK Applying auth.0002_auto_20150323_1720... OK Applying authentic2.0001_initial... OK Applying authentic2.0002_auto_20150320_1418... OK Applying authentic2.0003_auto_20150409_1840... OK Applying authentic2.0004_service... OK Applying a2_rbac.0001_initial... OK Applying custom_user.0004_user_ou... OK Applying custom_user.0005_auto_20150522_1527... OK Applying custom_user.0006_auto_20150527_1212... OK Applying custom_user.0007_auto_20150610_1527... OK Applying custom_user.0008_auto_20150617_1606... OK Applying custom_user.0009_auto_20150810_1953... OK Applying custom_user.0010_auto_20160307_1418... OK Applying authentic2.0005_service_ou... OK Applying authentic2.0006_conditional_slug_index... OK Applying authentic2.0007_auto_20150523_0028... OK Applying authentic2.0008_auto_20160204_1415... OK Applying authentic2.0009_auto_20160211_2247... OK Applying authentic2.0010_attributevalue_multiple... OK Applying authentic2.0011_auto_20160211_2253... OK Applying authentic2.0012_auto_20160211_2255... OK Applying authentic2.0013_auto_20160211_2258... OK Applying authentic2.0014_attributevalue_verified... OK Applying authentic2.0015_auto_20160621_1711... OK Applying custom_user.0011_manual_attribute_values_for_name_fields... OK Applying custom_user.0012_user_modified... OK Applying custom_user.0013_user_email_verified... OK Applying custom_user.0014_set_email_verified... OK Applying custom_user.0015_auto_20170707_1653... OK Applying custom_user.0016_auto_20180925_1107... OK Applying custom_user.0017_auto_20200305_1645... OK Applying custom_user.0018_user_last_account_deletion_alert... OK Applying custom_user.0019_add_user_deleted... OK Applying custom_user.0020_deleteduser... OK Applying custom_user.0021_set_unusable_password... OK Applying custom_user.0022_index_email... OK Applying custom_user.0023_index_username... OK Applying custom_user.0024_index_email_by_trigrams... OK Applying custom_user.0025_user_deactivation... OK Applying authentic2.0016_attribute_disabled... OK Applying authentic2.0017_modify_attribute_serialization... OK Applying authentic2.0018_auto_20170524_0842... OK Applying authentic2.0019_auto_20170309_1529... OK Applying authentic2.0020_delete_federatedid... OK Applying authentic2.0021_attribute_order... OK Applying authentic2.0022_attribute_scopes... OK Applying authentic2.0023_auto_20181031_0900... OK Applying authentic2.0024_auto_20190617_1113... OK Applying authentic2.0025_auto_20191009_1047... OK Applying authentic2.0026_token... OK Applying authentic2.0027_remove_deleteduser... OK Applying custom_user.0026_remove_user_deleted... OK Applying custom_user.0027_user_deactivation_reason... OK Applying custom_user.0028_user_email_verified_date... OK Applying custom_user.0029_profile_profiletype... OK Applying authentic2.0028_trigram_unaccent_index... OK Applying authentic2.0029_auto_20201013_1614... OK Applying authentic2.0030_clean_admin_tools_tables... OK Applying authentic2.0031_add_search_vector_to_attributes... OK Applying authentic2.0032_initialize_search_vectors... OK Applying authentic2.0033_recreate_immutable_unaccent... OK Applying authentic2.0034_attribute_required_on_login... OK Applying authentic2.0035_service_home_url... OK Applying custom_user.0030_auto_20220304_1136... OK Applying authentic2.0036_service_profile_types... OK Applying authentic2.0037_auto_20220331_1513... OK Applying authentic2.0038_make_service_ou_non_null... OK Applying authentic2.0039_add_unique_attribute_constraint... OK Applying a2_rbac.0002_role_external_id... OK Applying a2_rbac.0003_partial_unique_index_on_name_and_slug... OK Applying a2_rbac.0004_auto_20150523_0028... OK Applying a2_rbac.0005_auto_20150526_1406... OK Applying a2_rbac.0006_auto_20150619_1056... OK Applying a2_rbac.0007_auto_20150708_1337... OK Applying a2_rbac.0008_auto_20150810_1953... OK Applying a2_rbac.0009_partial_unique_index_on_permission... OK Applying a2_rbac.0010_auto_20160209_1417... OK Applying a2_rbac.0011_auto_20160209_1511... OK Applying a2_rbac.0013_auto_20170629_0007... OK Applying a2_rbac.0014_auto_20170711_1024... OK Applying a2_rbac.0015_organizationalunit_validate_emails... OK Applying a2_rbac.0016_auto_20171208_1429... OK Applying a2_rbac.0017_organizationalunit_user_can_reset_password... OK Applying a2_rbac.0018_organizationalunit_user_add_password_policy... OK Applying a2_rbac.0019_organizationalunit_show_username... OK Applying a2_rbac.0020_partial_unique_index_on_name... OK Applying a2_rbac.0021_auto_20200317_1514... OK Applying a2_rbac.0022_auto_20200402_1101... OK Applying a2_rbac.0023_role_can_manage_members... OK Applying a2_rbac.0024_fix_self_admin_perm... OK Applying a2_rbac.0025_auto_20210622_1132... OK Applying a2_rbac.0026_organizationalunit_check_required_on_login_attributes... OK Applying a2_rbac.0027_auto_20211213_0949... OK Applying a2_rbac.0028_ou_home_url... OK Applying a2_rbac.0026_add_roleparenting_soft_delete... OK Applying a2_rbac.0027_auto_20220331_1521... OK Applying a2_rbac.0029_use_unique_constraints... OK Applying admin.0002_logentry_remove_auto_add... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying attribute_aggregator.0001_initial... OK Applying idp.0001_initial... OK Applying saml.0001_initial... OK Applying saml.0002_ease_federation_migration... OK Applying saml.0002_auto_20150320_1245... OK Applying saml.0003_merge... OK Applying saml.0004_auto_20150410_1438... OK Applying saml.0005_make_liberty_provider_inherit_from_service... OK Applying saml.0006_restore_foreign_keys... OK Applying saml.0007_copy_service_ptr_id_to_old_id... OK Applying saml.0008_alter_foreign_keys... OK Applying saml.0009_auto... OK Applying saml.0010_auto... OK Applying saml.0011_auto... OK Applying saml.0012_auto_20150526_2239... OK Applying saml.0013_auto_20150617_1004... OK Applying saml.0014_auto_20150617_1216... OK Applying saml.0015_auto_20150915_2032... OK Applying saml.0016_auto_20150915_2041... OK Applying idp.0002_auto_20150526_2239... OK Applying idp.0003_auto_20150915_2041... OK Applying attribute_aggregator.0002_auto_20150409_1840... OK Applying attribute_aggregator.0003_auto_20150526_2239... OK Applying attribute_aggregator.0004_auto_20150915_2041... OK Applying authentic2_idp_cas.0001_initial... OK Applying auth.0003_auto_20150410_1657... OK Applying auth.0004_user... OK Applying auth.0005_auto_20150526_2303... OK Applying authentic2.0040_add_external_guid... OK Applying authentic2.0041_lock... OK Applying authenticators.0001_initial... OK Applying authenticators.0002_loginpasswordauthenticator... OK Applying authenticators.0003_auto_20220413_1504... OK Applying authentic2_auth_fc.0001_initial... OK Applying authentic2_auth_fc.0002_auto_20200416_1439... OK Applying authentic2_auth_fc.0003_fcaccount_order1... OK Applying authentic2_auth_fc.0004_fcaccount_order2... OK Applying authentic2_auth_fc.0005_fcauthenticator... OK Applying authentic2_auth_fc.0006_auto_20220525_1409... OK Applying authentic2_auth_fc.0007_auto_20220615_1002... OK Applying authentic2_auth_oidc.0001_initial... OK Applying authentic2_auth_oidc.0002_oidcprovider_token_revocation_endpoint... OK Applying authentic2_auth_oidc.0003_oidcprovider_show... OK Applying authentic2_auth_oidc.0004_auto_20171017_1522... OK Applying authentic2_auth_oidc.0005_oidcprovider_slug... OK Applying authentic2_auth_oidc.0006_oidcprovider_claims_parameter_supported... OK Applying authentic2_auth_oidc.0007_auto_20200317_1732... OK Applying authentic2_auth_oidc.0008_auto_20201102_1142... OK Applying authentic2_auth_oidc.0009_oidcprovider_baseauthenticator_ptr... OK Applying authentic2_auth_oidc.0010_auto_20220413_1622... OK Applying authentic2_auth_oidc.0011_auto_20220413_1632... OK Applying authentic2_auth_oidc.0012_auto_20220524_1147... OK Applying authentic2_auth_saml.0001_initial... OK Applying authentic2_auth_saml.0002_auto_20220608_1559... OK Applying authentic2_idp_cas.0002_auto_20150410_1438... OK Applying authentic2_idp_cas.0003_auto_20150415_2223... OK Applying authentic2_idp_cas.0004_create_services... OK Applying authentic2_idp_cas.0005_alter_field_service_ptr... OK Applying authentic2_idp_cas.0006_copy_proxy_m2m... OK Applying authentic2_idp_cas.0007_alter_service... OK Applying authentic2_idp_cas.0008_alter_foreign_keys... OK Applying authentic2_idp_cas.0009_alter_related_models... OK Applying authentic2_idp_cas.0010_copy_service_ptr_id_to_old_id... OK Applying authentic2_idp_cas.0011_remove_old_id_restore_proxy... OK Applying authentic2_idp_cas.0012_copy_service_proxy_to_m2m... OK Applying authentic2_idp_cas.0013_delete_model_service_proxy2... OK Applying authentic2_idp_cas.0014_auto_20151204_1606... OK Applying authentic2_idp_cas.0015_auto_20170406_1825... OK Applying custom_user.0031_profile_email... OK Applying authentic2_idp_oidc.0001_initial... OK Applying authentic2_idp_oidc.0002_auto_20170121_2346... OK Applying authentic2_idp_oidc.0003_auto_20170329_1259... OK Applying authentic2_idp_oidc.0004_auto_20170324_1426... OK Applying authentic2_idp_oidc.0005_authorization_mode... OK Applying authentic2_idp_oidc.0006_auto_20170720_1054... OK Applying authentic2_idp_oidc.0007_oidcclient_has_api_access... OK Applying authentic2_idp_oidc.0008_oidcclient_idtoken_duration... OK Applying authentic2_idp_oidc.0009_auto_20180313_1156... OK Applying authentic2_idp_oidc.0010_oidcclaim... OK Applying authentic2_idp_oidc.0011_auto_20180808_1546... OK Applying authentic2_idp_oidc.0012_auto_20200122_2258... OK Applying authentic2_idp_oidc.0013_auto_20200630_1007... OK Applying authentic2_idp_oidc.0014_auto_20201126_1812... OK Applying authentic2_idp_oidc.0015_auto_20220304_0738... OK Applying authentic2_idp_oidc.0016_remove_oidcclient_perform_sub_profile_substitution... OK Applying common.0001_initial... OK Applying common.0002_auto_20160105_1702... OK Applying common.0003_auto_20200707_1656... OK Applying common.0004_alter_role_uuid... OK Applying django_rbac.0002_organizationalunit_permission_role_roleparenting... OK Applying django_rbac.0003_add_max_aggregate_for_postgres... OK Applying django_rbac.0004_auto_20150708_1337... OK Applying django_rbac.0005_auto_20171209_1106... OK Applying django_rbac.0006_remove_operation_name... OK Applying django_rbac.0007_add_unique_constraints... OK Applying django_rbac.0008_add_roleparenting_soft_delete... OK Applying sessions.0001_initial... OK Applying journal.0001_initial... OK Applying journal.0002_event_api... OK Applying mellon.0001_initial... OK Applying mellon.0002_sessionindex... OK Applying mellon.0003_add_issuer_model... OK Applying mellon.0004_migrate_issuer... OK Applying mellon.0005_drop_rename_issuer... OK Applying nonce.0001_initial... OK Applying saml.0017_auto_20170710_1738... OK Applying saml.0018_truncate_saml_keyvalue... OK Applying saml.0019_auto_20200621_1558... OK SETUP F tenant (fixtures used: tenant_factory) SETUP F caplog tests_authentic/test_provisionning.py::test_provision_user (fixtures used: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_helper, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, caplog, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_setup, django_db_use_migrations, django_test_environment, request, settings, tenant, tenant_base, tenant_factory, tmp_path, tmp_path_factory, tmpdir, transactional_db) TEARDOWN F caplog TEARDOWN F tenant >>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace >>>>>>>>>>>>>>>>>>>>>>>>>>> > /var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/tests_authentic/conftest.py(93)tenant_factory() -> call_command( (Pdb) c >>>>>>>>>>>>>>>>>>>>>>>>>>> PDB continue >>>>>>>>>>>>>>>>>>>>>>>>>>> Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow. Python runtime state: initialized Current thread 0x00007fcabb1a5700 (most recent call first): File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ File "/usr/lib/python3.9/threading.py", line 1328 in current_thread File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 56 in _get_context_id File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 81 in _get_storage File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/asgiref/local.py", line 101 in __getattr__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 58 in __getitem__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/utils/connection.py", line 15 in __getattr__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/multitenant/threads.py", line 27 in _new__init__ File "/usr/lib/python3.9/threading.py", line 1296 in __init__ ... Thread 0x00007fcaca120740 (most recent call first): File "/usr/lib/python3.9/threading.py", line 312 in wait File "/usr/lib/python3.9/threading.py", line 574 in wait File "/usr/lib/python3.9/threading.py", line 879 in start File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/agent/authentic2/provisionning.py", line 378 in provision File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/agent/authentic2/provisionning.py", line 72 in callback File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/db/backends/base/base.py", line 645 in on_commit File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/db/transaction.py", line 128 in on_commit File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/agent/authentic2/provisionning.py", line 76 in stop File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/agent/authentic2/provisionning.py", line 405 in __exit__ File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/hobo/agent/authentic2/apps.py", line 58 in new_execute File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/django/core/management/__init__.py", line 181 in call_command File "/var/lib/jenkins/workspace/p_67760-fonctionner-avec-django-/tests_authentic/conftest.py", line 93 in tenant_factory File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/fixtures.py", line 899 in _teardown_yield_fixture File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/fixtures.py", line 1012 in finish File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/fixtures.py", line 667 in <lambda> File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/runner.py", line 522 in teardown_exact File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/runner.py", line 179 in pytest_runtest_teardown File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/runner.py", line 259 in <lambda> File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/runner.py", line 338 in from_call File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/runner.py", line 258 in call_runtest_hook File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/runner.py", line 219 in call_and_report File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/runner.py", line 131 in runtestprotocol File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/runner.py", line 111 in pytest_runtest_protocol File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/main.py", line 347 in pytest_runtestloop File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/main.py", line 322 in _main File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/main.py", line 268 in wrap_session File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/main.py", line 315 in pytest_cmdline_main File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_callers.py", line 39 in _multicall File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_manager.py", line 80 in _hookexec File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/pluggy/_hooks.py", line 265 in __call__ File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/config/__init__.py", line 164 in main File "/tmp/tox-jenkins/hobo/py3-django32-authentic/lib/python3.9/site-packages/_pytest/config/__init__.py", line 187 in console_main File "/tmp/tox-jenkins/hobo/py3-django32-authentic/bin/py.test", line 8 in <module> ERROR: InvocationError for command /tmp/tox-jenkins/hobo/py3-django32-authentic/bin/py.test --junitxml=junit-py3-django32-authentic.xml tests_authentic/test_provisionning.py::test_provision_user -vvv --setup-only -s (exited with code -6 (SIGABRT)) (exited with code -6)
Il y a une recursion loop lors de l'accès à des variables locales au thread, specifiquement à la connection db. Ce qui est étonnant c'est que je ne reproduis pas en local (python 3.10.5), seulement en CI (3.9.2). Donc c'est possible qu'on aie un problème issu d'une combinaison de facteurs entre Python, Django 3 et asgiref.
Au départ, je m'étais dit que c'était lié à ce commit passé la semaine dernière :
commit 274b6eabde9ae5d9fb8866fc551361b87aa4a46d Refs: <v2.45> Author: Agate Berriot <aberriot@entrouvert.com> AuthorDate: Wed Aug 3 15:11:24 2022 +0200 Commit: Agate Berriot <aberriot@entrouvert.com> CommitDate: Wed Aug 3 15:22:51 2022 +0200 Reuse db schema instead of recreating it fro mscratch during tests (#67914)
Mais même avec un revert de ce commit, en retirant la parallélisation, en lançant juste un seul test (cf mon dernier patch wip et le dernier build jenkins https://jenkins.entrouvert.org/job/hobo-wip/job/wip%252F67760-fonctionner-avec-django-/48/execution/node/16/log/), ça plante quand même.
Je m'arrête là, j'ai le cerveau qui commence à fondre, si jamais quelqu'un veut prendre le relai ;)
Mis à jour par A. Berriot il y a plus d'un an
Statut précédemment passé en Résolu, ce n'est pas le cas, c'est toujours bloqué.
Mis à jour par Benjamin Dauvergne il y a plus d'un an
- Lié à Development #69942: Ne pas accéder à connection dans Thread.__init__ ajouté
Mis à jour par A. Berriot il y a plus d'un an
- Fichier 0003-Fix-authentic-tests-under-django-3.2.patch 0003-Fix-authentic-tests-under-django-3.2.patch ajouté
- Fichier 0002-Fix-hobo-tests-under-django-3.2.patch 0002-Fix-hobo-tests-under-django-3.2.patch ajouté
- Fichier 0001-Enabled-django-3.2-testing-in-tox-file.patch 0001-Enabled-django-3.2-testing-in-tox-file.patch ajouté
- Fichier 0004-Fix-multitenant-tests-under-django-3.2.patch 0004-Fix-multitenant-tests-under-django-3.2.patch ajouté
- Fichier 0005-Fix-schemas-tests-under-django-3.2-67760.patch 0005-Fix-schemas-tests-under-django-3.2-67760.patch ajouté
- Statut changé de En cours à Solution proposée
Mis à jour par A. Berriot il y a plus d'un an
- Assigné à
A. Berriotsupprimé
Rebasé sur main après le travail de Benjamin dans #69942, ça a l'air de passer sur Jenkins et en local \o/
Mis à jour par Benjamin Dauvergne il y a plus d'un an
- Statut changé de Solution proposée à En cours
- Assigné à mis à A. Berriot
0001: ok
0002: tu peux séparer ça en 2 patchs (is_resolvable/has_valid_certificate et le check du message dans la réponse plutôt qu'un cookie) et expliquer ce qui ne va pas avec is_resolvable et has_valid_certificate et Django 3.2, et idem pour le message dans la réponse (c'est plus propre je suis d'accord mais un message de commit l'expliquant est nécessaire)
0003: n'est plus nécessaire, les Thread conservent le tenant au moment du .start()
ça doit dater d'une recherche de contournement de tes soucis avec les threads
# Uppercase is necessary for properties # accessed via settings.FOO # because django 3 raises an error # when trying to access a non-uppercase setting value
c'est un peu embêtant c'est sûr, mais dans ce cas je suis plutôt pour conserver une copie de l'objet TenantSettingWrapper quelque part ailleurs, genre dans hobo.multitenant.tenant_settings et peut-être mettre ce nettoyage dans la fixture tenants vu que ça semble fait systématiquement en début de test.- séparer les messages dont l'encoding/le formatage change dans une autre commit
- ajout de
with tenant_context(tenant):
un peu partout (et déplacement de t.start() aussi à défaire) plus nécessaire (problème de threads plus haut) - changement cache.clear() dans un autre commit avec explication
- encore des bouts de is_resolvable/has_valid_certificate à remonter plus haut
- tox.ini dans le premier patch
Mis à jour par Emmanuel Cazenave il y a plus d'un an
- Assigné à changé de A. Berriot à Emmanuel Cazenave
Mis à jour par Benjamin Dauvergne il y a plus d'un an
- Assigné à changé de Emmanuel Cazenave à Benjamin Dauvergne
Mis à jour par Emmanuel Cazenave il y a plus d'un an
- Fichier 0001-django32-run-tests-against-django-3.2-67760.patch 0001-django32-run-tests-against-django-3.2-67760.patch ajouté
- Fichier 0002-django32-do-not-instanciate-ServiceBase-abstract-mod.patch 0002-django32-do-not-instanciate-ServiceBase-abstract-mod.patch ajouté
- Fichier 0003-django32-check-message-content-directly-in-the-page-.patch 0003-django32-check-message-content-directly-in-the-page-.patch ajouté
- Fichier 0004-django32-honor-django-s-generated-error-formats-6776.patch 0004-django32-honor-django-s-generated-error-formats-6776.patch ajouté
- Fichier 0005-django32-use-public-API-to-clear-caches-67760.patch 0005-django32-use-public-API-to-clear-caches-67760.patch ajouté
- Fichier 0006-django32-use-uppercase-letters-for-clear_tenants_set.patch 0006-django32-use-uppercase-letters-for-clear_tenants_set.patch ajouté
Benjamin Dauvergne a écrit :
0002: tu peux séparer ça en 2 patchs (is_resolvable/has_valid_certificate)
J'ai laissé dans un seul patch parce que c'est le truc logique (mais maintenant le message de commit explique pourquoi).
c'est un peu embêtant c'est sûr, mais dans ce cas je suis plutôt pour conserver une copie de l'objet TenantSettingWrapper quelque part ailleurs
Je n'ai pas du tout compris ce que tu voulais faire, j'ai gardé l'approche d'Agate, je te laisse amender à ta guise.
J'ai tenu compte des autres remarques sur découpage/explications. Reste quelques erreurs dans les tests de provisionning.
Mis à jour par Benjamin Dauvergne il y a plus d'un an
django-tenant-schemas ne fonctionne plus avec les threads en 3.2, Django a réimplémenté threading.local mais il ne se comporte plus de la même manière, quand on fait le connection.set_tenant dans la surcharge de __bootstrap_inner, il ne voit pas le nouveau thread en cours et modifie la connection du thread principal. C'est la raison des 6 derniers tests qui foirent.
Mis à jour par Benjamin Dauvergne il y a plus d'un an
Emmanuel Cazenave a écrit :
c'est un peu embêtant c'est sûr, mais dans ce cas je suis plutôt pour conserver une copie de l'objet TenantSettingWrapper quelque part ailleurs
Je n'ai pas du tout compris ce que tu voulais faire, j'ai gardé l'approche d'Agate, je te laisse amender à ta guise.
J'ai tenu compte des autres remarques sur découpage/explications. Reste quelques erreurs dans les tests de provisionning.
Ok j'ai fait ce que je souhaitais dans le commit "django32: implement clear_tenants_settings as a global function". La PR arrive.
Mis à jour par Robot Gitea il y a plus d'un an
- Statut changé de En cours à Solution proposée
Benjamin Dauvergne (bdauvergne) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/hobo/pulls/10
- Titre : Fonctionner avec django 3.2 (#67760)
- Modifications : https://gitea.entrouvert.org/entrouvert/hobo/pulls/10/files
Mis à jour par Robot Gitea il y a environ un an
- Statut changé de Solution proposée à Solution validée
Emmanuel Cazenave (ecazenave) a approuvé une pull request sur Gitea concernant cette demande :
Mis à jour par Robot Gitea il y a environ un an
- Statut changé de Solution validée à Résolu (à déployer)
Benjamin Dauvergne (bdauvergne) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/hobo/pulls/10
- Titre : Fonctionner avec django 3.2 (#67760)
- Modifications : https://gitea.entrouvert.org/entrouvert/hobo/pulls/10/files
Mis à jour par Transition automatique il y a environ un an
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Paul Marillonnet il y a environ un an
- Lié à Development #74244: ci : ne pas tester tous les environnements django 2.2 et django 3.2 dans les jobs wip (?) ajouté
django32: run tests against django 3.2 (#67760)