Bug 42834 - Adjustments of backend routines for integration with new frontend behaviour
Adjustments of backend routines for integration with new frontend behaviour
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-4-errata
Assigned To: Dirk Wiesenthal
Alexander Kläser
:
Depends on:
Blocks: 42625
  Show dependency treegraph
 
Reported: 2016-11-02 17:44 CET by Alexander Kläser
Modified: 2017-01-18 14:48 CET (History)
1 user (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 Alexander Kläser univentionstaff 2016-11-02 17:44:59 CET
... for the ISV Self Service portal, we need to be able to adjust the sizing information of an app (i.e., memory/cpu/disk requirements).
Comment 1 Dirk Wiesenthal univentionstaff 2016-11-03 11:57:52 CET
Added app.sizing = {'10': {'cpu': 2, 'ram': '2 GB', 'disk': '20 GB'}}

Also added appliance attributes
Comment 2 Alexander Kläser univentionstaff 2016-11-04 11:07:11 CET
(In reply to Dirk Wiesenthal from comment #1)
> Added app.sizing = {'10': {'cpu': 2, 'ram': '2 GB', 'disk': '20 GB'}}
>
> Also added appliance attributes

Cool! AFAIS, ApplianceCreate is missing.
Comment 3 Dirk Wiesenthal univentionstaff 2016-11-04 11:25:09 CET
Added in r74106
Comment 4 Alexander Kläser univentionstaff 2016-11-07 17:08:06 CET
Uploading Debian packages does currently not work, cf. the output of the module log file for an upload request:
--------- 8< ---------
07.11.16 16:42:46.837  PROTOCOL    ( INFO    ) : Received UMCP UPLOAD REQUEST 147853336681033-1291
07.11.16 16:42:46.837  MODULE      ( INFO    ) : Executing ['appcenter-selfservice/upload']
07.11.16 16:42:46.838  ADMIN       ( INFO    ) : groups/group: open(): member check duration: 0.00s
07.11.16 16:42:46.839  ADMIN       ( INFO    ) : groups/group: open(): member check duration: 0.00s
07.11.16 16:42:46.840  ADMIN       ( INFO    ) : groups/group: open(): member check duration: 0.00s
07.11.16 16:42:46.840  MODULE      ( PROCESS ) : user: Administrator action: uploaded file 'strace_4.5.20-2.11.201104221439_i386.deb'
07.11.16 16:42:46.840  MODULE      ( PROCESS ) : user: Administrator action: Adding meta file for App(id="testapp", version="1.0"): deb; /var/tmp/univention-manageme
nt-console-frontend/147853336681033-1291Fiogap
07.11.16 16:42:46.841  MODULE      ( PROCESS ) : Adding ['/tmp/tmpw5KA3Z']
07.11.16 16:42:46.895  MODULE      ( INFO    ) : /tmp/tmpw5KA3Z -> strace_4.5.20-2.11.201104221439_i386.deb
07.11.16 16:42:46.897  MODULE      ( WARN    ) : [Errno 2] No such file or directory: '/var/lib/univention-appcenter-selfservice/appcenter/meta-inf/4.1/testapp/packages/i386'
07.11.16 16:42:46.910  PROTOCOL    ( INFO    ) : Sending UMCP RESPONSE 147853336681033-1291
--------- 8< ---------
Comment 5 Alexander Kläser univentionstaff 2016-11-07 17:33:23 CET
I cannot import an existing app:
--------- 8< ---------
$ univention-app selfservice-import 4.1 owncloud82 'App Center Self Service' --clear
Administrator uses selfservice-import: app_id='owncloud82', app_provider='App Center Self Service', clear=True, noninteractive=False, publish=False, ucs_version='4.1', username='Administrator'
Password for Administrator: 
global name 'get_existing_app_dir' is not defined
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 189, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/selfservice.py", line 302, in main
    existing_app_dir = get_existing_app_dir(args.app_id, args.ucs_version)
NameError: global name 'get_existing_app_dir' is not defined
Traceback (most recent call last):
  File "/usr/bin/univention-app", line 90, in <module>
    main()
  File "/usr/bin/univention-app", line 78, in main
    ret = args.func(args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 189, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/selfservice.py", line 302, in main
    existing_app_dir = get_existing_app_dir(args.app_id, args.ucs_version)
NameError: global name 'get_existing_app_dir' is not defined
--------- 8< ---------
Comment 6 Dirk Wiesenthal univentionstaff 2016-11-09 23:47:57 CET
Adding / removing packages works again. Import and removing a version, too.

Upload does not. Also "Download archive" does not.
Comment 7 Alexander Kläser univentionstaff 2016-11-11 12:39:28 CET
Base64 encoded screenshot images need to be decoded, stored to disk and merged with existing images.
Comment 8 Alexander Kläser univentionstaff 2016-11-11 13:00:35 CET
FYI, JavaScript only sends screenshot images that have actually changed [r74343].
Comment 9 Alexander Kläser univentionstaff 2016-11-14 12:35:52 CET
I noticed the following behavior:

Save:
> component_id: "testapp_20161107111034"
> ucs_version: "4.1"
> docker_script_update_available: "/usr/share/univention-docker-container-mode/update_available_custom2"
> update_available: "code"

Load:
> docker_script_update_available: "/usr/share/univention-docker-container-mode/update_available"
> update_available: "/usr/share/univention-docker-container-mode/update_available_custom2"

→ there seems to be switch of values (path + script code) in the backend.
Comment 10 Dirk Wiesenthal univentionstaff 2016-11-15 01:09:13 CET
(In reply to Alexander Kläser from comment #9)
> → there seems to be switch of values (path + script code) in the backend.

Fixed
Comment 11 Dirk Wiesenthal univentionstaff 2016-11-25 02:13:52 CET
This was achieved by also patching univention-appcenter. Notably r74456, r74550. This has to go through QA for 4.1-4's univention-appcenter. One may consider opening a new bug for that? I left the bug's Component unchanged for now.
Comment 12 Dirk Wiesenthal univentionstaff 2016-11-25 02:14:58 CET
Unfortunately, this was r74246 filed under a different bug number.
Comment 13 Dirk Wiesenthal univentionstaff 2016-11-25 02:15:53 CET
(In reply to Dirk Wiesenthal from comment #12)
> Unfortunately, this was r74246 filed under a different bug number.

Oops, wrong bug!
Comment 14 Alexander Kläser univentionstaff 2016-11-25 10:01:07 CET
The new version of the App Provider Portal has been released and this bug will thus be closed.
Comment 15 Dirk Wiesenthal univentionstaff 2016-12-02 13:32:29 CET
This is at least partly univention-appcenter
Comment 16 Alexander Kläser univentionstaff 2016-12-05 18:22:41 CET
I added a new test 20_appcenter/75_umc_query_app_data which writes INI file, META file (containing app ratings) and all README files and verifies the correct UMC output.

ucs-test (6.0.37-18):
r75000 | Bug #42834: minor code adjustments
r74998 | Bug #42834: added more tests for app rating
r74996 | Bug #42834: committed Debian changelog
r74995 | Bug #42834: added 20_appcenter/75_umc_query_app_data


Changes: OK
Code review: OK, AFAIS
YAML file: OK
Merge to 4.2-0: OK

→ VERIFIED
Comment 17 Janek Walkenhorst univentionstaff 2016-12-07 13:48:04 CET
<http://errata.software-univention.de/ucs/4.1/351.html>
Comment 18 Florian Best univentionstaff 2017-01-12 21:21:52 CET
Merge to UCS 4.2 failed → Bug #43334