Skip to content
Snippets Groups Projects

Drop GitHub ReviewRequestedEvents when reviewer has been deleted

Merged Warren Gifford requested to merge campaigns/drop-deleted-reviewer into master

Created by: mrnugget

This is another follow-up to #10264 (closed). After fixing one of the symptoms of deleted reviewers in #10267 I decided to follow @ryanslade's suggestion and actually "remove" the events.

Now, actually removing the matching entry from the database is not possible with out current architecture, since it would require us to persist the GitHub-Node-ID of each event and then, on sync, map the now-with-deleted-reviewer event to the one in the database and then not only drop the new event but also delete the one in the DB.

I think we can tackle in the future, when we want to make sure that our "sync" is actually a full sync (i.e. deletes items in the DB that do not exist on the code host anymore).

For now, this lets me sleep better at night.

Merge request reports

Approval is optional

Merged by avatar (Jul 13, 2025 7:48am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: codecov[bot]

    Codecov Report

    Merging #10284 into master will increase coverage by 0.00%. The diff coverage is 77.77%.

    @@           Coverage Diff           @@
    ##           master   #10284   +/-   ##
    =======================================
      Coverage   43.97%   43.98%           
    =======================================
      Files        1382     1382           
      Lines       76133    76142    +9     
      Branches     6845     6899   +54     
    =======================================
    + Hits        33480    33489    +9     
      Misses      39522    39522           
      Partials     3131     3131           
    Flag Coverage Δ
    #go 46.95% <77.77%> (+<0.01%) :arrow_up:
    #typescript 34.84% <ø> (ø)
    #unit 43.98% <77.77%> (+<0.01%) :arrow_up:
    Impacted Files Coverage Δ
    internal/extsvc/github/pulls.go 52.47% <0.00%> (-0.41%) :arrow_down:
    internal/campaigns/types.go 11.77% <100.00%> (+1.29%) :arrow_up:
  • Created by: mrnugget

    I like how small this change is. Sign of a good design :)

    You'd be surprised! You're looking at "Handling a ton of different code host events — the good parts" :wink:

Please register or sign in to reply
Loading