Skip to content

Inline comments lost on GitLab API timeout — no retry or local fallback #680

@nohzafk

Description

@nohzafk

When posting inline review comments to GitLab, transient network timeouts cause comments to be silently dropped. There's no retry, and the comment content isn't saved anywhere locally, so the work is lost.

Repro:

Run plannotator review <gitlab-mr-url> against a GitLab MR. If the network hiccups while POSTing discussions, some inline comments fail.

Observed:

Warning: 4/10 inline comments failed:
<file path>:1: ERROR
  Post ".../merge_requests/690/discussions":
  dial tcp [2606:4700:90:0:...]:443: i/o timeout.
...
[pr-action] Success

The run is reported as Success despite 4/10 comments being lost. The dropped comment bodies are nowhere to be found, they have to be regenerated from scratch.

Expected:

One or more of:

  • Retry failed POSTs with backoff before giving up
  • Persist failed comments to a local file (e.g. .plannotator/failed-comments-<mr>.json) so they can be re-posted
  • Exit non-zero when any inline comments fail, instead of reporting Success

Environment:

macOS
plannotator CLI: v0.19.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions