Univention Bugzilla – Bug 48423
make ucsschool import framework more usable as a library
Last modified: 2019-03-12 10:50:35 CET
The architecture of the UCS@school import code a framework. To use the ImportUser class and parts of the UserImport class in other software some adjustments are necessary. Refactor the code, so that the import framework is easier and faster to initialize.
Imports and initialization code has been pushed back as much as possible to allow easier usage of the ImportUser class in 3rd party software. The create_ou code was refactored to make its main Python function available to other Python software. [4.3] 0eefb4ea2 Bug #48423: lazy initialization [4.3] d82c122d0 Bug #48423: allow disabling selected tests, for now only uniqueness [4.3] dd70162fa Bug #48423: allow unprivileged users to run code [4.3] 1a953f169 Bug #48423: refactor create_ou code to make it usable without the cmdline interface [4.3] 74e904721 Bug #48423: changelog [4.3] 779e25154 Bug #48423: advisory [4.4] 08efe4568 Bug #48423: lazy initialization [4.4] 179f564d8 Bug #48423: allow disabling selected tests, for now only uniqueness [4.4] 382c92589 Bug #48423: allow unprivileged users to run code [4.4] 8f4084d65 Bug #48423: refactor create_ou code to make it usable without the cmdline interface [4.4] d9a85b307 Bug #48423: changelog Package: ucs-school-import Version: 16.0.2-64A~4.3.0.201901031732 Branch: ucs_4.3-0 Scope: ucs-school-4.3 Can currently not be built for 4.4, because of Bug #47076.
Various tests were failing in Jenkins, because Student objects had to long usernames. The reason was that all ImportUser subclasses shared the same UsernameHandler object. A bug introduced by the lazy_init patch. The configuration was not logged when a configuration check failed, making debugging difficult. Fixing the "all ImportUser subclasses shared the same UsernameHandler object" bug I realized, that each ImportUser subclasses creates its own set of PyHooks and FormatHooks. That's not necessary and has been fixed. [4.3] f4c2730b9 Bug #48423: improve configuration error reporting [4.3] ca5921835 Bug #48423: fix one UsernameHandler being shared by all ImportUser subclasses [4.3] 314f6d6ea Bug #48423: fix hooks being loaded for each ImportUser subclass [4.3] 77a55e709 Bug #48423: changelog ucs-school-import 16.0.2-65A~4.3.0.201901041512
[4.3] ac05ca0a2 Bug #48423: ou post-create hook can handle running in other Django app process [4.3] 2dbd7a6fb Bug #48423: advisory update [4.4] ff44e88bb Bug #48423: advisory [4.4] a7bcbf0d5 Bug #48423: improve configuration error reporting [4.4] 82c7592b2 Bug #48423: fix one UsernameHandler being shared by all ImportUser subclasses [4.4] c058137e5 Bug #48423: fix hooks being loaded for each ImportUser subclass [4.4] b48e3efe6 Bug #48423: changelog [4.4] 79826eda5 Bug #48423: ou post-create hook can handle running in other Django app process [4.4] cdeafe06a Bug #48423: advisory update Package: ucs-school-import Version: 16.0.2-66A~4.3.0.201901091400 Branch: ucs_4.3-0 Scope: ucs-school-4.3
With Bug #47076 fixed, this builds now: Package: ucs-school-import Version: 17.0.0-3A~4.4.0.201901091736 Branch: ucs_4.4-0 Scope: ucs-school-4.4
OK: package built and installable OK: code change (manual review of all commits) OK: functional change (code is now better usable) OK: tests - manual tests - jenkins tests - test in a customer test environment - test during customer development for prof services OK: changelog entry OK: advisory OK: changes merged to 4.4
UCS@school 4.3 v7 has been released. https://docs.software-univention.de/changelog-ucsschool-4.3v7-de.html If this error occurs again, please clone this bug.