Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(ci, backend): Update Redis image & amend config to work with it (#10952)

Reinier van der Leera978e9127129
diff --git a/.github/workflows/platform-backend-ci.yml b/.github/workflows/platform-backend-ci.yml
index dfec689969..f962382fa5 100644
--- a/.github/workflows/platform-backend-ci.yml
+++ b/.github/workflows/platform-backend-ci.yml
@@ -37,9 +37,7 @@ jobs:
services:
redis:
- image: bitnami/redis:6.2
- env:
- REDIS_PASSWORD: testpassword
+ image: redis:latest
ports:
- 6379:6379
rabbitmq:
@@ -204,7 +202,6 @@ jobs:
JWT_VERIFY_KEY: ${{ steps.supabase.outputs.JWT_SECRET }}
REDIS_HOST: "localhost"
REDIS_PORT: "6379"
- REDIS_PASSWORD: "testpassword"
ENCRYPTION_KEY: "dvziYgz0KSK8FENhju0ZYi8-fRTfAdlz6YLhdB_jhNw=" # DO NOT USE IN PRODUCTION!!
env:
diff --git a/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/config.py b/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/config.py
index 76c9abaa07..beafc14f24 100644
--- a/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/config.py
+++ b/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/config.py
@@ -1,3 +1,5 @@
+from typing import Optional
+
from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict
@@ -13,8 +15,8 @@ class RateLimitSettings(BaseSettings):
default="6379", description="Redis port", validation_alias="REDIS_PORT"
)
- redis_password: str = Field(
- default="password",
+ redis_password: Optional[str] = Field(
+ default=None,
description="Redis password",
validation_alias="REDIS_PASSWORD",
)
diff --git a/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/limiter.py b/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/limiter.py
index 7ac122429c..f86434d60b 100644
--- a/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/limiter.py
+++ b/autogpt_platform/autogpt_libs/autogpt_libs/rate_limit/limiter.py
@@ -11,7 +11,7 @@ class RateLimiter:
self,
redis_host: str = RATE_LIMIT_SETTINGS.redis_host,
redis_port: str = RATE_LIMIT_SETTINGS.redis_port,
- redis_password: str = RATE_LIMIT_SETTINGS.redis_password,
+ redis_password: str | None = RATE_LIMIT_SETTINGS.redis_password,
requests_per_minute: int = RATE_LIMIT_SETTINGS.requests_per_minute,
):
self.redis = Redis(
diff --git a/autogpt_platform/backend/.env.default b/autogpt_platform/backend/.env.default
index 4655d57621..c20eef0893 100644
--- a/autogpt_platform/backend/.env.default
+++ b/autogpt_platform/backend/.env.default
@@ -21,7 +21,7 @@ PRISMA_SCHEMA="postgres/schema.prisma"
# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
-REDIS_PASSWORD=password
+# REDIS_PASSWORD=
# RabbitMQ Credentials
RABBITMQ_DEFAULT_USER=rabbitmq_user_default
diff --git a/autogpt_platform/backend/backend/data/redis_client.py b/autogpt_platform/backend/backend/data/redis_client.py
index c6225131f2..5b5d25b880 100644
--- a/autogpt_platform/backend/backend/data/redis_client.py
+++ b/autogpt_platform/backend/backend/data/redis_client.py
@@ -13,7 +13,7 @@ load_dotenv()
HOST = os.getenv("REDIS_HOST", "localhost")
PORT = int(os.getenv("REDIS_PORT", "6379"))
-PASSWORD = os.getenv("REDIS_PASSWORD", "password")
+PASSWORD = os.getenv("REDIS_PASSWORD", None)
logger = logging.getLogger(__name__)
diff --git a/autogpt_platform/docker-compose.platform.yml b/autogpt_platform/docker-compose.platform.yml
index fa911f2dbf..1f18a1b3ca 100644
--- a/autogpt_platform/docker-compose.platform.yml
+++ b/autogpt_platform/docker-compose.platform.yml
@@ -65,7 +65,6 @@ services:
redis:
image: redis:latest
- command: redis-server --requirepass password
ports:
- "6379:6379"
networks: