Skip to content

Commit

Permalink
bridge: Remove incomplete conditional compilation for queue plugin
Browse files Browse the repository at this point in the history
There were a lot of cfg attributes missing for the codebase to compile
without one of the queue features, and they didn't actually
independently toggle different queue support either.
  • Loading branch information
svix-jplatte committed Jun 6, 2024
1 parent b18a5c3 commit 8426942
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
10 changes: 2 additions & 8 deletions bridge/svix-bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
svix-ksuid = "0.7.0"
svix-bridge-plugin-queue = { optional=true, path = "../svix-bridge-plugin-queue" }
svix-bridge-plugin-queue = { path = "../svix-bridge-plugin-queue" }
svix-bridge-types = { path = "../svix-bridge-types" }
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
Expand All @@ -41,11 +41,5 @@ chrono = "0.4"
tower = "0.4"

[features]
default = ["gcp-pubsub", "rabbitmq", "redis", "sqs", "jemalloc"]

gcp-pubsub = ["generic-queue"]
generic-queue = ["dep:svix-bridge-plugin-queue"]
rabbitmq = ["generic-queue"]
redis = ["generic-queue"]
sqs = ["generic-queue"]
default = ["jemalloc"]
jemalloc = ["tikv-jemallocator", "tikv-jemalloc-ctl"]
18 changes: 0 additions & 18 deletions bridge/svix-bridge/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ pub enum LogFormat {
#[derive(Deserialize)]
#[serde(untagged)]
pub enum WebhookSenderConfig {
#[cfg(any(
feature = "gcp-pubsub",
feature = "rabbitmq",
feature = "redis",
feature = "sqs"
))]
Queue(QueueSenderConfig),
}

Expand All @@ -173,12 +167,6 @@ impl TryFrom<WebhookSenderConfig> for Box<dyn SenderInput> {
type Error = &'static str;
fn try_from(value: WebhookSenderConfig) -> Result<Self, Self::Error> {
match value {
#[cfg(any(
feature = "gcp-pubsub",
feature = "rabbitmq",
feature = "redis",
feature = "sqs"
))]
WebhookSenderConfig::Queue(backend) => backend.into_sender_input(),
}
}
Expand All @@ -197,12 +185,6 @@ pub struct WebhookReceiverConfig {
#[derive(Deserialize)]
#[serde(untagged)]
pub enum ReceiverOut {
#[cfg(any(
feature = "gcp-pubsub",
feature = "rabbitmq",
feature = "redis",
feature = "sqs"
))]
Queue(QueueOutOpts),
}

Expand Down

0 comments on commit 8426942

Please sign in to comment.