Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable git_data_dirs #316

Open
tipmg opened this issue May 16, 2019 · 1 comment
Open

Variable git_data_dirs #316

tipmg opened this issue May 16, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@tipmg
Copy link

tipmg commented May 16, 2019

Hello. I found a mistake in manifests/custom_hook.pp
The part from code:
} elsif $::gitlab::git_data_dir {
$_repos_path = "${::gitlab::git_data_dir}/repositories"

Variable git_data_dir is not exist. There is git_data_dirs variable in the module. I fixed it and created pull request here - #315

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.10
  • Ruby:
  • Distribution:
  • Module version: 4.0.1

How to reproduce (e.g Puppet code you use)

5.5.10

What are you seeing

What behaviour did you expect instead

Output log

## Any additional information you'd like to impart
@LongLiveCHIEF LongLiveCHIEF added the bug Something isn't working label May 16, 2019
@LongLiveCHIEF
Copy link
Contributor

LongLiveCHIEF commented May 16, 2019

Thanks for reporting. I made some comments in your PR that explain why the fix you proposed won't work.

Since gitlab 8.14+ (or somewhere thereabouts), the git_data_dir was changed to git_data_dirs, and accepts a Hash as a configuration. This means there could be multiple git data paths.

Since 11.x for new installations, it is also default that repos are stored on disk using a unique hash, and not the their project pathname.

A quick fix would be to make the repos_path param of the custom_hook required, and to add a note that projects must be saved by name instead of ID in the admin settings dashboard.

However, if they've already got an installation of gitlab where git project data is saved by project id
hash, then the custom hooks won't work at all as currently designed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants