Bug 55467 - App version pinning
App version pinning
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Peter Stoll
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-11-29 15:07 CET by Lukas Rettler
Modified: 2023-02-01 17:24 CET (History)
3 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?: Yes
School Customer affected?: Yes
ISV affected?: Yes
Waiting Support: Yes
Flags outvoted (downgraded) after PO Review: Yes
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 Lukas Rettler univentionstaff 2022-11-29 15:07:34 CET
Customers sometimes want to stop at specific app versions. Currently, this is not possible selectively. Either disable updates for all apps or allow them for all apps.

We need a mechanism to point apps to a specific version.
Comment 1 Lukas Rettler univentionstaff 2023-01-13 10:24:22 CET
Background: 
* Requirements and customizations 
  It is not automatically every new app version compatible with the current requirements or customizations. e.g. Nextcloud 24 -> 25 or U@S 
* Update to a specific version 
  We can install a specific app version, but not update to a specific version.


Workaround: 
* Block app installation by removing variable "repository/app_center/server: appcenter.software-univention.de" 
  Problem: all commands with "univention-app" are broken! 
* Uninstall app -> install with desired version 
  Problem: automatic app updates must be disabled 
  Problem: you could lose your app configuration
Comment 3 Dirk Wiesenthal univentionstaff 2023-01-18 17:26:01 CET
Two new actions:

univention-app pin $appid
univention-app unpin $appid

One idea would be:
Simply add a UCRV appcenter/apps/$appid/pinned=true
and an install_check.py

class MustNotBePinned(SingleRequirement, HardRequirement):
  def test_upgrade(self, app):
    ...


We should also give a hint in the frontend (umc/js/appcenter/requirements.js)
Comment 4 Dirk Wiesenthal univentionstaff 2023-01-20 10:42:14 CET
We should also not allow uninstalling the App.

A new action can be created by the new file python/appcenter/actions/pin.py
Comment 5 Peter Stoll univentionstaff 2023-01-24 15:53:17 CET
Implementation of pin/unpin command is:

univention-app pin $appid
univention-app pin --unpin $appid
Comment 6 Peter Stoll univentionstaff 2023-01-26 12:53:36 CET
15915e8ac1 Bug #55467: Added action allowing to pin and unpin Apps and prohibit update and removal of pinned Apps
9388ebafef Bug #55467: Message added to App Center when trying to update or delete a pinned app
22f1b811c9 Bug #55467: Added advisory YAML

MR: https://git.knut.univention.de/univention/ucs/-/merge_requests/630

Package: univention-appcenter
Version: 9.0.3-8A~5.0.0.202301261250
Branch: ucs_5.0-0
Scope: errata5.0-2
Comment 7 Peter Stoll univentionstaff 2023-01-30 15:46:25 CET
(In reply to Peter Stoll from comment #6)

Some updates:

15915e8ac1 Bug #55467: Added action allowing to pin and unpin Apps and prohibit update and removal of pinned Apps
9388ebafef Bug #55467: Message added to App Center when trying to update or delete a pinned app
22f1b811c9 Bug #55467: Added advisory YAML
184a3a3a54 Bug #55467: Updated advisory YAML
1339e8a85e Bug #55467: Updated advisory YAML
d1ee777337 Bug #55467: Wording
1bc176ea5d Bug #55467: Added solution in appcenter if App is pinned

Package: univention-appcenter
Version: 9.0.3-9A~5.0.0.202301301532
Branch: ucs_5.0-0
Scope: errata5.0-2
Comment 8 Dirk Wiesenthal univentionstaff 2023-01-31 15:54:01 CET
Pinning / unpinning: OK
UMC error messages: OK
YAML: OK