Bug 48718 - Make univention.admindiary imports optional
Make univention.admindiary imports optional
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Admin Diary
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4
Assigned To: Dirk Wiesenthal
Arvid Requate
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-20 16:19 CET by Florian Best
Modified: 2019-03-12 13:40 CET (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-02-20 16:19:15 CET
It seems every package in UCS now depend on univention.admindiary.

If it's broken, etc. the servies won't start:
Traceback (most recent call last):
  File "/usr/bin/univention-app", line 91, in <module>
    main()
  File "/usr/bin/univention-app", line 72, in main
    for action_name, action in all_actions():
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 294, in all_actions
    _import()
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 304, in _import
    __import__('univention.appcenter.actions.%s' % pymodule_name)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/install.py", line 38, in <module>
    from univention.appcenter.actions.install_base import InstallRemoveUpgrade
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/install_base.py", line 44, in <module>
    from univention.admindiary.events import APP_ACTION_START, APP_ACTION_SUCCESS, APP_ACTION_FAILURE
ImportError: cannot import name APP_ACTION_START

I think we should make it optional and maybe try-except around the import.
Comment 1 Dirk Wiesenthal univentionstaff 2019-02-26 14:23:32 CET
Added univention-admin-diary-client (>= 1.0.0-29) to univention-join, univention-updater, univention-appcenter, univention-directory-manager-modules
Comment 2 Dirk Wiesenthal univentionstaff 2019-02-26 14:25:12 CET
This is not really "making import optional". But it prevents errors like the one above. Making it optional would require a lot of ifs and excepts. The Admin Diary client actually comes with every ucs-server-role.
Comment 3 Arvid Requate univentionstaff 2019-02-26 19:53:48 CET
Ok, but the packages need to get an updated changelog version, and get rebuilt to make the debian/control changes effective:

* univention-join
* univention-updater
* univention-appcenter (optional)
Comment 4 Dirk Wiesenthal univentionstaff 2019-02-26 20:41:38 CET
Built
  univention-updater 14.0.0-13A~4.4.0.201902262034
and
  univention-join 11.0.1-14A~4.4.0.201902262037
Comment 5 Arvid Requate univentionstaff 2019-02-26 21:05:55 CET
Ok
Comment 6 Florian Best univentionstaff 2019-03-12 13:40:43 CET
UCS 4.4 has been released:
 https://docs.software-univention.de/release-notes-4.4-0-en.html
 https://docs.software-univention.de/release-notes-4.4-0-de.html

If this error occurs again, please use "Clone This Bug".