sync: add --concurrency and --retry-timeout flags#1
Merged
luketchang merged 1 commit intomainfrom May 7, 2026
Merged
Conversation
The sync engine hardcoded its in-flight request limit at 20 and relied on the SDK's retry layer, which only retries 429 and 504 (databricks-sdk-go httpclient/errors.go DefaultErrorRetriable). 502 and 503 surface as fatal errors that fail the entire sync. - Add SyncOptions.Concurrency and SyncOptions.RetryTimeout; default to MaxRequestsInFlight and DefaultRetryTimeout respectively when zero so existing in-process callers (bundle deploy/files) need no changes. - Wrap each filer call (PUT, delete, mkdir, rmdir) in retries.Poll, retrying on 502/503/504 within the deadline and logging each retry at warn level. Uses the same retries.Poll helper used elsewhere in the CLI for state polling. - Surface --concurrency (default 5) and --retry-timeout (default 30s) on 'databricks sync' and 'databricks bundle sync'. 429 stays out of the new retry layer because the SDK already handles it with rate-limit-aware backoff. 500 stays out because it is not always transient for Databricks APIs. Slack thread: https://replit.slack.com/archives/C0A2Z9042FR/p1778082184841149
Author
|
@replit/micromanager approve tested locally, new repo |
lhchavez
approved these changes
May 7, 2026
1 task
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.
The sync engine hardcoded its in-flight request limit at 20 and relied on the SDK's retry layer, which only retries 429 and 504 (databricks-sdk-go httpclient/errors.go DefaultErrorRetriable). 502 and 503 surface as fatal errors that fail the entire sync.
429 stays out of the new retry layer because the SDK already handles it with rate-limit-aware backoff. 500 stays out because it is not always transient for Databricks APIs.
Slack thread:
https://replit.slack.com/archives/C0A2Z9042FR/p1778082184841149
Changes
Why
Tests