Skip to content

Commit

Permalink
Delete OpenShiftVersions via change-feed (#3262)
Browse files Browse the repository at this point in the history
  • Loading branch information
ventifus authored Nov 3, 2023
1 parent 35a5f16 commit 83b2a55
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/aro/update_ocp_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,13 @@ func updateOpenShiftVersions(ctx context.Context, dbOpenShiftVersions database.O
}

log.Printf("Version %q not found, deleting", doc.OpenShiftVersion.Properties.Version)
err := dbOpenShiftVersions.Delete(ctx, doc)
// Delete via changefeed
_, err := dbOpenShiftVersions.Patch(ctx, doc.ID,
func(d *api.OpenShiftVersionDocument) error {
d.OpenShiftVersion.Deleting = true
d.TTL = 60
return nil
})
if err != nil {
return err
}
Expand Down

0 comments on commit 83b2a55

Please sign in to comment.