Bug 40225 - Allow installation of multiple (depending) Apps at once
Allow installation of multiple (depending) Apps at once
Status: VERIFIED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 5.0
Other Linux
: P5 enhancement (vote)
: UCS 5.0
Assigned To: Dirk Wiesenthal
Jürn Brodersen
:
Depends on:
Blocks: 51819
  Show dependency treegraph
 
Reported: 2015-12-11 14:14 CET by Dirk Wiesenthal
Modified: 2020-08-13 12:15 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Feature Request
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?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018101021001246
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2015-12-11 14:14:32 CET
An App cannot be installed if the RequiredApps are not installed. The user gets an error message and a button to open this required App. There, she may install the app. After that she has to go back and install the first app again.

It would be better if the App Center would suggest installing all Apps together.

Problems: Multiple READMEs could be shown, multiple LICENCEs need to be accepted.

RequiredAppsInDomain would probably install these apps locally (instead of providing another UI for placing the app).
Comment 1 Dirk Wiesenthal univentionstaff 2020-07-27 00:04:14 CEST
Lib functions (and CLI) updated in
  univention-appcenter 9.0.0-7A~5.0.0.202007270003

The following things should work now:

univention-app install self-service  # installs self-service-backend as well

univention-app install wekan rocketchat  # installs both

univention-app install ucsschool-kelvin-rest-api  # aborts due to settings in ucsschool

univention-app install ucsschool ucsschool-kelvin-rest-api --set ucsschool/join/create_demo=yes ucsschool/kelvin/log_level=DEBUG  # assigns settings correctly

univention-app remove self-service-backend  # breaks as self-service is still installed

univention-app remove self-service-backend self-service  # works, but self-service is removed first


Unittests exist for the dependency resolving and a very superficial "univention-app install" call. The actual installation (and the settings part...) are not tested by unittests.

For the unit tests I updated:
  univention-unittests 2.0.0-12A~5.0.0.202007262348
  univention-directory-manager-modules 15.0.2-12A~5.0.0.202007270001

(985c67d0 and 5b4889e2)
Comment 2 Florian Best univentionstaff 2020-07-28 09:53:23 CEST
I see 3 tracebacks:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py", line 225, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/upgrade.py", line 86, in main
    return self.do_it(args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/install_base.py", line 127, in do_it
    self._show_license(app, args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/upgrade.py", line 120, in _show_license
    if app.license_agreement != self.old_app.license_agreement:
AttributeError: 'NoneType' object has no attribute 'license_agreement'

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 321, in _response
    result = _multi_response(self, request)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 443, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 289, in _fake_func
    yield function(self, *args)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/mixins.py", line 158, in progress
    ret = progress_obj.poll()
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/mixins.py", line 102, in poll
    six.reraise(self.exc_info[1], None, self.exc_info[2])
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 312, in _thread
    result = _multi_response(self, request)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 443, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 289, in _fake_func
    yield function(self, *args)
  File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/appcenter/__init__.py", line 484, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py", line 219, in call
    return obj.call_with_namespace(namespace)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py", line 225, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/install.py", line 69, in main
    for app in apps:
TypeError: 'App' object is not iterable

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py", line 225, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/install.py", line 69, in main
    for app in apps:
TypeError: 'App' object is not iterable
Comment 3 Florian Best univentionstaff 2020-07-31 09:54:17 CEST
And another traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py", line 225, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/remove.py", line 56, in main
    return self.do_it(args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/install_base.py", line 101, in do_it
    apps = resolve_dependencies(args.app, action)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/utils.py", line 528, in resolve_dependencies
    utils_logger.info('Resolving dependencies for %s' % ', '.join(app.id for app in apps))
TypeError: 'App' object is not iterable
Comment 4 Dirk Wiesenthal univentionstaff 2020-08-11 09:07:47 CEST
The overall functionality works. The tracebacks are fixed. There may be some issues with the new check functions (run before install/upgrade/remove), but the App Center tests currently have a lot of other issues that need to be analyzed.
Comment 5 Jürn Brodersen univentionstaff 2020-08-11 10:02:59 CEST
Tested with the dashboard app:
Dependencies are automatically installed -> OK