Skip to content

feat(client): configurable retryAttempts and opt-out retryWrites (3.6.0) - #24

Merged
wagnert merged 13 commits into
developfrom
feature/retry-attempts-no-write-retry
Oct 10, 2026
Merged

wagnert merged 13 commits into
developfrom
feature/retry-attempts-no-write-retry

Conversation

@wagnert

@wagnert wagnert commented Oct 9, 2026

Copy link
Copy Markdown
Member

Retry configurable: retryAttempts and retryWrites (3.6.0)

Behavior

  • ConnectionDefinition.retryAttempts (optional, default 3, integer >= 1) is now evaluated by AppSheetClient. It was hardcoded to 3 before; AppSheetConfig.retryAttempts was never evaluated and is documented as such.
  • ConnectionDefinition.retryWrites (optional boolean, default true). With false, add, update and delete are never retried automatically: exactly one request, errors are thrown immediately. find keeps retrying with retryAttempts.
  • Why: mutations are not idempotent; a retry after a timeout or 5xx can write twice.
  • Invalid values (retryWrites not a boolean, including the string 'false' from an env file; retryAttempts not an integer >= 1) throw a ValidationError in the constructor.

Compatibility

No behavior change for existing users: without the new options the retry path is identical to 3.5.1 (3 attempts, backoff 1 s / 2 s, same error types). Minor version 3.6.0, CHANGELOG and README section "Retries" updated. Note: callers that spread an invalid retryAttempts value into the connection definition (it was ignored before) now get a ValidationError. In YAML/JSON schemas literal values must be used, not ${ENV} placeholders (documented).

Verification

509 tests green (17 suites), lint without errors, build ok. A throwaway script against dist/ with an always-500 adapter confirmed default, retryWrites:false, retryAttempts 1/3/5 and the validation (21 checks).

Branch notes

  • The branch was cut from develop and origin/main (3.5.1 publish configuration, 3aa00f0) was merged in, because develop is behind main. The diff of this PR therefore also contains the publish configuration of chore: publish package via GitHub Packages #23 (release workflow, LICENSE, package metadata).
  • Please merge with squash so that the superseded intermediate commit a9196c4 (writes never retried) does not stay in the history.
  • No tag and no release with this PR.

🤖 Generated with Claude Code

wagnert and others added 13 commits March 12, 2026 17:02
* chore: publish package via GitHub Packages

Add repository, publishConfig and author to package.json, add MIT LICENSE
file and switch release workflow to GitHub Packages with GITHUB_TOKEN.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* chore: bump version to 3.5.1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ions

BREAKING BEHAVIOR (non-API): add, update and delete are no longer retried
automatically because they are not idempotent. find keeps retrying, now
bounded by the configurable retryAttempts (default 3).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…them

Default stays true so existing users see no behavior change. retryWrites: false
sends add/update/delete exactly once, since mutations are not idempotent.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@wagnert
wagnert merged commit f1c0be9 into develop Oct 10, 2026
4 checks passed
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.

1 participant