Bug 57546 - Setting multiple app configuration options at once fails silently
Setting multiple app configuration options at once fails silently
Status: VERIFIED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 5.0
Other Linux
: P3 normal (vote)
: UCS 5.0-8-errata
Assigned To: Dirk Wiesenthal
Johannes Königer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2024-08-27 14:47 CEST by Lukas Zumvorde
Modified: 2024-09-10 13:08 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.034
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Workaround is available
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Zumvorde univentionstaff 2024-08-27 14:47:19 CEST
When using 

univention-app configure <appname> --set <opt1>=<val1> --set <opt2>=<val2> 

no option is getting set. There is also no error message or other indication that nothing has happened. If we check the options afterwards however we can see it. A workaround is to set only one option at a time

univention-app configure <appname> --set <opt1>=<val1>
univention-app configure <appname> --set <opt2>=<val2>

This issue is highly misleading and definitely not the intended behavior. It is unknown if setting options in the UMC is also impacted.

The issue was already seen for the apps keycloak and ox-connector. This indicates that it is a general issue.
Comment 2 Daniel Tröder univentionstaff 2024-08-27 17:12:53 CEST
You have to use:

univention-app configure <appname> --set <opt1>=<val1> <opt2>=<val2>
Comment 3 Lukas Zumvorde univentionstaff 2024-08-28 08:58:55 CEST
@Daniel that explains what we did wrong. It is still inconsistent with how other UCS Tools are used (UCR) and no error message indicates a user error. Therefore i would like to keep this bug open.
Comment 4 Dirk Wiesenthal univentionstaff 2024-09-10 10:18:15 CEST
(In reply to Lukas Zumvorde from comment #0)
> When using 
> 
> univention-app configure <appname> --set <opt1>=<val1> --set <opt2>=<val2> 
> 
> no option is getting set.

This should definitely not be true. <opt2>=<val2> would have been set while <opt1>=<val1> is discarded. I think the use cases for this feature in argparse are things like `alias change_keycloak=univention-app configure keycloak --set x=y` which could then be overridden.

This is not really a use case for us, though. I changed it with

univention-appcenter.yaml
2ee5cf7ee4d8 | Bug #57546: YAML

univention-appcenter (9.0.12-3)
f0d1c6e811e4 | Bug #57546: univention-app can now be called with multiple --set args

ucs-test (10.0.22-69)
f0d1c6e811e4 | Bug #57546: univention-app can now be called with multiple --set args

While at it, I did the same for --unset.
Cherry-picked to 5.1-0 and 5.2-0.
Comment 5 Johannes Königer univentionstaff 2024-09-10 13:08:08 CEST
New automated test looks good both in Jenkins and when run locally, and no other tests are failing because of this change. Manual testing was also OK.