chore: replace resilience dep with zero-dependency native impl - #73
Merged
Conversation
Removes `@sap-cloud-sdk/resilience` and replaces `timeout`, `retry`, and `circuitBreaker` with a Node-native implementation in `lib/utils/resilience.js`. `AbortController` is now wired into the request signal so timeouts actually cancel the in-flight HTTP call instead of just ignoring it. Retry uses capped exponential backoff with jitter. `CircuitBreaker` uses private class fields and a rolling window, matching the same defaults and error-filter semantics as before.
swaldmann
force-pushed
the
agents-zero-deps-resilience
branch
from
September 1, 2026 16:47
885e7a5 to
39b0eaa
Compare
schiwekM
reviewed
Sep 2, 2026
schiwekM
left a comment
Collaborator
There was a problem hiding this comment.
Nice, could you add it to the anthropic model as well?
schiwekM
reviewed
Sep 2, 2026
schiwekM
reviewed
Sep 2, 2026
swaldmann
force-pushed
the
agents-zero-deps-resilience
branch
from
September 2, 2026 10:02
b4f366f to
39b0eaa
Compare
- Replace circuitBreakerDefaultOptions export with _cbOptions() reading cds.env.agents.circuitBreaker at call time, merging over hardcoded defaults. The test profile sets resetTimeout: 3000 so tests can wait it out reliably. - Key breakers by URI only (not URI + tenantId): the model is shared across tenants so a per-tenant breaker provides no benefit. - Simplify the recover test: trip breaker, wait 3500ms for half-open, then verify the probe call succeeds and closes the breaker. - Raise per-user quota to 10000 in test profile so the trip loops never exhaust the limit.
swaldmann
force-pushed
the
agents-zero-deps-resilience
branch
2 times, most recently
from
September 2, 2026 11:39
3234e03 to
f5a6a26
Compare
schiwekM
previously approved these changes
Sep 2, 2026
Akatuoro
previously approved these changes
Sep 2, 2026
swaldmann
marked this pull request as ready for review
September 3, 2026 16:10
SummaryThe following content is AI-generated and provides a summary of the pull request: Chore: Replace
|
Akatuoro
approved these changes
Sep 3, 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.
@sap-cloud-sdk/resilienceis basically a wrapper aroundasync-retry, last updated 5 years ago.This PR removes
@sap-cloud-sdk/resilienceand replacestimeout,retry, andcircuitBreakerwith a Node-native, zero dependencies implementation.AbortControlleris now wired into the request signal so timeouts actually cancel the in-flight HTTP call instead of just ignoring it. Retry uses capped exponential backoff (32 seconds max) with jitter.Have you...