Skip to content

Commit 15dccc3

Browse files
chore: Remove support for brotli chunk compression (#2973)
### Description It appears we have never supported `brotli` server-side so there is no reason to support it in the CLI, either. ### Issues - Resolves #2808 - Resolves [CLI-174](https://linear.app/getsentry/issue/CLI-174/remove-brotli-support-for-chunk-uploads)
1 parent 81db122 commit 15dccc3

File tree

4 files changed

+0
-58
lines changed

4 files changed

+0
-58
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ chrono-tz = "0.8.4"
7878
secrecy = "0.8.0"
7979
lru = "0.16.0"
8080
backon = { version = "1.5.2", features = ["std", "std-blocking-sleep"] }
81-
brotli = "8.0.2"
8281

8382
[dev-dependencies]
8483
assert_cmd = "2.0.11"

src/api/data_types/chunking/compression.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ use serde::Deserialize;
77
pub enum ChunkCompression {
88
/// GZIP compression (including header)
99
Gzip = 10,
10-
/// Brotli compression
11-
Brotli = 20,
1210
/// No compression should be applied
1311
#[default]
1412
#[serde(other)]
@@ -20,7 +18,6 @@ impl ChunkCompression {
2018
match self {
2119
ChunkCompression::Uncompressed => "file",
2220
ChunkCompression::Gzip => "file_gzip",
23-
ChunkCompression::Brotli => "file_brotli",
2421
}
2522
}
2623
}
@@ -30,7 +27,6 @@ impl fmt::Display for ChunkCompression {
3027
match *self {
3128
ChunkCompression::Uncompressed => write!(f, "uncompressed"),
3229
ChunkCompression::Gzip => write!(f, "gzip"),
33-
ChunkCompression::Brotli => write!(f, "brotli"),
3430
}
3531
}
3632
}

src/api/mod.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ use std::{fmt, thread};
2222

2323
use anyhow::{Context as _, Result};
2424
use backon::BlockingRetryable as _;
25-
use brotli::enc::BrotliEncoderParams;
26-
use brotli::CompressorWriter;
2725
#[cfg(target_os = "macos")]
2826
use chrono::Duration;
2927
use chrono::{DateTime, FixedOffset, Utc};
@@ -358,20 +356,6 @@ impl Api {
358356
/// Compresses a file with the given compression.
359357
fn compress(data: &[u8], compression: ChunkCompression) -> Result<Vec<u8>, io::Error> {
360358
Ok(match compression {
361-
ChunkCompression::Brotli => {
362-
let mut encoder = CompressorWriter::with_params(
363-
Vec::new(),
364-
0,
365-
&BrotliEncoderParams {
366-
quality: 6,
367-
..Default::default()
368-
},
369-
);
370-
encoder.write_all(data)?;
371-
encoder.flush()?;
372-
encoder.into_inner()
373-
}
374-
375359
ChunkCompression::Gzip => {
376360
let mut encoder = GzEncoder::new(Vec::new(), Default::default());
377361
encoder.write_all(data)?;

0 commit comments

Comments
 (0)