Add Redis support

Created on 3 April 2024, 9 months ago

As described in ✨ Support external Flood Postponed: needs info the FloodUnblockManager contains database specific code which makes it unusable for Redis.

The patch in ✨ Support external Flood Postponed: needs info is problematic, so I propose a 2 step solution:

- 1. Add the generic FloodUnblockManager. ( ✨ Make FloodUnblockManager generic Active ) This will be achieved by adding the generic FloodUnblockManagerBase and the database specific FloodUnblockManagerDatabase. This should be done while ensuring that everything keeps functioning as it does in the latest release.
- 2. Add the Redis FloodUnblockManager. (This issue) This will be achieve by adding the FloodUnblockManagerRedis

✨ Feature request
Status

Active

Version

2.3

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands batigolix Utrecht

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @batigolix
  • πŸ‡¦πŸ‡ΊAustralia elc

    It would make more sense to keep the solution and the background together over in ✨ Support external Flood Postponed: needs info , marking this as a duplicate. The code to add Redis (or whatever replaces it) is mostly complete in that issue, it just needs to be merged into the new layout. The code in the patches for FloodUnblockManagerBase in ✨ Make FloodUnblockManager generic Active seem to be based off the original issue. There are a pile of people who deserve credit for getting it to this point, plus more people who would be notified of the updates and changes in plan. I only ran into this due to the posts by Anybody and catch on that issue.

  • Status changed to Needs work 8 months ago
  • πŸ‡³πŸ‡±Netherlands batigolix Utrecht

    I announced splitting this issue in this comment:
    https://www.drupal.org/project/flood_control/issues/2928007#comment-1553... ✨ Support external Flood Postponed: needs info

    I would prefer to keep this in a separate issue, to keep the conversation focused on a smaller topic and make it easier to review.

    I ll try to ensure that people are being credited and notified.

  • First commit to issue fork.
  • Assigned to batigolix
  • Status changed to Active 7 months ago
  • πŸ‡³πŸ‡±Netherlands batigolix Utrecht
  • πŸ‡³πŸ‡±Netherlands batigolix Utrecht

    batigolix β†’ changed the visibility of the branch 2.3.x to hidden.

  • Merge request !52Resolve #3437875 "Redis" β†’ (Open) created by batigolix
  • Status changed to Needs review 6 months ago
  • πŸ‡³πŸ‡±Netherlands batigolix Utrecht
  • Pipeline finished with Failed
    6 months ago
    Total: 164s
    #211643
  • Issue was unassigned.
  • πŸ‡³πŸ‡±Netherlands batigolix Utrecht
  • πŸ‡ΊπŸ‡ΈUnited States fskreuz

    Did a quick test of this MR with the changes from 3437860. Works for me (Drupal 10.3.1, Flood Control 2.3.4, 3437860's MR, 3437875's MR).

    I did see the note about the timestamp and expiration in the MR. But out of curiosity, I checked the entries in Redis. They do seem to have a couple of values that resemble timestamps, and appear to be about 6 hours apart (one's an integer, the other has 4 decimal places). Haven't looked any deeper yet, but at least I can unblock now.

  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    Total: 526s
    #261603
  • Status changed to Needs work 4 months ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Tests fail

  • Pipeline finished with Failed
    4 months ago
    Total: 168s
    #272306
  • Pipeline finished with Failed
    4 months ago
    Total: 224s
    #272320
  • Merge request !53Resolve #3437875 "Add Redis support" β†’ (Open) created by fskreuz
  • πŸ‡ΊπŸ‡ΈUnited States fskreuz

    Recreated the MR for 3.0.x

  • Status changed to Needs review 7 days ago
  • πŸ‡¬πŸ‡§United Kingdom james.williams

    It's only the test against the previous major PHP version which fails for MR !52 (the one for 2.x), which also fails for the current 2.x HEAD. So I think this is good for review again? The tests in MR !53 (targeting 3.x) are passing fine.

  • πŸ‡¦πŸ‡ΊAustralia elc

    Tests need to be expanded to install redis and configure the tests to selectively use it in redis only tests. The code currently only tests the database storage of flood data.

    The drupa/redis module has a modified .gitlab.yml file which would provide insight into getting redis installed and adding additional builds to test with a without it.

Production build 0.71.5 2024