Skip to content

[CRE-1587] - Increase retry/timeout resilience for GCS chunk retrieval - #155

Open
gallone2000 wants to merge 1 commit into
masterfrom
alessandro_cre_1587_increase-retrytimeout-resilience-for-gcs-chunk-retrieval
Open

[CRE-1587] - Increase retry/timeout resilience for GCS chunk retrieval#155
gallone2000 wants to merge 1 commit into
masterfrom
alessandro_cre_1587_increase-retrytimeout-resilience-for-gcs-chunk-retrieval

Conversation

@gallone2000

Copy link
Copy Markdown
Contributor

Add ObjectStoreClient::new_with_retry to allow callers to override the transport-level retry configuration per backend (GCS and HTTP), re-export RetryConfig/BackoffConfig/Error so downstream crates don't need a direct object_store dependency, and fix a regression where HTTP backend options were silently discarded instead of being forwarded to HttpBuilder.

@gallone2000 gallone2000 self-assigned this Jul 27, 2026
@gallone2000
gallone2000 marked this pull request as ready for review July 27, 2026 14:15
@gallone2000
gallone2000 requested a review from ReinierMaas July 27, 2026 14:16
@gallone2000
gallone2000 force-pushed the alessandro_cre_1587_increase-retrytimeout-resilience-for-gcs-chunk-retrieval branch 2 times, most recently from ca8cf20 to 200cb4b Compare July 28, 2026 13:54
@gallone2000
gallone2000 force-pushed the alessandro_cre_1587_increase-retrytimeout-resilience-for-gcs-chunk-retrieval branch from 200cb4b to ee3068e Compare July 29, 2026 13:14

@ReinierMaas ReinierMaas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! I have three small requests:

  • Ensure that the commit name is descriptive of the change.

Comment on lines +371 to +373
let client =
ObjectStoreClient::new_with_retry("memory:///", Vec::new(), tight_retry_config())
.expect("memory:// URL should build with new_with_retry");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Different number of slashes between object_store_url and expect message. Probably the one from object_store_url should be used in the expect message.

Comment on lines +401 to +428
/// A minimal service account JSON that carries `disable_oauth: true`, so
/// `GoogleCloudStorageBuilder::build()` succeeds without talking to any
/// external auth service. Mirrors the fake key used inside `object_store`'s
/// own test suite.
const FAKE_GCS_SERVICE_ACCOUNT_KEY: &str = r#"{
"private_key": "private_key",
"private_key_id": "private_key_id",
"client_email": "client_email",
"disable_oauth": true
}"#;

#[test]
fn new_with_retry_builds_http_backend_without_network_io() {
// The HTTP arm of `new_with_retry` goes through `HttpBuilder`, which
// is a different code path from the `parse_url_opts` fallback covered
// by the memory:// and file:// tests. Building the client does not
// touch the network, so we can point it at an unreachable localhost
// port and still assert that construction succeeds.
let client = ObjectStoreClient::new_with_retry(
"http://127.0.0.1:1/some/prefix",
Vec::new(),
tight_retry_config(),
)
.expect("http:// URL should build with new_with_retry");
// Sanity-check the base path was captured (the URL segment after the
// authority).
assert!(format!("{client:?}").contains("some/prefix"));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move FAKE_GCS_SERVICE_ACCOUNT_KEY closer to the use-site, i.e. swap with new_with_retry_builds_http_backend_without_network_io

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.

2 participants