fix(destinations): staged_upload/salesforce_bulk honor sync.retry and sync.rate_limit (#1048) - #1067
Merged
Merged
Conversation
… sync.rate_limit (#1048) Wire the shared resolve_retry()/resolve_rate_limiter() helpers into the safe, idempotent job-status polling legs of both destinations. Initial stage/trigger/create/upload/close calls stay unretried since replaying them after an ambiguous failure could duplicate jobs or uploads. Retry-correctness fixes from adversarial review, folded in: - Staged Upload retries only GET/HEAD polls; mutating poll methods execute once, since retrying them could replay a side effect. - Every physical retry attempt acquires its own rate-limit slot, instead of one acquire covering all retries of one status check. - Poll timeouts bound retry backoff and each request's own network timeout to the remaining budget, and reject a late-arriving success past the deadline. Also regenerates the VS Code extension's bundled JSON schemas for the new retry/rate_limit config fields (schema-drift CI check). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
masukai
force-pushed
the
fix/1048-staged-retry-ratelimit
branch
from
September 1, 2026 03:02
fdfa177 to
675b29c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ching CI My local dev environment's pydantic (2.12.5) produced a different JSON Schema shape for the destination union than a clean install resolves (2.13.5, matching what CI's `uv pip install --system -e .` gets) — the previously-committed bundled schema was already stale relative to #997's callable-discriminator change, independent of this PR. Filed #1070 to pin/stabilize this so it doesn't surprise future PRs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tween polls Codecov flagged one uncovered line: staged_upload.py's poll loop raising TimeoutError at the top of an iteration when the deadline has already passed (e.g. an interval sleep after a non-terminal status consumed the remaining budget), distinct from the already-covered post-response deadline check. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Closes #1048.
StagedUploadDestinationandSalesforceBulkDestinationperformed HTTP calls directly, bypassingsync.retry/sync.rate_limitentirely despite defining quota identities that imply those settings apply.What changed
retry/rate_limitoverride fields to both config models, matching every other rate-limited destination.resolve_retry()/resolve_rate_limiter()+with_retry()into each destination's job-status polling leg only — the safe, idempotent part of the lifecycle.Note: unrelated pre-existing failure found while testing
Running the full local unit suite surfaced 2 failures in
tests/unit/test_state_objectstore.pyunrelated to this change — confirmed present on a cleanorigin/maincheckout too. Filed separately as #1066 (hardcoded dates in a retention-prune test compared against the real wall clock — a time-bomb that just crossed a boundary). Not fixed here; out of scope.Verification
ruff check drt tests— cleanmypy drt— clean, 200 filespytest tests/unit— full suite green except the 2 pre-existing bug(tests): test_state_objectstore.py retention-prune tests use hardcoded dates against a real clock — now flaky/failing #1066 failures and 2 known unrelatedtest_cli_version.pyfailures (long-scratchpad-path artifact, prior sessions)Test plan
🤖 Generated with Claude Code