redis-v9-consumer-migration-core

Guides PayCloud consumer services through safe migration from paycloudhelper v1.x to v2.x with redis/go-redis/v9 compatibility and rollout controls.

paycloud-id/paycloudhelper1 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: redis-v9-consumer-migration-core
description: Guides PayCloud consumer services through safe migration from paycloudhelper v1.x to v2.x with redis/go-redis/v9 compatibility and rollout controls.
license: MIT
---

# Redis v9 Consumer Migration (Core)

## Use When

- A consumer service upgrades `github.com/PayCloud-ID/paycloudhelper` to `v2.x`.
- The service currently imports `github.com/go-redis/redis/v8` directly.
- Teams need a production-safe rollout and rollback path.

## Breaking Change Surface

1. `go-redis` import path changes to `github.com/redis/go-redis/v9`.
2. Types in signatures from paycloudhelper now use v9 package symbols.
3. Rebuild is required in each consumer service after dependency update.

## Migration Steps

1. Update module dependency:

```bash
go get github.com/PayCloud-ID/paycloudhelper@v2.0.0
go mod tidy
```

2. Replace direct v8 imports:

```go
// before
import redis "github.com/go-redis/redis/v8"

// after
import redis "github.com/redis/go-redis/v9"
```

3. Keep redis startup via paycloudhelper stable entrypoint:

```go
err := pchelper.InitializeRedisWithRetry(pchelper.RedisInitOptions{
    Options: redis.Options{Addr: cfg.RedisAddr, DB: cfg.RedisDB},
    MaxRetries: 3,
    RetryDelay: 100 * time.Millisecond,
    FailFast: true,
})
if err != nil {
    return fmt.Errorf("init redis: %w", err)
}
```

4. Validate lock paths still treat contention as non-fatal (`acquired=false`, `err=nil`).
5. Run build + tests + race detector in service repo.

## Required Validation Gates

- `go build ./...`
- `go vet ./...`
- `go test ./...`
- `go test -race ./...` (mandatory for init/lock usage)

## Rollout Pattern

1. Deploy to staging with Redis integration tests.
2. Observe lock and cache metrics for 24h.
3. Roll production gradually (canary or shard-based).
4. Roll back by pinning previous paycloudhelper version if needed.

More Database skills

azure-upgrade

microsoft/azure-skills

Assess and upgrade Azure workloads between plans, tiers, or SKUs, or modernize Azure SDK dependencies in source code. WHEN: upgrade Consumption to Flex Consumption, upgrade Azure Functions plan, change hosting plan, function app SKU, migrate App Service to Container Apps, modernize legacy Azure Java SDKs (com.microsoft.azure to com.azure), migrate Azure Cache for Redis (ACR/ACRE) to Azure Managed Redis (AMR).

413.0k

supabase-postgres-best-practices

supabase/agent-skills

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

377.3k

prisma-database-setup

prisma/skills

Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.). Use when setting up a new project, changing databases, or troubleshooting connection issues. Triggers on "configure postgres", "connect to mysql", "setup mongodb", "sqlite setup".

247.3k

← All Database skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY