Page MenuHomePhabricator

Remove home_page_url from gitlab-settings
Closed, ResolvedPublic

Description

gitlab-settings is used to configure some settings in GitLab. One of those settings is home_page_url which defines the Redirect to this URL when not logged in.. For a better user experience non-logged-in users are redirected to /explore instead of the login page.

During GitLab failovers this url changes because the hostname changes. This requires additional manual steps to gitlab-settings and the instances.

The sre.gitlab.failover cookbook uses the gitlab-restore.sh script which already updates the home_page_url:

echo "ApplicationSetting.last.update(home_page_url: '${GITLAB_URL}explore')" | /usr/bin/gitlab-rails console && break || sleep 15

So this setting should be removed from gitlab-settings and managed entirely by puppet and the cookbook. This also reduces the number of settings files in gitlab-settings, because all production and replica hosts could share the same config file.

See also https://docs.gitlab.com/api/settings/

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
remove home_page_url from gitlab-settingsrepos/releng/gitlab-settings!76jeltoremove-home-page-urlmain
Customize query in GitLab

Event Timeline

Change #1174718 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/cookbooks@master] sre.gitlab.failover: manage home_page_url in cookbook

https://gerrit.wikimedia.org/r/1174718

Jelto triaged this task as Medium priority.Jul 31 2025, 1:34 PM
Jelto moved this task from Incoming to Work in Progress on the collaboration-services board.
Jelto added a subscriber: brennen.

This setting is managed by the cookbook now, see changes above. I'll resolve the task.

cc @brennen

Change #1174718 merged by jenkins-bot:

[operations/cookbooks@master] sre.gitlab.failover: manage home_page_url in cookbook

https://gerrit.wikimedia.org/r/1174718