Skip to content

Commit ac9da52

Browse files
committed
fix(log-ingestor): Fix Rust compilation errors from merge conflict resolution
- Remove duplicate AwsAuthentication import - Store AwsAuthentication directly instead of extracting AwsCredentials - Fix S3ClientWrapper::create argument order (region, endpoint_url, aws_auth) - Rename aws_credentials field to aws_authentication in ClpDbIngestionConnector
1 parent 2fd80f5 commit ac9da52

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

components/log-ingestor/src/ingestion_job_manager.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use std::{collections::HashMap, sync::Arc};
55
pub use clp_ingestion::*;
66
use clp_rust_utils::{
77
clp_config::{
8-
AwsAuthentication,
98
AwsAuthentication,
109
package::{
1110
config::{Config as ClpConfig, LogsInput},
@@ -83,9 +82,7 @@ impl IngestionJobManagerState {
8382
clp_credentials: ClpCredentials,
8483
) -> anyhow::Result<Self> {
8584
let aws_authentication = match &clp_config.logs_input {
86-
LogsInput::S3 { config } => match config.aws_authentication.clone() {
87-
AwsAuthentication::Credentials { credentials } => credentials,
88-
},
85+
LogsInput::S3 { config } => config.aws_authentication.clone(),
8986
LogsInput::Fs { .. } => {
9087
return Err(anyhow::anyhow!(
9188
"Invalid CLP config: Unsupported logs input type. The current implementation \
@@ -309,8 +306,8 @@ impl IngestionJobManagerState {
309306
S3IngestionJobConfig::S3Scanner(config) => {
310307
let s3_client_manager = S3ClientWrapper::create(
311308
config.base.region.as_ref(),
312-
&self.inner.aws_authentication,
313309
config.base.endpoint_url.as_ref(),
310+
&self.inner.aws_authentication,
314311
)
315312
.await;
316313
ingestion_state.start().await?;

components/log-ingestor/src/ingestion_job_manager/clp_ingestion.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use async_trait::async_trait;
44
use clp_rust_utils::{
55
clp_config::{
66
AwsAuthentication,
7-
AwsCredentials,
87
package::{
98
config::{ArchiveOutput, Config as ClpConfig, LogsInput},
109
credentials::Credentials as ClpCredentials,
@@ -157,7 +156,7 @@ impl ClpIngestionJobContext {
157156
pub struct ClpDbIngestionConnector {
158157
db_pool: MySqlPool,
159158
channel_capacity: usize,
160-
aws_credentials: AwsCredentials,
159+
aws_authentication: AwsAuthentication,
161160
archive_output_config: ArchiveOutput,
162161
buffer_flush_timeout: Duration,
163162
buffer_flush_threshold: u64,
@@ -197,10 +196,8 @@ impl ClpDbIngestionConnector {
197196
.as_ref()
198197
.expect("log_ingestor configuration is missing");
199198

200-
let aws_credentials = match clp_config.logs_input {
201-
LogsInput::S3 { config } => match config.aws_authentication {
202-
AwsAuthentication::Credentials { credentials } => credentials,
203-
},
199+
let aws_authentication = match clp_config.logs_input {
200+
LogsInput::S3 { config } => config.aws_authentication,
204201
LogsInput::Fs { .. } => {
205202
panic!(
206203
"Invalid CLP config: Unsupported logs input type. The current implementation \
@@ -221,7 +218,7 @@ impl ClpDbIngestionConnector {
221218
let connector = Self {
222219
db_pool: mysql_pool,
223220
channel_capacity: log_ingestor_config.channel_capacity,
224-
aws_credentials,
221+
aws_authentication,
225222
archive_output_config: clp_config.archive_output.clone(),
226223
buffer_flush_timeout: Duration::from_secs(log_ingestor_config.buffer_flush_timeout_sec),
227224
buffer_flush_threshold: log_ingestor_config.buffer_flush_threshold,
@@ -430,7 +427,7 @@ impl ClpDbIngestionConnector {
430427

431428
let submitter = CompressionJobSubmitter::new(
432429
compression_state.clone(),
433-
self.aws_credentials.clone(),
430+
self.aws_authentication.clone(),
434431
&self.archive_output_config,
435432
config.as_base_config(),
436433
);

0 commit comments

Comments
 (0)