Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions acapy_cache_redis/v0_1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import logging

from aries_cloudagent.cache.base import BaseCache
from aries_cloudagent.config.injection_context import InjectionContext
from aries_cloudagent.protocols.problem_report.v1_0.message import ProblemReport
from acapy_agent.cache.base import BaseCache
from acapy_agent.config.injection_context import InjectionContext
from acapy_agent.protocols.problem_report.v1_0.message import ProblemReport

from .redis_base_cache import RedisBaseCache

Expand Down
10 changes: 6 additions & 4 deletions acapy_cache_redis/v0_1/redis_base_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import json
import logging

from aries_cloudagent.cache.base import BaseCache, CacheKeyLock
from aries_cloudagent.core.profile import Profile
from aries_cloudagent.core.error import BaseError
from acapy_agent.cache.base import BaseCache, CacheKeyLock
from acapy_agent.core.profile import Profile
from acapy_agent.core.error import BaseError
from redis.asyncio import RedisCluster
from redis.exceptions import RedisError, RedisClusterException
from typing import Any, Sequence, Text, Union
Expand Down Expand Up @@ -97,7 +97,9 @@ async def check_for_redis_cluster(self):
"Found redis connection string correspond to a cluster node,"
" reassigning redis to redis.asyncio.RedisCluster client."
)
self.root_profile.injector.bind_instance(RedisCluster, self.redis)
self.root_profile.context.injector.bind_instance(
RedisCluster, self.redis
)
await self.redis.ping(target_nodes=RedisCluster.PRIMARIES)
else:
LOGGER.info("Using an existing provided instance of RedisCluster.")
Expand Down
2 changes: 1 addition & 1 deletion acapy_cache_redis/v0_1/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from aries_cloudagent.protocols.problem_report.v1_0.message import (
from acapy_agent.protocols.problem_report.v1_0.message import (
ProblemReport as report,
)

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim-bullseye
FROM python:3.12-slim-bullseye
WORKDIR /usr/src/app/

ENV POETRY_HOME=/opt/poetry \
Expand Down
5 changes: 5 additions & 0 deletions docker/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ plugin-config-value:
# - redis_cache.credentials.username="username"
# - redis_cache.credentials.password="password"
# - redis_cache.ssl.cacerts=./ca.crt

auto-provision: true
wallet-name: default
wallet-type: askar-anoncreds
wallet-key: "insecure"
5 changes: 5 additions & 0 deletions docker/default_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ plugin-config-value:
- redis_cache.credentials.username="default"
- redis_cache.credentials.password="test1234"
# - redis_cache.ssl.cacerts=./ca.crt

auto-provision: true
wallet-name: default
wallet-type: askar-anoncreds
wallet-key: "insecure"
2 changes: 1 addition & 1 deletion int/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim-bullseye
FROM python:3.12-slim-bullseye
WORKDIR /usr/src/app/

ENV POETRY_HOME=/opt/poetry \
Expand Down
8 changes: 8 additions & 0 deletions int/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ services:
--plugin acapy_cache_redis.v0_1
--plugin-config-value redis_cache.connection="redis://default:test1234@172.28.0.103:6382"
--log-level debug
--auto-provision
--wallet-name default
--wallet-type askar-anoncreds
--wallet-key "insecure"
networks:
- acapy_default
depends_on:
Expand Down Expand Up @@ -193,6 +197,10 @@ services:
--plugin acapy_cache_redis.v0_1
--plugin-config-value redis_cache.connection="redis://redis-host:6379/0"
--log-level debug
--auto-provision
--wallet-name default
--wallet-type askar-anoncreds
--wallet-key "insecure"
healthcheck:
test: curl -s -o /dev/null -w '%{http_code}' "http://localhost:3004/status/live" | grep "200" > /dev/null
start_period: 30s
Expand Down
3,637 changes: 1,995 additions & 1,642 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description = "ACA-Py Cache Plugin for Redis enabling common cache on clustered
authors = ["Colton Wolkins <colton@indicio.tech>", "Kim Ebert <kim@indicio.tech>", "Alex Walker <alex.walker@indicio.tech>"]

[tool.poetry.dependencies]
python = "^3.9.0"
aries-cloudagent = {version = ">=0.11.0,<1.0.0", extras = ["askar"]}
python = "^3.12.0"
acapy-agent = {version = ">=1.2.0,<1.4.0"}
redis = "^4.3.0"

[tool.poetry.dev-dependencies]
Expand Down
Loading