Delete draft DiffSets when discarding unpublished review requests.

Review Request #13786 — Created April 24, 2024 and submitted

Information

Review Board
release-7.x

Reviewers

It turns out that we had a bug where deleting an unpublished review
request would leave the DiffSet attached to the draft in the database,
but unreachable. These are now less unreachable, since FileAttachment
can link to the DiffSet. This was causing some crashes in the API
attempting to serialize a DiffSet that had neither a history nor a
draft.

This change makes it so we delete the DiffSet before deleting the draft.

Ran unit tests. The newly-added test failed before the change and
succeeds after.

Summary ID
Delete draft DiffSets when discarding unpublished review requests.
It turns out that we had a bug where deleting an unpublished review request would leave the DiffSet attached to the draft in the database, but unreachable. These are now less unreachable, since FileAttachment can link to the DiffSet. This was causing some crashes in the API attempting to serialize a DiffSet that had neither a history nor a draft. This change makes it so we delete the DiffSet before deleting the draft. Testing Done: Ran unit tests. The newly-added test failed before the change and succeeds after.
d89cd8ca9bcda5411393d6ccfa9f6ca3e5a4c579
chipx86
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-7.x (9e856b5)
Loading...