Bug 41853 - App Center Self Service: Dev-Tools
App Center Self Service: Dev-Tools
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P1 normal (vote)
: UCS 4.1-3-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on: 41869
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-25 22:52 CEST by Dirk Wiesenthal
Modified: 2016-09-22 07:18 CEST (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 Dirk Wiesenthal univentionstaff 2016-07-25 22:52:08 CEST
We need dev Tools for working with the Test App Center / Self Service via command line.

First step: univention-app extensions.
Comment 1 Dirk Wiesenthal univentionstaff 2016-07-25 22:59:38 CEST
univention-app dev-list

univention-app dev-status APPID

univention-app dev-download 4.1 COMPONENTID --include-packages

univention-app dev-new-version 4.1 APPID --new-app-version=2.0

univention-app dev-upload --clear 4.1 COMPONENTID appid.ini screenshot=myscreenshot.png README_EN *.deb

univention-app dev-publish 4.1 COMPONENTID

univention-app dev-new-version-upload-publish (three actions combined in one)


univention-appcenter 5.0.21-30.202.201607252257
Comment 2 Felix Botner univentionstaff 2016-07-26 14:37:36 CEST
OK - univention-app dev-*
OK - yaml

But im not sure if univention-appcenter is the right place for the selfservice dev tools. I would prefer to put these tools in a different source package as the univention-appcenter package becomes too overloaded (univention-appcenter errata for every change in the selfservice dev tools?).

For now OK.
Comment 3 Felix Botner univentionstaff 2016-07-28 17:09:50 CEST
As discussed, please revert the changes as they break the updater test 

With this patch actions/__init__.py raises instead of returing 10 in the case of an error.

This breaks univention-upgrade.app_upgrade_search.call (if for example the appcenter is not reachable, which is the case in many update tests).

http://jenkins.knut.univention.de:8080/job/UCS-4.1/job/UCS-4.1-2/job/AutotestJoin/99/SambaVersion=s3,Systemrolle=member/#showFailuresLink

We need a change in univention-upgrade (ingnore app_upgrade_search.call() exceptions) for this patch.
Comment 4 Dirk Wiesenthal univentionstaff 2016-07-28 17:24:24 CEST
Reverted in
  univention-appcenter 5.0.21-32.204.201607281722
Comment 5 Dirk Wiesenthal univentionstaff 2016-07-28 17:26:59 CEST
For reference: r71230 can be used to again fix this bug. Cannot be applied as is because of local_appcenter.py which has seen a patch due to Bug#39551
Comment 6 Stefan Gohmann univentionstaff 2016-08-02 07:14:21 CEST
If I see it correctly, no changes are in SVN and we can move it to 4.1-3-errata.
Comment 7 Dirk Wiesenthal univentionstaff 2016-08-14 02:03:36 CEST
Unreverted
Comment 8 Felix Botner univentionstaff 2016-08-17 15:08:45 CEST
Why do we need self services management tools in our univention-appcenter package?
I think this is a bad idea.

 * every change on the services management tools results in a errata for
   univention-appcenter
 * one has to install UCS to use the self services management tools
 * as we need a set of bash scripts for this anyway (to enable ISV's to
   manage the self service via cmdline without the need to setup UCS) 
   i don't see the point of this

Please speak to stefan if we really want to do this, otherwise revert the changes.

I would prefer something like this.

-> curl -Ssf https://selfservice.software-univention.de/selfservice.sh | bash -s -- dev-new-version --username ...
Comment 9 Dirk Wiesenthal univentionstaff 2016-08-18 00:39:49 CEST
You are right, there needs to be a Non-UCS-script at some point in time.

I thought it would be good if first, the functionality is checked. In a second step I would create a separate script.

Anyway, now the script is here:
  https://selfservice.software-univention.de/appcenter-selfservice/univention-appcenter-selfservice

It is Python (because I really do not want to do argument parsing, response parsing, error messages in bash). And it is somehow based on univention-app. This does all the argparse / subparser stuff for me plus some subprocessing and logging.

Also, I tested all of it with univention-app.

As it had to be UCS independent, I copied _a lot_ of code from univention-appcenter, making the script ~600 lines long.
Comment 10 Dirk Wiesenthal univentionstaff 2016-08-18 00:56:13 CEST
For univention-appcenter, there is still some QA work. I changed call() to not return 10 when Abort() is raised. If one needs this "feature", or does not want to change too much in existing code, call_safe() has been added.
Comment 11 Felix Botner univentionstaff 2016-08-19 11:30:47 CEST
please just fix the univention-appcenter's yaml file here, i opened a new bug #42060 for the self service tool.

FAIL - YAML (Added a couple of extensions to "univ..., Version)

OK - reverted
OK - upgrade uses call_safe (updater test OK)
Comment 12 Dirk Wiesenthal univentionstaff 2016-09-02 13:13:50 CEST
Removed from YAML
Comment 13 Felix Botner univentionstaff 2016-09-05 14:04:26 CEST
OK