pipeline_schedules pages throwing error 500

Summary

In a self-hosted gitlab, when trying to access the new feature "Pipelines Schedules" from a project configured with previous "Scheduled Pipelines Triggers", I receive a error 500.

Steps to reproduce

  1. Use Gitlab-ce 9.1.4 to create a scheduled pipeline;
  2. Do the migration to 9.2.0
  3. Try to access git.url/group/project/pipeline_schedules

What is the current bug behavior?

Error 500

What is the expected correct behavior?

Display "Scheduling Pipelines" page

Relevant logs and/or screenshots

Started GET "/group/myproject/pipeline_schedules" for 10.10.10.10 at 2017-05-23 10:16:55 -0300

Completed 500 Internal Server Error in 105ms (ActiveRecord: 17.2ms)

ActionView::Template::Error (No route matches {:action=>"show", :controller=>"projects/commits", :id=>"", :namespace_id=>#<Group id: 1776, name: "group", path: "group", owner_id: nil, created_at: "2017-05-18 14:35:50", updated_at: "2017-05-18 14:42:39", type: "Group", description: "", avatar: nil, share_with_group_lock: false, visibility_level: 20, request_access_enabled: true, deleted_at: nil, lfs_enabled: nil, description_html: nil, parent_id: nil, require_two_factor_authentication: false, two_factor_grace_period: 48, cached_markdown_version: nil>, :project_id=>#<Project id: 3126, name: "myproject", path: "myproject", description: "Tests ...", created_at: "2017-05-16 19:35:24", updated_at: "2017-05-23 11:15:25", creator_id: 525, namespace_id: 1776, last_activity_at: "2017-05-23 10:59:50", import_url: nil, visibility_level: 20, archived: false, import_status: "none", star_count: 0, import_type: nil, import_source: nil, avatar: nil, import_error: nil, ci_id: nil, shared_runners_enabled: true, runners_token: "AAA-AAAAAAAAAAAAAAAA", build_coverage_regex: nil, build_allow_git_fetch: true, build_timeout: 3600, pending_delete: false, public_builds: true, last_repository_check_failed: false, last_repository_check_at: "2017-05-17 20:19:46", container_registry_enabled: true, only_allow_merge_if_pipeline_succeeds: false, has_external_issue_tracker: false, repository_storage: "default", request_access_enabled: false, has_external_wiki: false, lfs_enabled: nil, description_html: "<p dir=\"auto\">Tests...", only_allow_merge_if_all_discussions_are_resolved: false, printing_merge_request_link_enabled: true, auto_cancel_pending_pipelines: 0, import_jid: nil, cached_markdown_version: 1, last_repository_updated_at: "2017-05-23 10:59:50">} missing required keys: [:id]):
    4:       = pipeline_schedule.description
    5:     %td.branch-name-cell
    6:       = icon('code-fork')
    7:       = link_to pipeline_schedule.ref, namespace_project_commits_path(@project.namespace, @project, pipeline_schedule.ref), class: "branch-name"
    8:     %td
    9:       - if pipeline_schedule.last_pipeline
   10:         .status-icon-container{ class: "ci-status-icon-#{pipeline_schedule.last_pipeline.status}" }
  app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml:7:in `_app_views_projects_pipeline_schedules__pipeline_schedule_html_haml__1171435416270293203_70240940869860'
  app/views/projects/pipeline_schedules/_table.html.haml:12:in `_app_views_projects_pipeline_schedules__table_html_haml___700223054732645100_70240942047420'
  app/views/projects/pipeline_schedules/index.html.haml:21:in `_app_views_projects_pipeline_schedules_index_html_haml___498510885986750872_70241029702320'
  app/controllers/application_controller.rb:281:in `set_locale'
  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:10:in `call'
  lib/gitlab/request_context.rb:18:in `call'

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.6.6 Bundler Version:1.13.7 Rake Version: 10.5.0 Redis Version: 3.2.5 Git Version: 2.11.1 Sidekiq Version:5.0.0

GitLab information Version: 9.2.0 Revision: 27cff7d Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://git.internaldomain HTTP Clone URL: https://git.internaldomain/some-group/some-project.git SSH Clone URL: git@git.internaldomain:some-group/some-project.git Using LDAP: yes Using Omniauth: no

GitLab Shell Version: 5.0.3 Repository storage paths:

  • default: /opt/appfiles/gitlab/git-data/data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

All tests passed

Redis version >= 2.8.0? ... yes Ruby version >= 2.1.0 ? ... yes (2.3.3) Your git bin path is "/opt/gitlab/embedded/bin/git" Git version >= 2.7.3 ? ... yes (2.11.1) Active users: 23

Checking GitLab ... Finished

Possible fixes

Edited by Thiago Laubstein