Skip to content
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
8 changes: 3 additions & 5 deletions reference-apps/fastapi-api-first/app/middleware/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,9 @@ async def init(self, redis_url: str, prefix: str = "cache:"):
prefix: Cache key prefix
"""
try:
self.redis_client = aioredis.from_url(
redis_url,
encoding="utf8",
decode_responses=True
)
# Note: decode_responses must be False (default) for fastapi-cache2
# as it stores cached data as binary/bytes
self.redis_client = aioredis.from_url(redis_url)

# Test connection
await self.redis_client.ping()
Expand Down
4 changes: 3 additions & 1 deletion reference-apps/fastapi-api-first/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ motor==3.7.1
pymongo==4.15.5

# Redis and Caching
redis[hiredis]==7.1.0 # Compatible with fastapi-cache2 (requires <5.0.0)
# redis 4.3.0+ required for redis.asyncio.cluster module used by fastapi-cache2
# redis 4.6.0 is the latest 4.x version compatible with fastapi-cache2 (<5.0.0 requirement)
redis[hiredis]==4.6.0 # fastapi-cache2 0.2.2 requires redis>=4.2.0rc1,<5.0.0
fastapi-cache2[redis]==0.2.2 # Response caching

# RabbitMQ
Expand Down
8 changes: 3 additions & 5 deletions reference-apps/fastapi/app/middleware/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,9 @@ async def init(self, redis_url: str, prefix: str = "cache:"):
prefix: Cache key prefix
"""
try:
self.redis_client = aioredis.from_url(
redis_url,
encoding="utf8",
decode_responses=True
)
# Note: decode_responses must be False (default) for fastapi-cache2
# as it stores cached data as binary/bytes
self.redis_client = aioredis.from_url(redis_url)

# Test connection
await self.redis_client.ping()
Expand Down
4 changes: 3 additions & 1 deletion reference-apps/fastapi/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ motor==3.7.1
pymongo==4.15.5

# Redis and Caching
redis[hiredis]==7.1.0 # fastapi-cache2 0.2.2 requires redis<5.0.0
# redis 4.3.0+ required for redis.asyncio.cluster module used by fastapi-cache2
# redis 4.6.0 is the latest 4.x version compatible with fastapi-cache2 (<5.0.0 requirement)
redis[hiredis]==4.6.0 # fastapi-cache2 0.2.2 requires redis>=4.2.0rc1,<5.0.0
fastapi-cache2[redis]==0.2.2 # Response caching

# RabbitMQ
Expand Down
5 changes: 5 additions & 0 deletions reference-apps/golang/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/google/uuid v1.6.0
github.com/hashicorp/vault/api v1.22.0
github.com/jackc/pgx/v5 v5.7.6
github.com/prometheus/client_golang v1.19.1
github.com/rabbitmq/amqp091-go v1.10.0
github.com/redis/go-redis/v9 v9.17.2
github.com/sirupsen/logrus v1.9.3
Expand All @@ -16,6 +17,7 @@ require (

require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.14.0 // indirect
github.com/bytedance/sonic/loader v0.3.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
Expand Down Expand Up @@ -53,6 +55,9 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/quic-go/quic-go v0.54.1 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
Expand Down
10 changes: 10 additions & 0 deletions reference-apps/golang/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
Expand Down Expand Up @@ -110,6 +112,14 @@ github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=
github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
github.com/quic-go/quic-go v0.54.1 h1:4ZAWm0AhCb6+hE+l5Q1NAL0iRn/ZrMwqHRGQiFwj2eg=
Expand Down
6 changes: 3 additions & 3 deletions tests/test-vault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,13 @@ test_management_commands() {
info "Test 10: Management script Vault commands work"

# Test vault-status
if "$PROJECT_RO../devstack" vault-status &>/dev/null; then
if "$PROJECT_ROOT/devstack" vault-status &>/dev/null; then
# Test vault-token
local token=$("$PROJECT_RO../devstack" vault-token 2>/dev/null)
local token=$("$PROJECT_ROOT/devstack" vault-token 2>/dev/null)

if [ -n "$token" ]; then
# Test vault-show-password
local password=$("$PROJECT_RO../devstack" vault-show-password postgres 2>/dev/null)
local password=$("$PROJECT_ROOT/devstack" vault-show-password postgres 2>/dev/null)

if [ -n "$password" ]; then
success "Management commands work correctly"
Expand Down
Loading