sameersbn / sameersbn/docker-gitlab
v8.1.0 backup is failing - undefined method `empty?' for nil:NilClass
Open
Nobody has claimed this yet.
wontfix
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
Backup is failing as follows:
Dumping repositories ...
* foo/bar ... [DONE]
* foo/bar.wiki ... rake aborted!
NoMethodError: undefined method `empty?' for nil:NilClass
Any insight? The full trace is here:
** Invoke gitlab:backup:create (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:backup:create
** Invoke gitlab:backup:db:create (first_time)
** Invoke environment
** Execute gitlab:backup:db:create
Dumping database ...
Dumping PostgreSQL database gitlab_prod ... [DONE]
Compressing database ... [DONE]
done
** Invoke gitlab:backup:repo:create (first_time)
** Invoke environment
** Execute gitlab:backup:repo:create
Dumping repositories ...
* foo/bar ... [DONE]
* foo/bar.wiki ... rake aborted!
NoMethodError: undefined method `empty?' for nil:NilClass
/home/git/gitlab/app/models/repository.rb:44:in `empty?'
/home/git/gitlab/lib/backup/repository.rb:35:in `block in dump'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/batches.rb:52:in `block (2 levels) in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/batches.rb:52:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/batches.rb:52:in `block in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/batches.rb:126:in `find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.12/lib/active_record/relation/batches.rb:51:in `find_each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.12/lib/active_record/querying.rb:9:in `find_each'
/home/git/gitlab/lib/backup/repository.rb:10:in `dump'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:47:in `block (4 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<main>'
Tasks: TOP => gitlab:backup:repo:create
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading app/models/repository.rb at line 44 and lib/backup/repository.rb at line 35, then run the GitLab repository backup task described in the issue. Trace the failing wiki repository case and confirm that the backup completes without the NoMethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100