Fix the migration, so it deals with duplicate job uuids
ClosedPublic

Authored by jskladan on Nov 11 2016, 10:01 AM.

Details

Summary

This is required to solve our state of database, where depchecks have
multiple jobs with the same uuid, and in the resultsdb 2.0 the uuid is
an unique identifier of the group.
This is done by merging the results of each "duplicate" job to the first
one with that specified uuid, and deleting the other (now result-less)
jobs.

Test Plan

Tested the migration locally on engineered data

Diff Detail

Repository
rRSDB resultsdb
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jskladan retitled this revision from to Fix the migration, so it deals with duplicate job uuids.Nov 11 2016, 10:01 AM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added reviewers: tflink, mkrizek, ralph2.
mkrizek accepted this revision.Nov 21 2016, 3:15 PM

This looks good to me. Was it tested with db dump from e.g. dev? If not, I can try. Or we can sacrifice dev for testing :)

@tflink @ralph2 wdyt?

This revision is now accepted and ready to land.Nov 21 2016, 3:15 PM
tflink accepted this revision.Nov 21 2016, 5:31 PM

I'd say that dev is more-or-less sacrifice-able. I think it would behoove us to make backups of the DB before doing things which could bork data so that we can have more than one try if needed, though.

Closed by commit rRSDBf9d2ba18408b: Fix the migration, so it deals with duplicate job uuids (authored by Josef Skladanka <jskladan@redhat.com>). · Explain WhyNov 22 2016, 9:41 AM
This revision was automatically updated to reflect the committed changes.