Skip to content

Resolve "Rename "root_directory" to "serve_directory" in Pages"

What does this MR do and why?

This MR renames the root_directory property to serve_directory to avoid confusion with an artifact's root(Directory) in GitLab Pages downstream.

Context: gitlab-pages!859 (comment 1379701654)

This API value was not used yet so it's an insignificant change right now.

How to set up and validate locally

  1. Ensure all migrations have run with bin/rails db:migrate RAILS_ENV=development
  2. Ensure your Pages installation is running locally.
  3. Create a pages deployment, for example by cloning this example repository: https://gitlab.com/pages/plain-html
  4. Wait for the Pipeline to be completed.
  5. Verify that the database table pages_deployments now includes a column serve_directory, and your newly created deployment contains the default value "public" in this column
  6. Access the internal API and verify the following request contains the value public at lookup_paths[0].serve_directory:
GET /api/v4/internal/pages?host=<the project's pages domain> HTTP/1.1
Gitlab-Pages-Api-Request: <API Token>
Host: gdk.test:3000
  1. Change the value in the database and verify the API response changes accordingly.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #409997 (closed)

Edited by Janis Altherr

Merge request reports

Loading