Skip to content

Conversation

@bizob2828
Copy link
Member

Description

This was a fun one and I explain the fix in the comments of lib/subscribers/ioredis/index.js. tl;dr: ioredis breaks promise chains and we expose that when using tracePromise.
We didn't catch this when we migrated ioredis because we lacked both error tests and pipeline tests. This PR adds those to avoid future regressions.

Related Links

Closes #3448.

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.62%. Comparing base (41d32be) to head (4446113).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
lib/subscribers/ioredis/index.js 91.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3457      +/-   ##
==========================================
- Coverage   97.75%   97.62%   -0.14%     
==========================================
  Files         405      405              
  Lines       54698    54720      +22     
  Branches        1        1              
==========================================
- Hits        53469    53418      -51     
- Misses       1229     1302      +73     
Flag Coverage Δ
integration-tests-cjs-20.x 73.93% <50.00%> (-0.02%) ⬇️
integration-tests-cjs-22.x 73.97% <50.00%> (-0.01%) ⬇️
integration-tests-cjs-24.x 74.64% <50.00%> (-0.02%) ⬇️
integration-tests-esm-20.x 51.74% <50.00%> (-0.01%) ⬇️
integration-tests-esm-22.x 51.79% <50.00%> (-0.01%) ⬇️
integration-tests-esm-24.x 53.02% <50.00%> (-0.01%) ⬇️
unit-tests-20.x 88.47% <50.00%> (-0.03%) ⬇️
unit-tests-22.x 88.48% <50.00%> (-0.02%) ⬇️
unit-tests-24.x 88.52% <50.00%> (-0.02%) ⬇️
versioned-tests-20.x 80.91% <93.75%> (-0.33%) ⬇️
versioned-tests-22.x 80.92% <93.75%> (-0.33%) ⬇️
versioned-tests-24.x 80.86% <93.75%> (-0.33%) ⬇️

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.

@bizob2828 bizob2828 requested a review from jsumners-nr October 23, 2025 15:17
@bizob2828 bizob2828 changed the title fix: Updated ioredis instrumentation to handle breakage of promise chanin when using .pipeline. fix: Updated ioredis instrumentation to handle breakage of errors when using .pipeline. Oct 23, 2025
@bizob2828 bizob2828 merged commit 49f4d93 into newrelic:main Oct 23, 2025
58 of 62 checks passed
@github-project-automation github-project-automation bot moved this from Needs PR Review to Done: Issues recently completed in Node.js Engineering Board Oct 23, 2025
@bizob2828 bizob2828 deleted the ioredis-fix branch October 23, 2025 20:29
@github-actions github-actions bot mentioned this pull request Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done: Issues recently completed

Development

Successfully merging this pull request may close these issues.

Redis instrumentation for ioredis using pipelines creates uncatchable, unhandled rejected promises starting with v13.2.0 crashing the process

3 participants