Skip to content

Commit

Permalink
Revert "Enables Clickhouse Authorization (#5818)"
Browse files Browse the repository at this point in the history
This reverts commit 671920f.
  • Loading branch information
xurui-c authored Apr 26, 2024
1 parent 671920f commit 6864e1b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
2 changes: 0 additions & 2 deletions rust_snuba/src/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ impl ProcessingStrategyFactory<KafkaPayload> for ConsumerStrategyFactory {
&self.storage_config.clickhouse_cluster.database,
&self.clickhouse_concurrency,
self.skip_write,
&self.storage_config.clickhouse_cluster.user,
&self.storage_config.clickhouse_cluster.password,
);

let accumulator = Arc::new(
Expand Down
21 changes: 1 addition & 20 deletions rust_snuba/src/strategies/clickhouse/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub struct BatchFactory {
skip_write: bool,
}

#[allow(clippy::too_many_arguments)]
impl BatchFactory {
pub fn new(
hostname: &str,
Expand All @@ -28,20 +27,10 @@ impl BatchFactory {
database: &str,
concurrency: &ConcurrencyConfig,
skip_write: bool,
clickhouse_user: &str,
clickhouse_password: &str,
) -> Self {
let mut headers = HeaderMap::with_capacity(5);
let mut headers = HeaderMap::with_capacity(3);
headers.insert(CONNECTION, HeaderValue::from_static("keep-alive"));
headers.insert(ACCEPT_ENCODING, HeaderValue::from_static("gzip,deflate"));
headers.insert(
"X-Clickhouse-User",
HeaderValue::from_str(clickhouse_user).unwrap(),
);
headers.insert(
"X-ClickHouse-Key",
HeaderValue::from_str(clickhouse_password).unwrap(),
);
headers.insert(
"X-ClickHouse-Database",
HeaderValue::from_str(database).unwrap(),
Expand Down Expand Up @@ -197,8 +186,6 @@ mod tests {
"testdb",
&concurrency,
false,
"default",
"",
);

let mut batch = factory.new_batch();
Expand Down Expand Up @@ -230,8 +217,6 @@ mod tests {
"testdb",
&concurrency,
false,
"default",
"",
);

let mut batch = factory.new_batch();
Expand Down Expand Up @@ -265,8 +250,6 @@ mod tests {
"testdb",
&concurrency,
true,
"default",
"",
);

let mut batch = factory.new_batch();
Expand Down Expand Up @@ -300,8 +283,6 @@ mod tests {
"testdb",
&concurrency,
true,
"default",
"",
);

let mut batch = factory.new_batch();
Expand Down

0 comments on commit 6864e1b

Please sign in to comment.