Skip to content

Commit

Permalink
fixup! Fix pulsar uri scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
miton18 committed Oct 3, 2024
1 parent c5fab89 commit 10a16d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quickwit/quickwit-config/src/source_config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use quickwit_common::is_false;
use quickwit_common::uri::Uri;
use quickwit_proto::metastore::SourceType;
use quickwit_proto::types::SourceId;
use regex::Regex;
use serde::de::Error;
use serde::{Deserialize, Deserializer, Serialize};
use serde_json::Value as JsonValue;
Expand Down Expand Up @@ -498,7 +499,7 @@ pub enum PulsarSourceAuth {
fn pulsar_uri<'de, D>(deserializer: D) -> Result<String, D::Error>
where D: Deserializer<'de> {
let uri: String = Deserialize::deserialize(deserializer)?;
let re: Regex = Regex::new(r"pulsar(\+ssl)?://.*").unwrap();
let re: Regex = Regex::new(r"pulsar(\+ssl)?://.*").expect("regular expression should compile");

if !re.is_match(uri.as_str()) {
return Err(Error::custom(format!(
Expand Down

0 comments on commit 10a16d0

Please sign in to comment.