Bug 44872 - App Setting: Implement setting for an App
App Setting: Implement setting for an App
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.2
Other All
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on:
Blocks: 44747 44977 44978 44991
  Show dependency treegraph
 
Reported: 2017-06-27 13:57 CEST by Dirk Wiesenthal
Modified: 2017-07-13 15:37 CEST (History)
8 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: 2017050321000343
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 2017-06-27 13:57:49 CEST
This is the 4.2 bug for App Settings. App Settings shall be released for 4.2 before 4.1.

+++ This bug was initially created as a clone of Bug #43816 +++

Goal is to allow Apps to specify custom setting that are then applied inside the container / on the host.

Specification is done via a new file: myapp.settings with is dritten in ini format:

[my/setting]
...
[my/second/setting]
...
Comment 1 Dirk Wiesenthal univentionstaff 2017-06-27 14:06:18 CEST
Fixed in
  univention-appcenter 6.0.8-4A~4.2.0.201706271349

I have also fixed Bug#43816 Comment 15 to Bug#43816 Comment 17
Comment 3 Dirk Wiesenthal univentionstaff 2017-07-10 15:51:01 CEST
In
  univention-appcenter 6.0.8-9A~4.2.0.201707101547

Fixed the .env file. I worked on the validation on the frontend and backend side. Also, PasswordInputBox instead of PasswordBox is used.

No visible hint about a required File setting. This widget does not support it. I could hack it into it, but I think it is fine for now.
Comment 4 Dirk Wiesenthal univentionstaff 2017-07-11 13:44:08 CEST
Internal tools have been updated. univention-config-registry files are supported again.

univention-appcenter 6.0.8-10A~4.2.0.201707111343
Comment 5 Felix Botner univentionstaff 2017-07-11 15:48:30 CEST
(1)
Type = Filename

* Inhalt der Datei steht im Log File und im base.conf des Containers, das
  sollte nicht sein
* md5sum der hochgeladenen und der ursprünglichen Datei ist nicht gleich

(2)
4.1 python/appcenter-dev/actions/local_appcenter.py, muss da nicht auch 'configure', 'configure_host', 'settings' damit das nächste 4.1 update das selfservice nicht kaputt macht?

Rest OK soweit
Comment 6 Dirk Wiesenthal univentionstaff 2017-07-12 01:30:07 CEST
(In reply to Felix Botner from comment #5)
> (1)
> Type = Filename
> 
> * Inhalt der Datei steht im Log File und im base.conf des Containers, das
>   sollte nicht sein

OK, skip logging file content

> * md5sum der hochgeladenen und der ursprünglichen Datei ist nicht gleich
> 

Cannot reproduce. Can you show me the files? Was it text file or binary?

> (2)
> 4.1 python/appcenter-dev/actions/local_appcenter.py, muss da nicht auch
> 'configure', 'configure_host', 'settings' damit das nächste 4.1 update das
> selfservice nicht kaputt macht?
> 

Yes. I will open a bug for that. Cannot fix it in a 4.2 bug.

> Rest OK soweit
Comment 7 Felix Botner univentionstaff 2017-07-12 12:04:30 CEST
(In reply to Dirk Wiesenthal from comment #6)
> (In reply to Felix Botner from comment #5)
> > (1)
> > Type = Filename
> > 
> > * Inhalt der Datei steht im Log File und im base.conf des Containers, das
> >   sollte nicht sein
> 
> OK, skip logging file content

OK

> 
> > * md5sum der hochgeladenen und der ursprünglichen Datei ist nicht gleich
> > 
> 
> Cannot reproduce. Can you show me the files? Was it text file or binary?


This happens for files with umlauts, seems to be an encoding issue
Comment 8 Dirk Wiesenthal univentionstaff 2017-07-12 12:46:57 CEST
OK, fixed encoding issues in
  univention-appcenter 6.0.8-12A~4.2.0.201707121245
Comment 9 Felix Botner univentionstaff 2017-07-12 13:13:03 CEST
(In reply to Dirk Wiesenthal from comment #8)
> OK, fixed encoding issues in
>   univention-appcenter 6.0.8-12A~4.2.0.201707121245

hmm, 

i was able to use the app settings once, now i get 

 Ausführung des Kommandos appcenter/config ist fehlgeschlagen:



Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 249, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 320, in _response
    self.finished(request.id, result[0])
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 404, in finished
    self.result(res)
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 408, in result
    self.signal_emit('success', response)
  File "/usr/lib/pymodules/python2.7/notifier/signals.py", line 75, in signal_emit
    self.__signals[ signal ].emit( *args )
  File "/usr/lib/pymodules/python2.7/notifier/signals.py", line 41, in emit
    cb( *args )
  File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 120, in _reply
    self.response(msg)
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 349, in response
    self.__queue += str(msg)
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/message.py", line 305, in __str__
    return Message._formattedMessage(self._id, self._type, self.mimetype, self.command, body, self.arguments)
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/message.py", line 114, in _formattedMessage
    data = json.dumps(body)
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 370, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/dist-packages/simplejson/encoder.py", line 269, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/dist-packages/simplejson/encoder.py", line 348, in iterencode
    return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xae in position 0: invalid start byte

and uploaded file (textfile) is now a binary blob in the container?
Comment 10 Dirk Wiesenthal univentionstaff 2017-07-12 14:51:19 CEST
Fixed decoding issues in
  univention-appcenter 6.0.8-13A~4.2.0.201707121439
Comment 11 Felix Botner univentionstaff 2017-07-12 16:46:37 CEST
OK - app settings
OK - settings file for existing apps
OK - yaml
Comment 12 Janek Walkenhorst univentionstaff 2017-07-13 15:37:53 CEST
<http://errata.software-univention.de/ucs/4.2/96.html>