Skip to content

Lost, overridden or misplaced pending comments #6950

Open
@T3sT3ro

Description

@T3sT3ro

This heisenbug seems to appear when trying to add comments to pull request before it is submitted (PR review in pending state).

Sometimes when I am writing a series of comments in a PR one of the following happens:

  • comment contents are swapped/overridden or moved around in the file, for example when I add a comment to line 12 and 16, seemingly, unbeknownst to me, the comment 12 and 16 swap contents, 16 overrides 12 and duplicates the content or the comment moves around
  • comments are lost completely and don't synchronize properly (this can be seen when opening the comment, clicking "more" three dots and being unable to click "edit comment", because it's disabled along with the 3 other last options)
  • A comment is completely lost from a file (e.g. when I added it in VSCode, but it's not visible on github and later completely missing).
  • A comment moves from one file to another. For example It's added to the file A, and after a while appears in a place of another comment I tried adding later in file B.
  • When writing a series of comments (still pending to publish a review!), and when in the meantime a coworker makes edits to some files, some comments are lost, moved around to random lines, between files and some of them get duplicated.

Unfortunately I don't have much details, but I believe it occurs repeatedly when the sync of the comment to the repository is not immediate, and they get added in a random order messing everything up.

This also looks like a mix of issues between both VSCode PR extension and poor PR comment API on github side.

  • Extension version: 0.110.0
  • VSCode Version: 1.100.0
  • OS: Linux x64 6.11.0-25-generic
  • Repository Clone Configuration (single repository/fork of an upstream repository): single repository on enterprise hosted github.
  • Github Product (Github.com/Github Enterprise version x.x.x): Github Enterprise, probably 3.16.1

Steps to Reproduce:

Unfortunately, I didn't find a reliable way to reproduce. I propose adding artificial delay to sync comments for testing and making interleaved comment changes, edits and commits while some comments already exist and some are yet to be written. Preferably from another source as well (a coworker or another editor)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions