"Your merge request is almost ready!" state never finishes after upgrade to 18.1.0
Summary
Since upgrading to GitLab 18.1.0, merge requests get stuck in an Your merge request is almost ready state and clicking on changes yields a Something went wrong on our end. Please try again message
Steps to reproduce
- Upgrade GitLab to version 18.1.0
- Create a new merge request
- Observe the status message
Your merge request is almost ready! - Click on
Changestab that yieldsSomething went wrong on our end. Please try againmessage
Example Project
What is the current bug behavior?
-
Your merge request is almost ready!message persists indefinitely - Clicking
Changesshows error:Something went wrong on our end. Please try again. - Diffs are not created for the merge requests
What is the expected correct behavior?
- Merge request should finish loading and proceed to next step
- Changes tab should show the diff view
Relevant logs and/or screenshots
exception.class": "NoMethodError",
"exception.message": "undefined method `id' for nil:NilClass",
"exception.backtrace": [
"app/models/merge_request_diff_commit.rb:73:in `block in create_bulk'",
"app/models/merge_request_diff_commit.rb:51:in `map'",
"app/models/merge_request_diff_commit.rb:51:in `with_index'",
"app/models/merge_request_diff_commit.rb:51:in `create_bulk'",
"app/models/merge_request_diff.rb:901:in `save_commits'",
"app/models/merge_request_diff.rb:243:in `save_git_content'",
...
"app/models/merge_request.rb:1305:in `block in create_merge_request_diff'",
The error occurs in app/models/merge_request_diff_commit.rb:73 within the create_bulk method. Looking at the code, line 73 is:
commit_author_id: author.id
The error undefined method 'id' for nil:NilClass indicates that the author variable is nil when trying to access its id method.
Results of GitLab environment info
GitLab Self-managed - v18.1.0
Support tickets submitted for this issue:
- https://gitlab.zendesk.com/agent/tickets/637239
- https://gitlab.zendesk.com/agent/tickets/640253
- https://gitlab.zendesk.com/agent/tickets/639460
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.