Gitea: Code comment fails when responding to an older comment which was made on a line which doesnt exist anymore

Created on 3 Dec 2018  路  6Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): bc42b3a
  • Operating system: Alpine (running in docker)
  • Database (use [x]):

    • [ ] PostgreSQL

    • [x] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [x] Probably

    • [ ] No

    • [ ] Not relevant

  • Log gist:

Description

Following scenario:

  1. I add a new code to the end of a file, which makes the file longer
  2. Someone reviews it, stating that extra function in unnessecary. Creates a review comment on the code.
  3. Because of said review, I remove the extra code at the end.
  4. The comment from earlier on that line is still there
  5. I try to answer it and get a 500 error because the line of code doesn't extist anymore.

Logs:

2018/12/03 12:53:31 [.../repo/pull_review.go:80 CreateCodeComment()] [E] CreateCodeComment: LineBlame[refs/pull/19/head, /data/git/repositories/vikunja/app.git, lib/models/task.dart, 86]: exit status 128 - fatal: file lib/models/task.dart has only 83 lines

I guess that comment should be marked as outdated when the line disappears.

\cc @JonasFranzDEV

kinbug revieweconfirmed

All 6 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

This is still a bug, we encountered it today. The comment in question no longer appears in the "Files Changed" view but it does appear in the "Conversation" view still. It seems like the comment should not be showing in the "Conversation" view once the offending line has disappeared from the branch.

@jameyg What Gitea version are you using?

@guillep2k We just encountered this issue again today, we're using version 1.10.3. A colleague tried to reply to a comment about some lines that had disappeared. This was on the main conversation view of the PR.

Is your code non utf-8?

This is 'fixed' as the comments are now marked as outdated when the code is changed, though the whole code review area could use some rethinking

Was this page helpful?
0 / 5 - 0 ratings

Related issues

flozz picture flozz  路  3Comments

BNolet picture BNolet  路  3Comments

jonasfranz picture jonasfranz  路  3Comments

tuxfanou picture tuxfanou  路  3Comments

BRMateus2 picture BRMateus2  路  3Comments