diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba0c515f944e..6c845bc85051 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,8 +76,8 @@ jobs: POSTGRES_INITDB_ARGS: '--no-sync --set fsync=off --set full_page_writes=off' # Set health checks to wait until postgres has started options: --health-cmd "pg_isready --username=postgres --dbname=postgres" --health-interval 10s --health-timeout 5s --health-retries 5 - redis: - image: ${{ (matrix.name == 'Tests') && 'redis:7.0' || '' }} + cache: + image: ${{ (matrix.name == 'Tests') && 'valkey/valkey:8-alpine' || '' }} ports: - 6379:6379 stripe: diff --git a/dev/environment b/dev/environment index 2c211998cdee..985e12ec177d 100644 --- a/dev/environment +++ b/dev/environment @@ -16,7 +16,7 @@ DATABASE_URL=postgresql+psycopg://postgres@db/warehouse OPENSEARCH_URL=http://opensearch:9200/development -REDIS_URL=redis://redis:6379 +REDIS_URL=redis://cache:6379 SESSION_SECRET="an insecure development secret" diff --git a/docker-compose.yml b/docker-compose.yml index b9a9267aa221..429c99dbcfa2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,8 +31,8 @@ services: ports: - "12111:12111" - redis: - image: redis:7.0 + cache: + image: valkey/valkey:8-alpine opensearch: build: @@ -113,7 +113,7 @@ services: condition: service_healthy opensearch: condition: service_started - redis: + cache: condition: service_started stripe: condition: service_started @@ -127,7 +127,7 @@ services: depends_on: db: condition: service_healthy - redis: + cache: condition: service_started stripe: condition: service_started @@ -168,12 +168,12 @@ services: - 8001:80 stop_signal: SIGKILL environment: - - RSTUF_BROKER_SERVER=redis://redis/1 - - RSTUF_REDIS_SERVER=redis://redis + - RSTUF_BROKER_SERVER=redis://cache/1 + - RSTUF_REDIS_SERVER=redis://cache - RSTUF_REDIS_SERVER_DB_RESULT=1 - RSTUF_REDIS_SERVER_DB_REPO_SETTINGS=2 depends_on: - redis: + cache: condition: service_started rstuf-worker: @@ -186,15 +186,15 @@ services: - RSTUF_STORAGE_BACKEND=LocalStorage - RSTUF_ONLINE_KEY_DIR=/keyvault - RSTUF_LOCAL_STORAGE_BACKEND_PATH=/var/opt/repository-service-tuf/storage - - RSTUF_BROKER_SERVER=redis://redis/1 - - RSTUF_REDIS_SERVER=redis://redis + - RSTUF_BROKER_SERVER=redis://cache/1 + - RSTUF_REDIS_SERVER=redis://cache - RSTUF_REDIS_SERVER_DB_RESULT=1 - RSTUF_REDIS_SERVER_DB_REPO_SETTINGS=2 - RSTUF_SQL_SERVER=postgresql://postgres@db:5432/rstuf depends_on: db: condition: service_healthy - redis: + cache: condition: service_started static: diff --git a/docs/dev/development/getting-started.rst b/docs/dev/development/getting-started.rst index 3997600a013d..4e389b381a52 100644 --- a/docs/dev/development/getting-started.rst +++ b/docs/dev/development/getting-started.rst @@ -656,7 +656,7 @@ do this: $ make shell docker compose run --rm web python -m warehouse shell - Starting warehouse_redis_1 ... + Starting warehouse_cache_1... ... (InteractiveConsole) >>> diff --git a/pyproject.toml b/pyproject.toml index bc030d39192b..56d6e67eb78a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ ignore_missing_imports = true [tool.pytest.ini_options] addopts = [ "--disable-socket", - "--allow-hosts=localhost,::1,stripe,redis", + "--allow-hosts=localhost,::1,stripe,cache", "--durations=20", "--numprocesses=auto", # Disable ddtrace for tests diff --git a/tests/conftest.py b/tests/conftest.py index d8c9310704cf..3c136b79bd58 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -326,7 +326,7 @@ def get_app_config(database, nondefaults=None): "database.url": database, "docs.url": "http://docs.example.com/", "ratelimit.url": "memory://", - "db_results_cache.url": "redis://redis:0/", + "db_results_cache.url": "redis://cache:0/", "opensearch.url": "https://localhost/warehouse", "files.backend": "warehouse.packaging.services.LocalFileStorage", "archive_files.backend": "warehouse.packaging.services.LocalArchiveFileStorage", @@ -410,8 +410,8 @@ def app_config_dbsession_from_env(database): "warehouse.db_create_session": lambda r: r.environ.get("warehouse.db_session"), "breached_passwords.backend": "warehouse.accounts.services.NullPasswordBreachedService", # noqa: E501 "token.two_factor.secret": "insecure token", - # A running redis service is required for functional web sessions - "sessions.url": "redis://redis:0/", + # A running redis-like service is required for functional web sessions + "sessions.url": "redis://cache:0/", } return get_app_config(database, nondefaults)