Clean updates by release
ClosedPublic

Authored by adamwill on Nov 8 2016, 8:19 AM.

Details

Summary

This should fix the lack of updates in production blockerbugs.
The problem is that the logic for finding deleted updates fails
to handle the case where we have active milestones for more
than one release. It assumes any update at all that's in the
database but not in the (per-release) Bodhi query that just
ran has been deleted. It should only consider updates that are
for the release we just queried.

This affects production because I've started updating after
each milestone release, rather than each final release, so
right now we have 25 Final, 26 Alpha and 26 Beta live in prod.
It doesn't affect a typical test deployment because the script
only loads the F25 blockers; you have to manually add an F26
milestone to reproduce the problem.

We'll have to force a full resync on the infra deployments to
flush out the erroneously 'deleted' updates.

Test Plan

To see the bug, set up a test deployment with just
F25 milestones, sync it, and see that it works OK. Now add an
F26 milestone, sync, and watch all the updates move to 'deleted'
status in the database (and disappear from the UI). Now re-try
with this patch applied and hopefully the updates will survive.

Diff Detail

Repository
rBLKR blockerbugs
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to Clean updates by release.Nov 8 2016, 8:19 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: tflink, mkrizek.

"We'll have to force a full resync on the infra deployments to flush out the erroneously 'deleted' updates." - well, that or someone can just go into the database and change the status behind the app's back...

mkrizek accepted this revision.Nov 8 2016, 9:49 AM

Code works and looks good to me. Thanks!

This revision is now accepted and ready to land.Nov 8 2016, 9:49 AM
This revision was automatically updated to reflect the committed changes.