Univention Bugzilla – Bug 56201
Replace python-notifier functionality in UMC
Last modified: 2023-08-02 16:06:25 CEST
We still use the python-notifier thread functionality in our UMC server functionality. We can simply replace this with native threading. There are also some UMC modules which uses notifier.threads directly. We should provide functionality in UMC, so that we can switch to that and we have the code under control. python3-notifier will be removed in UCS 5.1.
1. new threading functionality is provided by UMC Python API: `univention.management.console.modules.decorators.SimpleThread()` replaces `notifier.threads.Simple()` and `notifier.threads.Callback()`. `Simple('name', Callback(_thread, *args, *kwargs), Callback(_finished, *args, **kwargs)).run()` can be replaced with `SimpleThread('name', _thread, lambda t, r: _finished(t, r, *args, **kwargs)).run(*args, **kwargs)` Various modules now use this. 2. occurences of `self.{username,password,user_dn,bind_user_connection}` in various UMC modules have been replaced with the equivalent in `request.…`. a new prepare(request) method can be used to access to attributes when it's required in a init() function 3. unused functions in the appcenter module have been removed. To be tested: * System Setup: Save settings e.g. network settings * System Setup: execute initial join/setup process * System Setup: apply network settings in setup process * Appcenter: install or uninstall app locally * Appcenter: install or uninstall app remote * Appcenter/Package Management: install or uninstall debian package * Join module: run a joinscript * Join module: make initial join * Lib: reboot server via the menu entry * UDM: LDAP directory tree: search objects in a container * UDM: move a object or container * Self service: set user profile data * Admin diary: add a comment to any entry univention-system-setup.yaml dbd28d356a92 | chore: add advisory and changelog entries univention-system-setup (13.0.9-2) dbd28d356a92 | chore: add advisory and changelog entries univention-system-setup (13.0.9-1) 655260573c7e | refactor: replace notifier.threads with new SimpleThread UMC API univention-self-service.yaml dbd28d356a92 | chore: add advisory and changelog entries univention-self-service (5.0.7-3) dbd28d356a92 | chore: add advisory and changelog entries univention-self-service (5.0.7-2) cf5a4ecccfdd | refactor(umc): replace deprecated API with new UMC Python API univention-management-console.yaml dbd28d356a92 | chore: add advisory and changelog entries univention-management-console-module-udm.yaml dbd28d356a92 | chore: add advisory and changelog entries univention-management-console-module-udm (10.0.8-4) dbd28d356a92 | chore: add advisory and changelog entries univention-management-console-module-udm (10.0.8-3) 655260573c7e | refactor: replace notifier.threads with new SimpleThread UMC API cf5a4ecccfdd | refactor(umc): replace deprecated API with new UMC Python API univention-management-console-module-lib.yaml dbd28d356a92 | chore: add advisory and changelog entries univention-management-console-module-lib (9.0.4-2) dbd28d356a92 | chore: add advisory and changelog entries univention-management-console-module-lib (9.0.4-1) 655260573c7e | refactor: replace notifier.threads with new SimpleThread UMC API univention-management-console-module-join.yaml dbd28d356a92 | chore: add advisory and changelog entries univention-management-console-module-join (12.0.5-4) dbd28d356a92 | chore: add advisory and changelog entries univention-management-console-module-join (12.0.5-3) 655260573c7e | refactor: replace notifier.threads with new SimpleThread UMC API univention-management-console-frontend (4.1.104-1) r56201 | Bug #36914: Adjusted index.html to show warning if IE <= 8 is used univention-management-console (12.0.31-9) cf5a4ecccfdd | refactor(umc): replace deprecated API with new UMC Python API 8eef08031b90 | feat(umc): offer SimpleThread as replacement for notifier.threads.Simple() 453a4abf662d | feat(umc): add thread callback for progress bars, with/without long polling requests univention-management-console (12.0.31-10) dbd28d356a92 | chore: add advisory and changelog entries univention-appcenter.yaml dbd28d356a92 | chore: add advisory and changelog entries univention-appcenter (9.0.8-3) dbd28d356a92 | chore: add advisory and changelog entries univention-appcenter (9.0.8-2) 02abd4bfd782 | refactor(appcenter): remove unused functions 655260573c7e | refactor: replace notifier.threads with new SimpleThread UMC API cf5a4ecccfdd | refactor(umc): replace deprecated API with new UMC Python API univention-admin-diary.yaml dbd28d356a92 | chore: add advisory and changelog entries univention-admin-diary (2.0.7-2) dbd28d356a92 | chore: add advisory and changelog entries univention-admin-diary (2.0.7-1) cf5a4ecccfdd | refactor(umc): replace deprecated API with new UMC Python API ucs-test (10.0.15-15) 655260573c7e | refactor: replace notifier.threads with new SimpleThread UMC API
QA: Environment: master + slave OK * Appcenter: install or uninstall app locally OK * Appcenter: install or uninstall app remote OK * Appcenter/Package Management: install or uninstall debian package OK * Join module: run a joinscript OK * Join module: make initial join OK * Lib: reboot server via the menu entry OK * UDM: LDAP directory tree: search objects in a container OK * UDM: move a object or container OK * Self service: set user profile data OK * Admin diary: add a comment to any entry OK * No tracebacks in logfiles OK * Advisories yet to be tested: * System Setup: Save settings e.g. network settings * System Setup: execute initial join/setup process * System Setup: apply network settings in setup process
OK * System Setup: Save settings e.g. network settings OK * System Setup: execute initial join/setup process OK * System Setup: apply network settings in setup process
<https://errata.software-univention.de/#/?erratum=5.0x764> <https://errata.software-univention.de/#/?erratum=5.0x765> <https://errata.software-univention.de/#/?erratum=5.0x766> <https://errata.software-univention.de/#/?erratum=5.0x767> <https://errata.software-univention.de/#/?erratum=5.0x768> <https://errata.software-univention.de/#/?erratum=5.0x769> <https://errata.software-univention.de/#/?erratum=5.0x770> <https://errata.software-univention.de/#/?erratum=5.0x771>