Skip to content

Remove unnecessary call to UpdatePagesConfigurationService

Jacob Vosmaer requested to merge jv-remove-pages-config-update-on-delete into master

What does this MR do?

A Project may have a Pages site associate with it. This site can be removed with Project#remove_pages. In Project#remove_pages, we call UpdatePagesConfigurationService. This MR removes that call.

The purpose of UpdatePagesConfigurationService is to do two things:

  1. Make sure my/pages-site/config.json is up to date
  2. If my/pages-site/config.json changed, signal the Pages process to re-read its site index

The first part is pointless when removing a Pages site, because even if config.json changed, we remove it right after we updated it.

The second part could be useful, but only if config.json is guaranteed to change. Because then the Pages process would rescan all sites and notice the one we are deleting is gone. However, we cannot even count on that. Because config.json is supposed to be up to date, making the whole call to UpdatePagesConfigurationService a no-op. Or to put it differently, the only case where the call isn't a no-op is if config.json is out of date at the time the Pages site gets removed, which should not be the case.

I came across this while working on #230694 (closed).

Screenshots

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 Jacob Vosmaer

Merge request reports

Loading