forgejo-federation/.forgejo/workflows
Victoria Nadasdi df0d1a2134 feat: parse prefix from redis URI for queues (#3836)
For security reasons, scoping access to a redis server via ACL rules is
a good practice. Some parts of the codebase handles prefix like cache[^1]
and session[^2], but the queue module doesn't.

This patch adds this missing functionality to the queue module.

Note about relevant test:
I tried to keep the PR as small as possible (and reasonable), and not
change how the test runs. Updated the existing test to use the same
redis address and basically duplicated the test with the extra flag. It
does NOT test if the keys are correct, it ensures only it works as
expected. To make assertions about the keys, the whole test has to be
updated as the general wrapper doesn't allow the main test to check
anything provider (redis) specific property. That's not something I
wanted to take on now.

[^1]: e4c3c039be/modules/cache/cache_redis.go (L139-L150)
[^2]: e4c3c039be/modules/session/redis.go (L122-L129)

Signed-off-by: Victoria Nadasdi <victoria@efertone.me>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3836
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Victoria Nadasdi <victoria@efertone.me>
Co-committed-by: Victoria Nadasdi <victoria@efertone.me>
2024-05-20 14:10:54 +00:00
..
backport.yml [CI] configure backport to comment on the PR on failure 2024-04-15 18:23:57 +02:00
build-release-integration.yml Disable duplicate builds 2024-03-25 13:24:53 +01:00
build-release.yml fix(release): add missing ARG RELEASE_VERSION 2024-04-17 17:16:53 +02:00
cascade-setup-end-to-end.yml [CI] simplify end-to-end test cascading PR 2024-03-20 18:16:56 +01:00
e2e.yml Revert "[CI] pin go v1.22.2 version" 2024-04-05 05:31:00 +02:00
mirror.yml [CI] mirror to forgejo-integration daily instead of each commit 2024-02-17 11:55:52 +01:00
publish-release.yml Update forgejo/forgejo-build-publish action to v5 2024-04-12 10:19:15 +00:00
renovate.yml Merge pull request 'Enable renovate osv vulnerability alerts' (#2788) from viceice/forgejo:chore/renovate into forgejo 2024-05-14 12:01:47 +00:00
testing.yml feat: parse prefix from redis URI for queues (#3836) 2024-05-20 14:10:54 +00:00