[Bug 1420083] [NEW] Provide a reserved url for clearing out the uid table
Public bug reported: 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://thread.gmane.org/gmane.mail.mailman.devel/19733 Yet another option would be to expose <api>/reserved/uids/orphans 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/uids/orphans will still exist after the successful operation), but since this is a testing-only method, I think it's fine. 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(). ** Affects: mailman Importance: High Status: Triaged ** Tags: mailman3 -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1420083 Title: Provide a reserved url for clearing out the uid table To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1420083/+subscriptions
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. -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1420083 Title: Provide a reserved url for clearing out the uid table To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1420083/+subscriptions
We'll go with DELETE <api>/reserved/uids/orphans ** Changed in: mailman Status: Triaged => In Progress -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1420083 Title: Provide a reserved url for clearing out the uid table To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1420083/+subscriptions
Note that I will not make any API stability guarantees for anything under /reserved and its only function will be for non-production support (e.g. testing systems). -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1420083 Title: Provide a reserved url for clearing out the uid table To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1420083/+subscriptions
** Changed in: mailman Status: In Progress => Fix Committed ** Changed in: mailman Assignee: (unassigned) => Barry Warsaw (barry) -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1420083 Title: Provide a reserved url for clearing out the uid table To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1420083/+subscriptions
** Changed in: mailman Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1420083 Title: Provide a reserved url for clearing out the uid table To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1420083/+subscriptions
participants (2)
-
Andrew Stuart
-
Barry Warsaw