Skip to content

Commit ef2f9ca

Browse files
committed
tmp: Update objectstore-client and use put_path
1 parent 835e271 commit ef2f9ca

3 files changed

Lines changed: 9 additions & 38 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,6 @@ strip = "debuginfo" # Only strip debuginfo (not symbols) to keep backtraces usef
146146
codegen-units = 1 # Parallel compilation prevents some optimizations.
147147
# We do not enable link-time optimizations (lto) because they cause the
148148
# CLI to timeout when run in Xcode Cloud.
149+
150+
[patch.crates-io]
151+
objectstore-client = { git = "https://github.com/getsentry/objectstore", branch = "feat/put-path-ulimit" }

src/commands/build/snapshots.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -410,24 +410,16 @@ fn upload_images(
410410

411411
let mut many_builder = session.many();
412412
for prepared in chunk {
413-
let file = runtime
414-
.block_on(tokio::fs::File::open(&prepared.path))
415-
.with_context(|| {
416-
format!(
417-
"Failed to open image for upload: {}",
418-
prepared.path.display()
419-
)
420-
})?;
421-
422413
many_builder = many_builder.push(
423414
session
424-
.put_file(file)
415+
.put_path(prepared.path.clone())
425416
.key(&prepared.key)
426417
.expiration_policy(expiration),
427418
);
428419
}
429420

430-
let result = runtime.block_on(async { many_builder.send().error_for_failures().await });
421+
let result =
422+
runtime.block_on(async { many_builder.send().await.error_for_failures().await });
431423
if let Err(errors) = result {
432424
let errors: Vec<_> = errors.collect();
433425
eprintln!("There were errors uploading images:");

0 commit comments

Comments
 (0)