Skip to content

fix(api): drop .d.ts hunks from ioredis patch so it survives the e2e build#6149

Merged
KrumTy merged 1 commit into
mainfrom
fix/e2e-docker-ioredis-patch
Jul 2, 2026
Merged

fix(api): drop .d.ts hunks from ioredis patch so it survives the e2e build#6149
KrumTy merged 1 commit into
mainfrom
fix/e2e-docker-ioredis-patch

Conversation

@KrumTy

@KrumTy KrumTy commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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.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, re-running patch-package. With the target .d.ts files 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.ts hunks and keep only the runtime Command.js / DataHandler.js changes. The .d.ts additions are unused by our build — prepareCommandOptions returns any, and RedisClient defines its own integerReply type, so nothing type-checks against ioredis' CommandOptions. patch-package is then idempotent across the autoclean → reinstall cycle.

Testing

  • Reproduced the full install → autoclean → reinstall sequence locally; the .js-only patch applies cleanly on both passes (ioredis@5.3.2 ✔).
  • CI on this branch: the previously-red Build Docker job is now green, and type-check / tsc baselines, Build API, Build Linux, and docker-build all pass — confirming no type or runtime impact outside the patch.
  • Link to succesfull Docker build: https://github.com/redis/RedisInsight/actions/runs/28583728882/job/84762367552

🤖 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-package could not re-apply the ioredis+5.3.2 patch after yarn autoclean (.yarnclean.prod removes *.d.ts, including patched built/*.d.ts targets).

The patch is trimmed to runtime-only changes in Command.js and DataHandler.js (still wiring integerReply / bigint handling). The removed Command.d.ts / DataHandler.d.ts hunks 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.

…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>
@KrumTy KrumTy requested a review from a team as a code owner July 2, 2026 11:27
@jit-ci

jit-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@KrumTy KrumTy merged commit 2350283 into main Jul 2, 2026
47 of 50 checks passed
@KrumTy KrumTy deleted the fix/e2e-docker-ioredis-patch branch July 2, 2026 12:08
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.

2 participants