Skip to content

ci: add redis cache testing to nix environment#2024

Open
GEET3001 wants to merge 1 commit into
cashubtc:mainfrom
GEET3001:redis-ci
Open

ci: add redis cache testing to nix environment#2024
GEET3001 wants to merge 1 commit into
cashubtc:mainfrom
GEET3001:redis-ci

Conversation

@GEET3001

@GEET3001 GEET3001 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Description

Resolves #1978

Notes to the reviewers

  • Creates start-redis-single and stop-redis-single Nix scripts for standalone Redis testing (port 6379).
  • Creates start-redis-cluster and stop-redis-cluster Nix scripts for 3-node Redis testing (ports 7001-7003).
  • Updates redisShellHook to export the exact environment variables expected by cdk-axum for both topologies.
  • Creates a test-redis recipe in justfile that spins up both Nix-managed environments and verifies cdk-axum with the redis feature enabled.
  • Creates a new redis-tests CI job in GitHub Actions that runs these tests in the regtest environment, mirroring the existing postgres-tests job.

Suggested CHANGELOG Updates

ADDED

  • Local Redis cluster and single-node testing capabilities natively within the Nix flake (no Docker Compose required).
  • Dedicated CI job (redis-tests) to validate the Redis cache backend in cdk-axum.

Checklist

  • I followed the code style guidelines
  • I ran just quick-check before committing

@github-project-automation github-project-automation Bot moved this to Backlog in CDK Jun 2, 2026
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.59%. Comparing base (feaf823) to head (9e22e37).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2024      +/-   ##
==========================================
- Coverage   71.60%   71.59%   -0.01%     
==========================================
  Files         356      356              
  Lines       74106    74106              
==========================================
- Hits        53065    53059       -6     
- Misses      21041    21047       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GEET3001 GEET3001 force-pushed the redis-ci branch 3 times, most recently from fe8eb63 to 4a6643c Compare June 8, 2026 17:25
@GEET3001

GEET3001 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

All the CI checks are failing with No space left on device (os error 28). The GitHub Actions runner disk is full.

@GEET3001 GEET3001 force-pushed the redis-ci branch 5 times, most recently from 9c92dab to 7fec27b Compare June 13, 2026 17:29

@cdk-bot cdk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified findings approved for disclosure:

  • Register the Redis cleanup trap before starting Redis (medium) - If cluster startup fails, just test-redis leaves the previously-started single-node Redis process running, causing local resource leaks and possible port conflicts or stale state on subsequent test runs.

Comment thread justfile
@thesimplekid

Copy link
Copy Markdown
Collaborator

The new test-redis recipe starts Redis, but the cargo test -p cdk-axum --features redis --lib suite does not currently exercise a live Redis cache. The full test list only includes config parsing/default tests plus unrelated handler/router/ws tests; nothing instantiates HttpCache::from_config with Backend::Redis or calls set/get through the Redis backend. That means this CI job can pass even if single-node or cluster Redis cache operations are broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Add redis cache testing to CI

3 participants