Skip to content

Gitea not accepting "redis-cluster" as cache adapter/session provider #30534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SomanathThilak opened this issue Apr 17, 2024 · 2 comments · Fixed by #30794
Closed

Gitea not accepting "redis-cluster" as cache adapter/session provider #30534

SomanathThilak opened this issue Apr 17, 2024 · 2 comments · Fixed by #30794
Labels
type/bug type/docs This PR mainly updates/creates documentation

Comments

@SomanathThilak
Copy link

Description

Gitea is not accepting Cache ADAPTER or Session PROVIDER as "redis-cluster".

In the documentation it is mentioned to use string "redis-cluster" when redis cluster instance is used for cache/session. But when Gitea is installed with ADAPTER/PROVIDER set to redis-cluster, it is instead configuring it to memory.

On analysis of code, it seems string "redis-cluster" is not supported for ADAPTER/PROVIDER.

Cache :

CacheService.Adapter = sec.Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache", "twoqueue"})

Session:

SessionConfig.Provider = sec.Key("PROVIDER").In("memory",

[]string{"memory", "file", "redis", "mysql", "postgres", "couchbase", "memcache", "db"})

Documentation Reference
Cache - https://docs.gitea.com/1.20/administration/config-cheat-sheet#cache-cache
Session - https://docs.gitea.com/1.20/administration/config-cheat-sheet#session-session

When it is set to "redis" both cache/session seems to be working fine even for redis cluster instances.

Gitea Version

1.21.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

When redis-cluster is used for ADAPTER/SESSION
tempsnip2

When using redis as ADAPTER
tempsnip

Git Version

No response

Operating System

No response

How are you running Gitea?

Gitea installed in a K8s environment with charts taken from https://dl.gitea.com/charts/

Database

PostgreSQL

@lunny
Copy link
Member

lunny commented Apr 18, 2024

The documentation was updated by #24717 . Maybe you can use redis directly even if it's a redis cluster?

@SomanathThilak
Copy link
Author

Yes as mentioned in the issue , I had tried using redis instead of redis-cluster and it works fine. But since the documentation is different it should be updated.

@lunny lunny added the type/docs This PR mainly updates/creates documentation label Apr 26, 2024
techknowlogick pushed a commit that referenced this issue May 1, 2024
…30794)

This is because it doesn't exist as an adapter. The `redis` adapter
already handles Redis cluster configurations.

Fixes #30534.
kemzeb added a commit to kemzeb/gitea that referenced this issue May 1, 2024
…o-gitea#30794)

Backport go-gitea#30794

This is because it doesn't exist as an adapter. The `redis` adapter
already handles Redis cluster configurations.

Fixes go-gitea#30534.
kemzeb added a commit to kemzeb/gitea that referenced this issue May 1, 2024
…o-gitea#30794)

Backport go-gitea#30794

This is because it doesn't exist as an adapter. The `redis` adapter
already handles Redis cluster configurations.

Fixes go-gitea#30534.
kemzeb added a commit to kemzeb/gitea that referenced this issue May 1, 2024
…o-gitea#30794)

Backport go-gitea#30794

This is because it doesn't exist as an adapter. The `redis` adapter
already handles Redis cluster configurations.

Fixes go-gitea#30534.
kemzeb added a commit to kemzeb/gitea that referenced this issue May 1, 2024
…o-gitea#30794)

This is because it doesn't exist as an adapter. The `redis` adapter
already handles Redis cluster configurations.

Fixes go-gitea#30534.
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/bug type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants