Inline comments for first commit
When I try send inline comment for first commit file I get 500 response.
Logs:
NoMethodError (undefined method `line_code_for_position' for nil:NilClass):
lib/gitlab/diff/position.rb:136:in `line_code'
app/models/diff_note.rb:86:in `set_line_code'
app/services/notes/create_service.rb:14:in `execute'
app/controllers/projects/notes_controller.rb:25:in `create'
lib/gitlab/middleware/go.rb:16:in `call'
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Developer
Please could you provide some more information about the environment where you have noticed the problem:
- Run a diagnostic check of GitLab and it's components:
sudo gitlab-rake gitlab:check
- Gather GitLab specific environment information:
sudo gitlab-rake gitlab:env:info
Please could you add some more information to your report. Please provide at least one of the following:
- Step-by-step instructions to reproduce the problem
- A sample project on GitLab.com exhibiting the behaviour
- username-removed-419655 Added ~65372 label
Added ~65372 label
- Author
First of all, I want to say that the same behavior can be reproduced on gitlab.com.
Step-by-step instruction:- For example I have a project on gitlab.com with only one commit.
- I tried to write the inline comment
- Comments not created
- In the 'network' panel of chrome developer tools I saw that the query returns a 500 error
On my server:
-
gitlab:check
- all ok -
gitlab:env:info
:
System information System: Ubuntu 14.04 Current User: git Using RVM: no Ruby Version: 2.1.8p440 Gem Version: 2.5.1 Bundler Version:1.10.6 Rake Version: 10.5.0 Sidekiq Version:4.1.4 GitLab information Version: 8.10.5 Revision: 5f47c35 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://code.realext.com.ua HTTP Clone URL: http://code.realext.com.ua/some-group/some-project.git SSH Clone URL: git@code.realext.com.ua:some-group/some-project.git Using LDAP: no Using Omniauth: no GitLab Shell Version: 3.2.1 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/ Git: /opt/gitlab/embedded/bin/git
I am experiencing the same problem after upgrading to 8.10.5.
Results are the same as Andrey's.
- username-removed-419655 Removed ~65372 label
Removed ~65372 label
- username-removed-419655 Added ~12980 code review labels
Added ~12980 code review labels
- username-removed-419655 Added reproduced on GitLab.com label
Added reproduced on GitLab.com label
- Developer
@realext @adyromantika Thanks for your reports and extra info. I did manage to reproduce this on GitLab.com.
Attempting to add an inline comment to the following commit, for the first line, will result in a 500 error.
- Developer
@DouweM who should be assigned to look into this?
- Stan Hu mentioned in issue #19582 (closed)
mentioned in issue #19582 (closed)
- Stan Hu Added regression label
Added regression label
- username-removed-443319 Reassigned to @smcgivern
Reassigned to @smcgivern
- username-removed-443319 Milestone changed to %8.11
Milestone changed to %8.11
- username-removed-443319 Started branch
20895-inline-comments-for-first-commit
Started branch
20895-inline-comments-for-first-commit
- username-removed-443319 mentioned in merge request !5900 (merged)
mentioned in merge request !5900 (merged)
- Douwe Maan Status changed to closed by merge request !5900 (merged)
Status changed to closed by merge request !5900 (merged)
- Douwe Maan mentioned in commit 95cf5a09
mentioned in commit 95cf5a09
- Nikola Milojevic mentioned in merge request !14785
mentioned in merge request !14785