Error 500 accessing /group/project/builds/number
Summary
Getting 500 error when accessing specific build.
Steps to reproduce
Upgrading to 9.0
What is the current bug behavior?
I can't access URI.
What is the expected correct behavior?
I could access the specific build
Relevant logs and/or screenshots
Started GET "/buisy/installer/builds/108" for 212.204.94.234 at 2017-03-27 12:47:29 +0200
Processing by Projects::BuildsController#show as HTML
Parameters: {"namespace_id"=>"buisy", "project_id"=>"installer", "id"=>"108"}
Completed 500 Internal Server Error in 393ms (ActiveRecord: 29.2ms)
ActionView::Template::Error (MergeRequest#commits_sha delegated to merge_request_diff.commits_sha, but merge_request_diff is nil: #<MergeRequest id: 14, target_branch: "master", source_branch: "dev", source_project_id: 21, author_id: 2, assignee_id: nil, title: "Merge Dev to Master", created_at: "2017-02-06 06:16:23", updated_at: "2017-02-06 06:16:52", milestone_id: nil, state: "merged", merge_status: "can_be_merged", target_project_id: 21, iid: 12, description: "Added basic styling, added some node modules (less...", position: 0, locked_at: nil, updated_by_id: nil, merge_error: nil, merge_params: {"force_remove_source_branch"=>nil}, merge_when_pipeline_succeeds: false, merge_user_id: nil, merge_commit_sha: "91ec87f2053fc8cf42b73af368d6b04179f2a1ff", deleted_at: nil, in_progress_merge_commit_sha: nil, lock_version: nil, title_html: "Merge Dev to Master", description_html: "<p dir=\"auto\">Added basic styling, added some node...", time_estimate: 0>):
45: Job details
46: - if can?(current_user, :update_build, @build) && @build.retryable?
47: = link_to "Retry job", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'pull-right retry-link', method: :post
48: - if @build.merge_request
49: %p.build-detail-row
50: %span.build-light-text Merge Request:
51: = link_to "#{@build.merge_request.to_reference}", merge_request_path(@build.merge_request)
app/models/merge_request.rb:25:in `rescue in commits_sha'
app/models/merge_request.rb:25:in `commits_sha'
app/models/ci/build.rb:231:in `block in merge_request'
app/models/ci/build.rb:230:in `merge_request'
app/views/projects/builds/_sidebar.html.haml:48:in `_app_views_projects_builds__sidebar_html_haml___1209746064883499324_70189428822800'
app/views/projects/builds/show.html.haml:79:in `_app_views_projects_builds_show_html_haml__1845375311306261249_70189440598340'
app/controllers/projects/builds_controller.rb:35:in `show'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/etag_caching/middleware.rb:14:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/middleware/static.rb:9:in `call'
Output of checks
All is OK.
Results of GitLab environment info
System information
System:
Current User: gino
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.7
Bundler Version:1.14.6
Rake Version: 10.5.0
Redis Version: 2.8.21
Git Version: 2.10.0
Sidekiq Version:4.2.7
GitLab information
Version: 9.0.0
Revision: cf020e6
Directory: /home/gino/gitlab
DB Adapter: mysql2
URL: https://gitlab.gino-atlas.de
HTTP Clone URL: https://gitlab.gino-atlas.de/some-group/some-project.git
SSH Clone URL: gino@gitlab.gino-atlas.de:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 5.0.0
Repository storage paths:
- default: /home/gino/projects/
Hooks: /home/gino/gitlab-shell/hooks/
Git: /home/gino/git-latest/bin/git
Results of GitLab application Check
I don't use the init script.
Checking GitLab Shell ...
GitLab Shell version >= 5.0.0 ? ... OK (5.0.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by gino:gino?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
1/1 ... repository is empty
2/6 ... ok
2/7 ... ok
2/8 ... ok
2/10 ... ok
2/11 ... ok
2/12 ... ok
2/13 ... ok
3/14 ... ok
3/15 ... ok
3/16 ... ok
3/17 ... ok
3/18 ... ok
2/19 ... ok
2/20 ... ok
3/21 ... ok
3/22 ... repository is empty
3/24 ... ok
3/25 ... ok
2/26 ... ok
2/27 ... ok
Running /home/gino/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /home/gino/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... no
Try fixing it:
Install the init script
For more information see:
doc/install/installation.md in section "Install Init Script"
Please fix the error above and rerun the checks.
Init script up-to-date? ... can't check because of previous errors
projects have namespace: ...
1/1 ... yes
2/6 ... yes
2/7 ... yes
2/8 ... yes
2/10 ... yes
2/11 ... yes
2/12 ... yes
2/13 ... yes
3/14 ... yes
3/15 ... yes
3/16 ... yes
3/17 ... yes
3/18 ... yes
2/19 ... yes
2/20 ... yes
3/21 ... yes
3/22 ... yes
3/24 ... yes
3/25 ... yes
2/26 ... yes
2/27 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/home/gino/git-latest/bin/git"
Git version >= 2.7.3 ? ... yes (2.10.0)
Active users: 3
Checking GitLab ... Finished