Skip to content

fix: Use hashed request_id as cache key in shared RQ client reclaim_request#795

Open
vdusek wants to merge 1 commit intomasterfrom
fix/rq-shared-client-cache-key
Open

fix: Use hashed request_id as cache key in shared RQ client reclaim_request#795
vdusek wants to merge 1 commit intomasterfrom
fix/rq-shared-client-cache-key

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Feb 16, 2026

Summary

  • In ApifyRequestQueueSharedClient.reclaim_request, the cache key was set to request.unique_key (raw URL string) instead of the hashed request_id (via unique_key_to_request_id)
  • Every other _cache_request call in the class uses the hashed request_id, creating an inconsistency that causes orphaned cache entries
  • After reclaiming, future cache lookups by request_id would miss the reclaimed request, potentially causing re-fetches or incorrect processing

Test plan

  • CI passes

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

…equest

The reclaim_request method was using request.unique_key directly as the
cache key, while all other methods use unique_key_to_request_id() to
compute a hashed request_id. This inconsistency caused orphaned cache
entries since cached requests were stored under a different key than
what other methods would look up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Feb 16, 2026
@vdusek vdusek self-assigned this Feb 16, 2026
@github-actions github-actions bot added this to the 134th sprint - Tooling team milestone Feb 16, 2026
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.57%. Comparing base (252eb4e) to head (0109136).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #795      +/-   ##
==========================================
+ Coverage   85.46%   85.57%   +0.11%     
==========================================
  Files          46       46              
  Lines        2697     2697              
==========================================
+ Hits         2305     2308       +3     
+ Misses        392      389       -3     
Flag Coverage Δ
e2e 35.40% <0.00%> (ø)
integration 57.50% <100.00%> (+0.03%) ⬆️
unit 72.52% <0.00%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek added the bug Something isn't working. label Feb 16, 2026
@vdusek vdusek marked this pull request as ready for review February 16, 2026 17:12
@vdusek vdusek requested a review from Pijukatel February 16, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. bug Something isn't working. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant