There should be a DB API test that ensures no new tables have soft-delete columns

Bug #1533859 reported by Matt Riedemann
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Diana Clarke

Bug Description

In mitaka we approved a spec to no longer have the SoftDeleteMixin in the data model so new tables don't implicitly inherit from that and get the deleted and deleted_at columns:

We don't have anything enforcing that policy though, except code review, which has failed a few times.

We should have a db api unit test which basically has a whitelist of which tables already have those columns and then we check the models against that, and if any new tables are introduced in the model which have the deleted or deleted_at columns, they'd fail the test.

Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
tags: added: low-hanging-fruit
Changed in nova:
assignee: nobody → Chuck Carmack (chuckcarmack75)
Revision history for this message
Diana Clarke (diana-clarke) wrote :

@Chuck: Do you plan on working on this still? If not, I'd like to take this. Cheers

Revision history for this message
Chuck Carmack (chuckcarmack75) wrote :

@Diana, I won't have time to work on it, so I'll unassign myself.

Changed in nova:
assignee: Chuck Carmack (chuckcarmack75) → nobody
Changed in nova:
assignee: nobody → Diana Clarke (diana-clarke)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Submitter: Jenkins
Branch: master

commit 0d48617e5744acba94b90f8f6844c9964715691f
Author: Diana Clarke <email address hidden>
Date: Wed Feb 3 15:18:45 2016 -0500

    Test that new tables don't use soft deletes

    Soft deletes were deprecated in Mitaka. Whitelist the existing
    tables that use soft deletes, and add a test to make sure no new
    ones are added.

    Change-Id: Ibdf0f0e9944a8d3e71ef7411d14f0054ed17e7b6
    Closes-Bug: #1533859

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova

This issue was fixed in the openstack/nova development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.