Provide a reserved url for clearing out the uid table
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Fix Released
|
High
|
Barry Warsaw |
Bug Description
While testing the authenticating REST proxy, it is necessary to clear out the uid table. In normal operation, we never delete rows from this table, to ensure that uids are never duplicated. However, when a user is deleted in the proxy test suite, its uid entry is never cleaned up.
This thread discusses several options: http://
Yet another option would be to expose
<api>/reserved/
and if you DELETE that resource, all uids not associated with users will be removed from the table.
It's a bit crufty in that I think we may be abusing the DELETE method (since <api>/reserved/
Not sure we need to implement GET, or subresources, but we could if it turns out we need that for testing purposes.
Also, DELETEing .../orphans means that the ill effects of accidentally calling this on a real server are minimized. At worst, uids could be reused, but that's unlikely given our use of uuid4().
Changed in mailman: | |
status: | In Progress → Fix Committed |
assignee: | nobody → Barry Warsaw (barry) |
Changed in mailman: | |
status: | Fix Committed → Fix Released |
Sounds good to me. All the ideas put forward here and in the thread provide a way to clean up the database and that's the most important thing. I like this one because it is straightforward.
With this solution, I could just run it In testing teardown after deleting my test users and all would be cleaned up, without risk of deleting anything but the orphaned UIDs and without needing to write specific code to work out which UIDs need deletion. So I think this is a good way to go.