Merge requests do not show commits made after 13.8 upgrade

I’m not sure this is the correct place to post but the new issue template says I should look for help on the forum before opening a new issue. I’ve checked the recent posts and don’t see anyone else reporting this problem.

Last week I upgraded our self hosted GitLab instance to 13.8. After the upgrade completed I noticed that any new commits pushed to branches to open merge requests would not show up in the merge request view. They are visible when viewing the branch directly. Also the created pipelines for those commits do not appear to be linked to the merge request.

I’ve poked around the logs and nothing stands out to me, though I’m not really sure what I’m looking for. I would greatly appreciate any assistance in tracking down the cause of this issue as it’s preventing code reviews for my team.

I eventually found this error:

ActiveModel::UnknownAttributeError (unknown attribute 'sorted' for MergeRequestDiff.):
  
app/models/merge_request_diff.rb:695:in `save_diffs'
app/models/merge_request_diff.rb:186:in `save_git_content'
app/models/merge_request.rb:927:in `block in create_merge_request_diff'
lib/gitlab/gitaly_client.rb:306:in `allow_n_plus_1_calls'
app/models/merge_request.rb:926:in `create_merge_request_diff'
app/models/merge_request.rb:919:in `ensure_merge_request_diff'
app/services/issuable_base_service.rb:153:in `block in create'
app/services/issuable_base_service.rb:152:in `create'
app/services/merge_requests/base_service.rb:72:in `create'
app/services/merge_requests/create_service.rb:33:in `create'
app/services/merge_requests/create_service.rb:13:in `execute'
app/controllers/projects/merge_requests/creations_controller.rb:25:in `create'
app/controllers/application_controller.rb:482:in `set_current_admin'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:473:in `set_session_storage'
lib/gitlab/i18n.rb:73:in `with_locale'
lib/gitlab/i18n.rb:79:in `with_user_locale'
app/controllers/application_controller.rb:467:in `set_locale'
lib/gitlab/error_tracking.rb:52:in `with_context'
app/controllers/application_controller.rb:532:in `sentry_context'
app/controllers/application_controller.rb:460:in `block in set_current_context'
lib/gitlab/application_context.rb:56:in `block in use'
lib/gitlab/application_context.rb:56:in `use'
lib/gitlab/application_context.rb:22:in `with_context'
app/controllers/application_controller.rb:451:in `set_current_context'
lib/gitlab/request_profiler/middleware.rb:17:in `call'
lib/gitlab/jira/middleware.rb:19:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:21:in `call'
lib/gitlab/middleware/multipart.rb:172:in `call'
lib/gitlab/middleware/read_only/controller.rb:50:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'
lib/gitlab/middleware/request_context.rb:23:in `call'
config/initializers/fix_local_cache_middleware.rb:9:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:76:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'

Which lead me to gitlab-org/charts/gitlab#2529. I reran the database migration rake task and things seem to be working now.