Code review comment for lp://staging/~julian-edwards/launchpad/no-more-secpub

Revision history for this message
Julian Edwards (julian-edwards) wrote :

= Remove Secure* publishing tables =

I first started this branch a year ago!

Soyuz uses two tables, SourcePackagePublishingHistory and BinaryPackagePublishingHistory to model how packages appear in distroseries and PPAs.

However, these are not actually tables, but views on the underlying "real" tables which are named SecureSourcePackagePublishingHistory and SecureBinaryPackagePublishingHistory. The views filter on a column called "embargoed" and have been around since before my time, but basically it was some naive thinking that security fixes could be embargoed by hiding the publications. The flaws in that plan were well exposed a long time ago.

The views also cause a lot of trouble in tests because you can't update them directly, you have to access the underlying table itself. You'd then have to invalidate the Storm cache to make it re-read the view! So this change will also make tests simpler and faster.

This branch removes the Secure* views completely. It's a mechanical change and involves changing the db schema and all the code that references:

 * Secure*PublishingHistory
 * .secure_record
 * embargoed
 * embargo_lifted

The result is a large diff - sorry :( But it's worth a quick glance. The tests all pass, and I am about to put it on dogfood to run it with real data.

It's probably even worth just an rs=reviewer as it's practically impossible to review this large change sensibly. Unfortunately, there's no decent way of splitting it up since the secure* stuff was deeply entrenched.

« Back to merge proposal