fix(api): drop .d.ts hunks from ioredis patch so it survives the e2e build#6149
Merged
Conversation
…build The E2E "Build Docker" job started failing (patch-package: "Failed to apply patch for package ioredis") after RI-8296 (#6100) added patches/ioredis+5.3.2.patch. The patch modified ioredis' built/*.d.ts files. .github/build/build_modules.sh installs the API (patch applies), then runs `yarn autoclean` with .yarnclean.prod — whose `*.ts` rule also deletes `*.d.ts` — and then re-installs, which re-runs patch-package. Because the patch's target .d.ts files were stripped by autoclean, patch-package can no longer apply it and the build fails. (The host workspace build passes because it never autocleans.) The .d.ts changes are type-only and unused by our build: prepareCommandOptions returns `any`, and RedisClient defines its own `integerReply` type — nothing type-checks against ioredis' CommandOptions. So drop the two .d.ts hunks and keep only the runtime Command.js / DataHandler.js changes. patch-package is then idempotent across the autoclean+reinstall cycle. Reproduced the full install -> autoclean -> reinstall sequence locally: the .js-only patch applies cleanly on both passes (`ioredis@5.3.2 ✔`). Co-Authored-By: Claude <noreply@anthropic.com>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
VaskoAtanasovRedis
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The E2E Build Docker job was failing with
patch-package: "Failed to apply patch for package ioredis".Root cause: RI-8296 (#6100) added
patches/ioredis+5.3.2.patch, which modifies ioredis'built/*.d.tsfiles..github/build/build_modules.shinstalls the API (patch applies), then runsyarn autocleanwith.yarnclean.prod— whose*.tsrule also deletes*.d.ts— and then re-installs, re-runningpatch-package. With the target.d.tsfiles stripped by autoclean, patch-package can no longer apply the patch and the build fails. (The host workspace build passes because it never autocleans.)Fix: drop the two type-only
.d.tshunks and keep only the runtimeCommand.js/DataHandler.jschanges. The.d.tsadditions are unused by our build —prepareCommandOptionsreturnsany, andRedisClientdefines its ownintegerReplytype, so nothing type-checks against ioredis'CommandOptions. patch-package is then idempotent across the autoclean → reinstall cycle.Testing
.js-only patch applies cleanly on both passes (ioredis@5.3.2 ✔).type-check / tsc baselines,Build API,Build Linux, anddocker-buildall pass — confirming no type or runtime impact outside the patch.🤖 Generated with Claude Code
Note
Low Risk
Packaging-only change to the patch file; runtime ioredis bigint behavior is unchanged and CI already validated type-check and Docker build.
Overview
Fixes Build Docker failures where
patch-packagecould not re-apply theioredis+5.3.2patch afteryarn autoclean(.yarnclean.prodremoves*.d.ts, including patchedbuilt/*.d.tstargets).The patch is trimmed to runtime-only changes in
Command.jsandDataHandler.js(still wiringintegerReply/biginthandling). The removedCommand.d.ts/DataHandler.d.tshunks were type-only and unused by the API build, so behavior is unchanged while the patch stays applyable on install → autoclean → reinstall.Reviewed by Cursor Bugbot for commit 28c5400. Bugbot is set up for automated code reviews on this repo. Configure here.