Skip to content

6169 redis cache bug fix - #6226

Open
raftmsohani wants to merge 2 commits into
developfrom
6169-bug-redis-cache-reads-can-hang-requests-until-gunicorn-aborts-workers
Open

raftmsohani wants to merge 2 commits into
developfrom
6169-bug-redis-cache-reads-can-hang-requests-until-gunicorn-aborts-workers

Conversation

@raftmsohani

@raftmsohani raftmsohani commented Nov 16, 2026 •

Copy link
Copy Markdown

Summary of Changes

Provide a brief summary of changes
Pull request closes #6169 _

  • One-second Redis connection/read timeouts, with retries disabled.
  • Database fallback for optional caches.
  • HTTP 503 when the throttle cache fails.
  • Sentry release metadata, regression tests, and operational documentation.

How to Test

List the steps to test the PR
These steps are generic, please adjust as necessary.

cd tdrs-frontend && docker-compose up --build
cd tdrs-backend && docker-compose up --build
  1. Open http://localhost:3000/ and sign in.
  2. Proceed with functional tests as described herein.
  3. Test steps should be captured in the demo GIF(s) and/or screenshots below.

Demo GIF(s) and screenshots for testing procedure

Deliverables

More details on how deliverables herein are assessed included here.

Deliverable 1: Accepted Features

Checklist of ACs:

  • [insert ACs here]
  • lfrohlich and/or adpennington confirmed that ACs are met.

Deliverable 2: Tested Code

  • Are all areas of code introduced in this PR meaningfully tested?
    • If this PR introduces backend code changes, are they meaningfully tested?
    • If this PR introduces frontend code changes, are they meaningfully tested?
  • Are code coverage minimums met?
    • Frontend coverage: [insert coverage %] (see CodeCov Report comment in PR)
    • Backend coverage: [insert coverage %] (see CodeCov Report comment in PR)

Deliverable 3: Properly Styled Code

  • Are backend code style checks passing on CircleCI?
  • Are frontend code style checks passing on CircleCI?
  • Are code maintainability principles being followed?

Deliverable 4: Accessible

  • Does this PR complete the epic?
  • Are links included to any other gov-approved PRs associated with epic?
  • Does PR include documentation for Raft's a11y review?
  • Did automated and manual testing with iamjolly and ttran-hub using Accessibility Insights reveal any errors introduced in this PR?

Deliverable 5: Deployed

  • Was the code successfully deployed via automated CircleCI process to development on Cloud.gov?

Deliverable 6: Documented

  • Does this PR provide background for why coding decisions were made?
  • If this PR introduces backend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces frontend code, is that code easy to understand and sufficiently documented, both inline and overall?
  • If this PR introduces dependencies, are their licenses documented?
  • Can reviewer explain and take ownership of these elements presented in this code review?

Deliverable 7: Secure

  • Does the OWASP Scan pass on CircleCI?
  • Do manual code review and manual testing detect any new security issues?
  • If new issues detected, is investigation and/or remediation plan documented?

Deliverable 8: User Research

Research product(s) clearly articulate(s):

  • the purpose of the research
  • methods used to conduct the research
  • who participated in the research
  • what was tested and how
  • impact of research on TDP
  • (if applicable) final design mockups produced for TDP development

@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.78543% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.99%. Comparing base (0f6739f) to head (627bef9).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
tdrs-backend/tdpservice/test/test_cache.py 97.19% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6226      +/-   ##
===========================================
+ Coverage    94.94%   94.99%   +0.04%     
===========================================
  Files          644      649       +5     
  Lines        34902    35277     +375     
  Branches       641      641              
===========================================
+ Hits         33139    33512     +373     
- Misses        1649     1651       +2     
  Partials       114      114              
Flag Coverage Δ
dev-backend 95.25% <98.78%> (+0.04%) ⬆️
dev-frontend 92.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tdrs-backend/tdpservice/cache.py 100.00% <100.00%> (ø)
...kend/tdpservice/core/test/test_cache_resilience.py 100.00% <100.00%> (ø)
tdrs-backend/tdpservice/settings/cloudgov.py 100.00% <ø> (ø)
tdrs-backend/tdpservice/settings/common.py 95.39% <100.00%> (+0.48%) ⬆️
...ckend/tdpservice/users/test/test_throttle_cache.py 100.00% <100.00%> (ø)
tdrs-backend/tdpservice/users/throttling.py 100.00% <100.00%> (ø)
tdrs-backend/tdpservice/test/test_cache.py 97.19% <97.19%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e562855...627bef9. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Redis cache reads can hang requests until Gunicorn aborts workers

1 participant