Bug 53666 - univention-upgrade traceback when updating with updatable apps
univention-upgrade traceback when updating with updatable apps
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Christian Castens
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-08-16 17:46 CEST by Arvid Requate
Modified: 2022-02-16 12:06 CET (History)
7 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.343
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021112521000229
Bug group (optional): bitesize, 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 Arvid Requate univentionstaff 2021-08-16 17:46:12 CEST
A partner reported the following error when running univention-upgrade:

==================================================================
Starting univention-upgrade. Current UCS version is 5.0-0 errata68  
  
Checking for local repository:                          none  
Checking for package updates:                           none  
Checking for app updates:                               found  
  
The following apps can be upgraded:  
  
Wekan: Version 5.41 can be upgraded to 5.48  
Starting univention-app upgrade at Thu Aug 12 22:41:37 2021...  
Most of the output for App upgrades goes to /var/log/univention/appcenter.log  
  
Starting app upgrade                                   Traceback in univention-upgrade:  
Traceback (most recent call last):  
 File "/usr/lib/python3/dist-packages/univention/updater/scripts/upgrade.py", line 430, in do_update  
   update_available = performUpdate(options, checkForUpdates=options.check, silent=False)  
 File "/usr/lib/python3/dist-packages/univention/updater/scripts/upgrade.py", line 139, in performUpdate  
   if func(options, checkForUpdates, silent):  
 File "/usr/lib/python3/dist-packages/univention/updater/scripts/upgrade.py", line 314, in do_app_updates  
   pwdfile=options.pwdfile.name if options.pwdfile else None,  
 File "/usr/lib/python3/dist-packages/univention/appcenter/actions/__init__.py", line 167, in call_safe  
   return cls.call(**kwargs**)  
 File "/usr/lib/python3/dist-packages/univention/appcenter/actions/__init__.py", line 175, in call  
   return obj.call_with_namespace(namespace)  
 File "/usr/lib/python3/dist-packages/univention/appcenter/actions/__init__.py", line 181, in call_with_namespace  
   result = self.main(namespace)  
 File "/usr/lib/python3/dist-packages/univention/appcenter/actions/upgrade.py", line 75, in main  
   for app in apps:  
TypeError: 'App' object is not iterable
==================================================================

Running univention-app upgrade wekan manually worked fine though.
Comment 1 Dirk Wiesenthal univentionstaff 2021-08-17 09:43:06 CEST
This is not Wekan alone. This is every time univention-upgrade is used with any App installed that could be upgraded.

The internal API of "upgrade" has changed. Apparently, we forgot to look for usage of that API in the univention-updater package.
Comment 2 Nico Gulden univentionstaff 2021-12-09 12:51:44 CET
Reported for Jitsi Meet and OpenVPN4UCS as well at Ticket#2021112521000229.
Comment 3 Florian Best univentionstaff 2022-01-30 23:15:30 CET
(In reply to Dirk Wiesenthal from comment #1)
> This is not Wekan alone. This is every time univention-upgrade is used with
> any App installed that could be upgraded.
How to reproduce? Just having a app which provides an upgrade?

> The internal API of "upgrade" has changed. Apparently, we forgot to look for
> usage of that API in the univention-updater package.
Where did it change? In an erratum or in UCS 5.0 ? Which bug number?
Comment 4 Dirk Wiesenthal univentionstaff 2022-01-30 23:18:31 CET
(In reply to Florian Best from comment #3)
> (In reply to Dirk Wiesenthal from comment #1)
> > This is not Wekan alone. This is every time univention-upgrade is used with
> > any App installed that could be upgraded.
> How to reproduce? Just having a app which provides an upgrade?

Yes, any App will do

> 
> > The internal API of "upgrade" has changed. Apparently, we forgot to look for
> > usage of that API in the univention-updater package.
> Where did it change? In an erratum or in UCS 5.0 ? Which bug number?

Yes, broken since UCS 5.0-0 errata0. It came with the "you can install multiple Apps at once" feature.
The library assumes a list since then (for app in apps)
Comment 7 Christian Castens univentionstaff 2022-02-09 12:32:54 CET
Univention-updater was causing a Python TypeError because it did not
take recent changes to the App Center app upgrade API (from commit
8ad8e47a of Bug #40225) into account.
The app upgrade module expects a list of apps instead of a single app.

Successful build
Package: univention-updater
Version: 15.0.3-75A~5.0.0.202202091136
Branch: ucs_5.0-0
Scope: errata5.0-1


c3e36fa5 changes to base/univention-updater/modules/univention/updater/scripts/upgrade.py

c5b1a969 yaml
Comment 8 Florian Best univentionstaff 2022-02-14 11:16:06 CET
OK: upgrade via univention-upgrade now confirming new API giving apps as list
OK: YAML