Skip to content

Handle failure during posting comments #280

@smacker

Description

@smacker

Currently posting and saving status to DB aren't atomic.
After a successful call to GH if DB update failed review will be duplicated.

Proposed solution:
If we create review without body attribute, it will be visible to an user only after the submit call.

It's safe to call submit multiple times.

Steps:

  • Call create without body if it doesn't have ID of review in DB already
  • Save returned ID to DB
  • In case of failure, we can just retry later without any issues for an end user
  • Send confirm (submit)
  • Update status in DB
  • In case of failure, we can just safely retry later

Metadata

Metadata

Assignees

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