Page MenuHomePhabricator

Prepare owners package audit rules to become more flexible

Authored by epriestley on Feb 7 2019, 4:19 PM.



Ref T13244. See PHI1055. (Earlier, see D20091 and PHI1047.) Previously, we expanded the Owners package autoreview rules from "Yes/No" to several "Review (Blocking) If Non-Owner Author Not Subscribed via Package" kinds of rules. The sky didn't fall and this feature didn't turn into "Herald-in-Owners", so I'm comfortable doing something similar to the "Audit" rules.

PHI1055 is a request for a way to configure slightly different audit behavior, and expanding the options seems like a good approach to satisfy the use case.

Prepare to add more options by moving everything into a class that defines all the behavior of different states, and converting the "0/1" boolean column to a text column.

Test Plan
  • Created several packages, some with and some without auditing.
  • Inspected database for: package state; and associated transactions.
  • Ran the migrations.
  • Inspected database to confirm that state and transactions migrated correctly.
  • Reviewed transaction logs.
  • Created and edited packages and audit state.
  • Viewed the "Package List" element in Diffusion.
  • Pulled package information with, got sensible results.
  • Edited package audit status with owners.edit.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Feb 7 2019, 4:19 PM
Owners added a subscriber: Restricted Owners Package.Feb 7 2019, 4:19 PM
epriestley requested review of this revision.Feb 7 2019, 4:21 PM
epriestley updated this revision to Diff 48043.Feb 7 2019, 4:21 PM
  • Fix lookup of deprecated constants on API writes.
amckinley accepted this revision.Feb 7 2019, 10:17 PM
This revision is now accepted and ready to land.Feb 7 2019, 10:17 PM
This revision was automatically updated to reflect the committed changes.