Skip to content

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

Design

#493842[Registry-with-upstream.png]

Solution

1. Clear all button

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 to Clear all caches to make the scope clearer.

2. Clear cache button (per upstream row)

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?

Edited by Rahul Chanila