Add clear upstream & registry cache buttons on Maven virtual registry details page
Context
The APIs implemented in Virtual registry: clear upstream cache (#538327 - closed) allows implementing the Clear cache
button for the upstream & Clear all
button for the registry in the frontend
APIs
- Clear maven virtual registry cache entries: https://docs.gitlab.com/api/maven_virtual_registries/#delete-cache-entries-for-a-virtual-registry
- Clear maven upstream cache entries: https://docs.gitlab.com/api/maven_virtual_registries/#delete-cache-entries-for-an-upstream-registry
Design
#493842[Registry-with-upstream.png]
Solution
Clear all
button
1. This action should have a confirmation modal since it affects all cache entries for exclusive upstream registries.
Proposal:
-
Add confirmation modal, with wordings:
Clear all cache?
This will delete all cached packages for exclusive upstream registries in this virtual registry. If any upstream is unavailable or misconfigured after clearing, jobs that rely on those packages may fail.
Are you sure you want to continue?
-
Rename button: From
Clear all
toClear all caches
to make the scope clearer.
Clear cache
button (per upstream row)
2. This action should have a confirmation modal since it is a disruptive action.
Proposal:
-
Keep the "Clear cache" button on the list view, but require a confirmation modal, with wordings:
Clear cache for [upstream name]?
This will delete all cached packages for this upstream and re-fetch them from the source. If the upstream is unavailable or misconfigured, jobs may fail.
Are you sure you want to continue?