Skip to content

Add DeletePagesDeployment mutation

Janis Altherr requested to merge janis-add-delete-pages-deployment-mutation into master

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

  1. Set up your GDK to support Runners and Pages
  2. Create a Pages project, by creating a new project with the "pages/Plain HTML" template within a group
  3. ensure the pipeline runs so that a pages deployment is created.
  4. 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
      }
    }
  }
}
  1. Now run the below mutation:
mutation DeletePagesDeployment {
  deletePagesDeployment(input: { id: "<PAGES_DEPLOYMENT_GLOBAL_ID>" }) {
    errors
  }
}
  1. 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

Merge request reports