diff --git a/CHANGELOG.md b/CHANGELOG.md index cf70c6e28f..e81f59b788 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Performance Improvements + +- We switch to a faster compression algorithm (zstd) for uploading size analysis builds (`sentry build upload`) in preparation for this week's beta release! ([#3038](https://github.com/getsentry/sentry-cli/pull/3038)) + ## 3.0.0 ### New Sentry Support Policy diff --git a/src/commands/build/upload.rs b/src/commands/build/upload.rs index c1aa1bf0d6..11fe9b438a 100644 --- a/src/commands/build/upload.rs +++ b/src/commands/build/upload.rs @@ -563,7 +563,7 @@ fn normalize_file( // This is important as an optimization to avoid re-uploading the same chunks if they're already on the server // but the last modified time being different will cause checksums to be different. let options = SimpleFileOptions::default() - .compression_method(zip::CompressionMethod::Stored) + .compression_method(zip::CompressionMethod::Zstd) .last_modified_time(DateTime::default()); zip.start_file(file_name, options)?; diff --git a/src/utils/build/normalize.rs b/src/utils/build/normalize.rs index 110fcdea16..80e5f573a1 100644 --- a/src/utils/build/normalize.rs +++ b/src/utils/build/normalize.rs @@ -55,7 +55,7 @@ fn add_entries_to_zip( // This is important as an optimization to avoid re-uploading the same chunks if they're already on the server // but the last modified time being different will cause checksums to be different. let options = SimpleFileOptions::default() - .compression_method(zip::CompressionMethod::Deflated) + .compression_method(zip::CompressionMethod::Zstd) .last_modified_time(DateTime::default()); for (entry_path, relative_path) in entries { @@ -88,7 +88,7 @@ fn add_entries_to_zip( fn metadata_file_options() -> SimpleFileOptions { SimpleFileOptions::default() - .compression_method(zip::CompressionMethod::Deflated) + .compression_method(zip::CompressionMethod::Zstd) .last_modified_time(DateTime::default()) } diff --git a/tests/integration/_cases/build/build-upload-ipa.trycmd b/tests/integration/_cases/build/build-upload-ipa.trycmd index f47481bf67..6c543b59d2 100644 --- a/tests/integration/_cases/build/build-upload-ipa.trycmd +++ b/tests/integration/_cases/build/build-upload-ipa.trycmd @@ -2,7 +2,8 @@ $ sentry-cli build upload tests/integration/_fixtures/build/ipa.ipa --head-sha deadbeef12345678deadbeef12345678deadbeef ? success > Preparing for upload completed in [..] +> Uploading completed in [..] Successfully uploaded 1 file to Sentry - - tests/integration/_fixtures/build/ipa.ipa (http[..]/wat-org/preprod/wat-project/some-text-id) + - tests/integration/_fixtures/build/ipa.ipa (http://sentry.io/wat-org/preprod/wat-project/some-text-id) ``` diff --git a/tests/integration/_expected_requests/build/apk_chunk.bin b/tests/integration/_expected_requests/build/apk_chunk.bin index 7e2b601683..2a35b07da0 100644 Binary files a/tests/integration/_expected_requests/build/apk_chunk.bin and b/tests/integration/_expected_requests/build/apk_chunk.bin differ diff --git a/tests/integration/build/upload.rs b/tests/integration/build/upload.rs index dd4159393c..4c14abe271 100644 --- a/tests/integration/build/upload.rs +++ b/tests/integration/build/upload.rs @@ -167,7 +167,7 @@ fn command_build_upload_apk_chunked() { if is_first_assemble_call.swap(false, Ordering::Relaxed) { r#"{ "state": "created", - "missingChunks": ["60863d91bb673a1b1b92dbbe91b1de5cc0dde146"] + "missingChunks": ["7138c09b474a5c84ac60e1b145855bf6dcc88913"] }"# } else { r#"{ @@ -224,7 +224,7 @@ fn command_build_upload_ipa_chunked() { if is_first_assemble_call.swap(false, Ordering::Relaxed) { r#"{ "state": "created", - "missingChunks": ["ed9da71e3688261875db21b266da84ffe004a8a4"] + "missingChunks": ["1f168f404b360494fd1adbafaf920a303d1b3691"] }"# } else { r#"{