Add DeletePagesDeployment mutation
What does this MR do and why?
This MR adds a mutation to manually delete Pages deployments, part of solving the servity 1 / priority 1 incident of gitlab-com/content-sites/handbook#252 (closed)
How to set up and validate locally
- Set up your GDK to support Runners and Pages
- Create a Pages project, by creating a new project with the "pages/Plain HTML" template within a group
- ensure the pipeline runs so that a pages deployment is created.
- obtain the deployment's global ID with the following Graphql Query:
query GetNamespacePagesDeployments {
namespace(fullPath: "<PATH OF THE GROUP>") {
pagesDeployments {
nodes {
id
active # this should be true
}
}
}
}
- Now run the below mutation:
mutation DeletePagesDeployment {
deletePagesDeployment(input: { id: "<PAGES_DEPLOYMENT_GLOBAL_ID>" }) {
errors
}
}
- Now run the query again and you should either see the "active" property of teh deployment switched to "false", or not get a result for that deployment at all (if the cron job deleting it already ran)
Edited by Janis Altherr