Draft: Add artifact registry hosted repository delete mutation
What does this MR do and why?
Adds the hosted repository delete mutation for Artifact Registry (monolith/S07 Step 4), on top of the S07 GraphQL foundation (!248967 (merged)).
Mutations::ArtifactRegistry::Repositories::Delete takes the repository name (identity only) and calls the S02 client delete_repository, which is idempotent: it succeeds even on a 404. It returns the standard payload errors. All experiment (19.3), behind the dark artifact_registry_ui flag.
A flag-off delete raises a top-level ResourceNotAvailable with no client call; an AR 403 renders a top-level ResourceNotAvailable; a delete 404 succeeds idempotently rather than surfacing an error.
The frontend typedefs (graphql/typedefs.graphql) drop the local @client declaration of Mutation.artifactRegistryRepositoryDelete, which the merged Vue write UI declared while there was no backend. Now that this MR adds the real server mutation, keeping the local declaration would collide during the Apollo schema build. The delete flow still runs on the local mock resolver through the remaining @client operation.
References
- Spec:
docs/specs/monolith/S07-repository-crud.md(Approved), Mutations and Error cases - Plan:
docs/plans/monolith/2026-07-17-repository-crud.md(merged), Step 4 - Builds on the S07 foundation: !248967 (merged)
- Shared type and enums: !248690 (merged) (monolith/S04), merged
Screenshots or screen recordings
N/A. Schema only, behind a dark flag.
How to set up and validate locally
- Point the client at a local Artifact Registry service and enable the flag:
org = Organizations::Organization.first Gitlab.config.artifact_registry['api_url'] = 'http://127.0.0.1:8090' Feature.enable(:artifact_registry_ui, org) - Delete an existing repository and confirm empty
errors:mutation = <<~GQL mutation($name: String!) { artifactRegistryRepositoryDelete(input: { name: $name }) { errors } } GQL user = org.organization_users.first.user pp GitlabSchema.execute(mutation, variables: { 'name' => 'my-repo' }, context: { current_user: user, current_organization: org }).to_h - Confirm deleting an already-absent repository still succeeds with empty
errors(idempotent); an AR 403 renders a top-levelResourceNotAvailable; and with the flag off the mutation raises a top-levelResourceNotAvailablewith no client call.
Request spec:
bundle exec rspec ee/spec/requests/api/graphql/mutations/artifact_registry/repositories/delete_spec.rbMR acceptance checklist
Evaluate this MR against the MR acceptance checklist.