GraphQL mutation for bulk deletion of package assets
Context
When a package is uploaded to the GitLab Package Registry it can contain one or many files. For package manager formats that allow duplicate uploads, a single package name/version can contain hundreds of files.
Problem to solve
The problem is that these files can be quite large and your cost of storage can quickly add up. Right now, your only option is to use the user interface or the API to delete one file at a time. This is inefficient for heavy users of the package registry who likely have dozens of projects and thousands of files that need to be deleted.
As a result, you likely have just been paying more for additional storage.
Proposal
Expand on the existing GraphQL API to add a mutation that allows users to bulk delete assets associated with a package or project.
Further details
Once the [background job] is available, update the selected package assets so that they are marked as destroyed
. This new mutation will be used to power the user interface and allow users to bulk delete package assets from the package details page.
Documentation
- Update the GraphQL Reference documentation
Permissions
- Permissions to use the API will be limited to Admin+ (the same for deleting a single package asset.
Related to #227715 (closed).
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.