Skip to content

Do not set default values for custom_hook_dir in 13-0-stable

John Cai requested to merge jc-fix-custom-hooks-in-13-0 into 13-0-stable

This reverts commit 4cd8d0c5, reversing changes made to 382ead9c.

NOTE: this is a patch fix going into 13-0-stable

fixes: #2850 (closed)

This commit introduced a regression for customers who install from source and have their custom_hooks_dir configured in their gitlab-shell/config.yml file. We have code that will fall back to using config.yml if the custom_hooks_dir from gitaly's config.toml is empty: https://gitlab.com/gitlab-org/gitaly/-/blob/master/ruby/gitlab-shell/lib/gitlab_config.rb#L12

However, since we set a default value when the custom_hooks_dir is empty, this means we effectively cut off that default code path from retrieving the config from config.yml.

Removing the default should be safe because when custom_hooks_dir is nil or empty, the legacy config gitlab-shell/config.yml is relied upon.

note: we don't need to backport this, because in 13.1 we will remove support for reading from config.yml.

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading