[openstreetmap/openstreetmap-website] Add the ability to rate limit edits (PR #4319)

Andy Allan notifications at github.com
Tue Oct 31 15:54:46 UTC 2023


> So it seems that restriction was relaxed in postgres 12 which is why the main tests work as the GitHub ubuntu images use postgres 14 but our docker setup still uses postgres 11...

Great, thanks for looking into that. I'm happy to bump the requirement to postgres 12+ (since that's the lowest version available in the oldest Ubuntu LTS, 20.04) so it shouldn't affect too many developers/deployments (hopefully!). Should we use 12 in the docker tests to pick anything up that might affect focal environments? I'm happy either way.

Only remaining thing after that is to update INSTALL.md with the new minimum version.

I like that the algorithm is based on the one that we introduced for changeset comments recently, so we might be able to refactor that in future (perhaps initially moving all the user rate limits into a concern, to avoid giant `user.rb`). I'm also happy with the concept of the `importer` flag, in order to provide a pragmatic compromise for these accounts (and everyone already follows the Import Guidelines and uses a separate account, right? :smile: ).

I considered suggesting reworking the tests slightly (to use `Numeric::divmod` and `create_list`) but I don't think it's worth the additional refactoring at this point.

Otherwise I'm happy with this PR, and unless you have any more changes planned then I think it can be merged.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4319#issuecomment-1787503462
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4319/c1787503462 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231031/c086275a/attachment.htm>


More information about the rails-dev mailing list