Skip to content

Add container repository destroy GraphQL mutation

🌳 Context

In !44926 (merged), we added a graphQL API to list container repositories.

In !46560 (merged), we added a graphQL API to have the details of a single container repository.

Time to add mutations. This MR adds the graphQL mutation type to destroy a container repository.

In short, we are porting this rest API to graphQL.

Note that destroying a container repository can take time as it could imply several network requests to the container registry (which for now are slow operations). That's why we use a background worker.

This MR is part of my effort to improve the Package Team APIs. As such, it is not directly linked to an issue but the aim here is to unblock the frontend work of #276432 (closed).

This MR was created during a pair programming session with @nmezzopera / @sabrams. They have been appropriately flagged as co-authors in the git commit.

🔬 What does this MR do?

  • Add the DestroyContainerRepository mutation
  • Add the related specs

📸 Screenshots (strongly suggested)

Screenshot_2020-11-09_at_11.10.22

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by David Fernandez

Merge request reports