Skip to content

fix: retry transient no-response network errors instead of aborting - #5773

Merged
maheshkutty merged 6 commits into
developfrom
harness/INT-7348-fix-gladly-retry-transient-look-b6244d5f
Nov 16, 2026
Merged

maheshkutty merged 6 commits into
developfrom
harness/INT-7348-fix-gladly-retry-transient-look-b6244d5f

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Classify EMFILE, ENFILE, EPIPE, EHOSTUNREACH, ENETUNREACH and EADDRNOTAVAIL as retryable 500s when a request gets no HTTP response. Gladly's customer lookup branched on this status, so it now fails a lookup error with its own status instead of building a create or a malformed update. Add regression tests for the shared mapping, proxy delivery, and Gladly; update HubSpot's EPIPE expectation. Add guidance on lookup and transport-failure handling to the batching-framework skills.

Errors now retried (5xx)

Reference: libuv error constants for the system codes (Node.js reports them as err.code without the UV_ prefix).

  • EMFILE: the transformer process ran out of file descriptors.
  • ENFILE: the host ran out of file descriptors system-wide.
  • EPIPE: the transformer wrote to a connection the destination had already closed, e.g. a stale keep-alive socket.
  • EHOSTUNREACH: there is no network route to the destination host.
  • ENETUNREACH: there is no route to the destination's network.
  • EADDRNOTAVAIL: no local address or port is free for a new connection (ephemeral port exhaustion).

ENETDOWN and ERR_SOCKET_CONNECTION_TIMEOUT remain on the unknown-code 400 fallback; neither was reproducible through the transformer HTTP client during review.

What is the related Linear task?

Resolves INT-7348

Please explain the objectives of your changes below

Preserve existing permanent-error classification and Gladly's established create-on-400 and successful-update behavior while retrying transient failures.

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

The six no-response errors above now return 500 instead of 400. Gladly lookup failures other than status 400 now return a network error before customer creation or update.

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

The existing shared Node-system-error status map was extended; no new utility was introduced.

Any technical or performance related pointers to consider with the change?

No new network calls. Gladly secret-path regeneration confirmed headers.Authorization is unchanged; the destination-only generated map was not committed.

Validation

  • npm run lint, npm run build:ci, and npm run build:test passed.
  • npm test -- --testPathPattern='(networkUtils|delivery|lookup)' --runInBand --no-coverage --silent: 21 suites, 460 tests passed.
  • npm run test:ts -- component --destination=gladly --no-coverage --runInBand --silent: 14 tests passed.
  • Secret-path regeneration passed; git diff --check passed. The controller suite also passed after the final mock-cleanup edit.
  • Code-simplify review: No simplifications worth making.
  • Live integration verification: skipped; mini ps --services transformer rudder-server showed no running services, and the transformer sha-pinned image build cannot run this source change in the sandbox.

⚠️ Known Issues

Live mini verification was skipped because the transformer source build uses a sha-pinned base that is not source-verifiable in this sandbox. The targeted unit and component tests passed.


Developer checklist

  • My code follows the style guidelines of this project
  • No breaking changes are being introduced.
  • All related docs linked with the PR?
  • All changes manually tested?
  • Any documentation changes needed with this change? Yes: .claude/skills/batching-framework*/SKILL.md.
  • Is the PR limited to 10 file changes?
  • Is the PR limited to one linear task?
  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?
  • Verified that there are no credentials or confidential data exposed with the changes.

@rudder-devbox

rudder-devbox Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from task INT-7348.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fdf8b801-c806-4833-af51-c20f405ff447

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Pre-merge checks: Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.45%. Comparing base (bed27bd) to head (40d6fe1).
⚠️ Report is 15 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5773   +/-   ##
========================================
  Coverage    92.44%   92.45%           
========================================
  Files          741      741           
  Lines        41121    41172   +51     
  Branches      9676     9691   +15     
========================================
+ Hits         38015    38065   +50     
- Misses        2845     2846    +1     
  Partials       261      261           

☔ View full report in Codecov by Harness.
📢 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.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
@maheshkutty maheshkutty changed the title fix(gladly): retry transient lookup and no-response errors fix: retry transient no-response network errors instead of aborting Nov 11, 2026
@maheshkutty
maheshkutty marked this pull request as ready for review November 11, 2026 10:32
@maheshkutty
maheshkutty requested review from a team as code owners November 11, 2026 10:32
Copilot AI balanced review requested due to automatic review settings November 11, 2026 10:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
Comment thread src/adapters/utils/networkUtils.js Resolved
Comment thread src/adapters/utils/networkUtils.js Resolved
@rudder-devbox

rudder-devbox Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@rudder-devbox
rudder-devbox Bot requested a review from maheshkutty November 13, 2026 05:13
@rudder-devbox

rudder-devbox Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@sonarqubecloud

Copy link
Copy Markdown

@maheshkutty
maheshkutty merged commit a363039 into develop Nov 16, 2026
51 of 52 checks passed
@maheshkutty
maheshkutty deleted the harness/INT-7348-fix-gladly-retry-transient-look-b6244d5f branch November 16, 2026 11:38
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.

4 participants