Bug 258922 - www/gitlab-ce backup TypeError: no implicit conversion of nil into String
Summary: www/gitlab-ce backup TypeError: no implicit conversion of nil into String
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Matthias Fechner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-04 13:21 UTC by Anton Evel
Modified: 2021-10-05 10:16 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mfechner)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Evel 2021-10-04 13:21:37 UTC
Before upgrade gitlab-ce from 14.2.2 to 14.3.2 one should make a backup. While backup creating I have

[10-04 3:28pm] root@mail [~] %> su -l git -c "cd /usr/local/www/gitlab-ce && 
rake gitlab:backup:create RAILS_ENV=production --trace"
** Invoke gitlab:backup:create (first_time)
** Invoke gitlab_environment (first_time)
** Execute gitlab_environment
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:backup:create
** Invoke gitlab:backup:db:create (first_time)
** Invoke gitlab_environment
** Execute gitlab:backup:db:create
2021-10-04 15:30:59 +0300 -- Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... [DONE]
2021-10-04 15:31:05 +0300 -- done
** Invoke gitlab:backup:repo:create (first_time)
** Invoke gitlab_environment
** Execute gitlab:backup:repo:create
2021-10-04 15:31:05 +0300 -- Dumping repositories ...
rake aborted!
TypeError: no implicit conversion of nil into String
/usr/local/www/gitlab-ce/lib/backup/gitaly_backup.rb:75:in `absolute_path'
/usr/local/www/gitlab-ce/lib/backup/gitaly_backup.rb:75:in `bin_path'
/usr/local/www/gitlab-ce/lib/backup/gitaly_backup.rb:28:in `start'
/usr/local/www/gitlab-ce/lib/backup/repositories.rb:13:in `dump'
/usr/local/www/gitlab-ce/lib/tasks/gitlab/backup.rake:114:in `block (4 levels) in <top (required)>'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/usr/local/www/gitlab-ce/lib/tasks/gitlab/backup.rake:13:in `block (3 levels) in <top (required)>'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/usr/local/lib/ruby/gems/2.7/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => gitlab:backup:repo:create

line 72:
    def bin_path
      File.absolute_path(Gitlab.config.backup.gitaly_backup_path)
    end

gitlab-ce: 14.2.2
gitaly: 14.2.2
FreeBSD:  13.0-RELEASE-p4 releng/13.0-940681634

Backup is not created.
Comment 1 Anton Evel 2021-10-05 08:01:19 UTC
I have been modified config/gitlab.yml recently and added the following to gitaly_backup_path:

 ## Backup settings
  backup:
    path: "tmp/backups"   # Relative paths are relative to Rails.root (default: tmp/backups/)
    gitaly_backup_path: /usr/local/share/gitaly/bin/gitaly-backup # Path of the gitaly-backup binary (default: searches $PATH)


Now it's working. Thank you!
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-10-05 10:15:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2c47b503373d7c6c29cf94a2756f4179828f60c0

commit 2c47b503373d7c6c29cf94a2756f4179828f60c0
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2021-10-02 08:48:14 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2021-10-05 10:14:41 +0000

    www/gitlab-ce: fix default backup configuration

    PR:             258922

 www/gitlab-ce/Makefile                              |  3 +--
 www/gitlab-ce/files/patch-config_gitlab.yml.example | 20 +++++++++++++++++---
 2 files changed, 18 insertions(+), 5 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-10-05 10:15:45 UTC
A commit in branch 2021Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ae9c04d9402d301333632788cbb058f4209916b1

commit ae9c04d9402d301333632788cbb058f4209916b1
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2021-10-02 08:48:14 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2021-10-05 10:15:28 +0000

    www/gitlab-ce: fix default backup configuration

    PR:             258922
    (cherry picked from commit 2c47b503373d7c6c29cf94a2756f4179828f60c0)

 www/gitlab-ce/Makefile                              |  3 +--
 www/gitlab-ce/files/patch-config_gitlab.yml.example | 20 +++++++++++++++++---
 2 files changed, 18 insertions(+), 5 deletions(-)
Comment 4 Matthias Fechner freebsd_committer freebsd_triage 2021-10-05 10:16:38 UTC
Thanks Anton, I included it into the standard configuration.