← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1533859] [NEW] There should be a DB API test that ensures no new tables have soft-delete columns

 

Public bug reported:

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:

http://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved
/no-more-soft-delete.html

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.

** Affects: nova
     Importance: Medium
         Status: Confirmed


** Tags: db low-hanging-fruit testing

** Changed in: nova
       Status: New => Confirmed

** Changed in: nova
   Importance: Undecided => Medium

** Tags added: low-hanging-fruit

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1533859

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

Status in OpenStack Compute (nova):
  Confirmed

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:

  http://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved
  /no-more-soft-delete.html

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1533859/+subscriptions


Follow ups