Skip to content

Commit c728064

Browse files
remove permutive settings
1 parent 818906a commit c728064

File tree

4 files changed

+5
-95
lines changed

4 files changed

+5
-95
lines changed

crates/common/src/integrations/permutive.rs

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -510,31 +510,7 @@ impl PermutiveIntegration {
510510
fn build(settings: &Settings) -> Option<Arc<PermutiveIntegration>> {
511511
let config = match settings.integration_config::<PermutiveConfig>(PERMUTIVE_INTEGRATION_ID) {
512512
Ok(Some(config)) => config,
513-
Ok(None) => {
514-
// Fall back to old config if present (backwards compatibility)
515-
if !settings.permutive.organization_id.is_empty() {
516-
log::warn!(
517-
"Using deprecated [permutive] config. Please migrate to [integrations.permutive]"
518-
);
519-
// Try to build config from old settings
520-
let config = PermutiveConfig {
521-
enabled: settings.permutive.auto_configure,
522-
organization_id: settings.permutive.organization_id.clone(),
523-
workspace_id: settings.permutive.workspace_id.clone(),
524-
project_id: settings.permutive.project_id.clone(),
525-
api_endpoint: default_api_endpoint(),
526-
secure_signals_endpoint: default_secure_signals_endpoint(),
527-
cache_ttl_seconds: settings.permutive.cache_ttl_seconds,
528-
rewrite_sdk: settings.permutive.auto_configure,
529-
};
530-
if !config.is_enabled() {
531-
return None;
532-
}
533-
config
534-
} else {
535-
return None;
536-
}
537-
}
513+
Ok(None) => return None,
538514
Err(err) => {
539515
log::error!("Failed to load Permutive integration config: {err:?}");
540516
return None;
@@ -773,12 +749,12 @@ mod tests {
773749
}
774750

775751
#[test]
776-
fn test_build_with_legacy_config() {
752+
fn test_build_requires_config() {
777753
let settings = create_test_settings();
778-
// Test settings have old [permutive] config, should build via fallback
754+
// Without [integrations.permutive] config, should not build
779755
assert!(
780-
build(&settings).is_some(),
781-
"Should build with legacy [permutive] config via fallback"
756+
build(&settings).is_none(),
757+
"Should not build without integration config"
782758
);
783759
}
784760

crates/common/src/settings.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -224,49 +224,6 @@ where
224224
}
225225
}
226226

227-
#[derive(Debug, Default, Deserialize, Serialize, Validate)]
228-
pub struct Permutive {
229-
#[serde(default)]
230-
pub project_id: String,
231-
#[serde(default)]
232-
pub workspace_id: String,
233-
/// Organization ID for Permutive edge CDN (e.g., "myorg" from myorg.edge.permutive.app)
234-
#[serde(default)]
235-
pub organization_id: String,
236-
#[serde(default = "default_permutive_auto_configure")]
237-
pub auto_configure: bool,
238-
#[serde(default)]
239-
pub proxy_events: bool,
240-
#[serde(default)]
241-
pub proxy_sync: bool,
242-
/// Cache TTL for Permutive SDK in seconds (default 1 hour)
243-
#[serde(default = "default_permutive_cache_ttl")]
244-
pub cache_ttl_seconds: u32,
245-
}
246-
247-
impl Permutive {
248-
/// Build the Permutive SDK URL from configuration
249-
/// Returns URL like: https://myorg.edge.permutive.app/workspace-12345-web.js
250-
#[allow(dead_code)]
251-
pub fn sdk_url(&self) -> Option<String> {
252-
if self.organization_id.is_empty() || self.workspace_id.is_empty() {
253-
return None;
254-
}
255-
Some(format!(
256-
"https://{}.edge.permutive.app/{}-web.js",
257-
self.organization_id, self.workspace_id
258-
))
259-
}
260-
}
261-
262-
fn default_permutive_auto_configure() -> bool {
263-
true
264-
}
265-
266-
fn default_permutive_cache_ttl() -> u32 {
267-
3600 // 1 hour
268-
}
269-
270227
#[allow(unused)]
271228
#[derive(Debug, Default, Deserialize, Serialize, Validate)]
272229
pub struct Synthetic {
@@ -330,9 +287,6 @@ pub struct Settings {
330287
pub publisher: Publisher,
331288
#[validate(nested)]
332289
pub prebid: Prebid,
333-
#[serde(default)]
334-
#[validate(nested)]
335-
pub permutive: Permutive,
336290
#[validate(nested)]
337291
pub synthetic: Synthetic,
338292
#[serde(default)]

crates/common/src/test_support.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ pub mod tests {
1919
[prebid]
2020
server_url = "https://test-prebid.com/openrtb2/auction"
2121
22-
[permutive]
23-
project_id = "test-project-123"
24-
workspace_id = "test-workspace"
25-
organization_id = "testorg"
26-
auto_configure = true
27-
proxy_events = true
28-
proxy_sync = true
29-
cache_ttl_seconds = 3600
30-
3122
[synthetic]
3223
counter_store = "test-counter-store"
3324
opid_store = "test-opid-store"

trusted-server.toml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@ bidders = ["kargo", "rubicon", "appnexus", "openx"]
2020
auto_configure = false
2121
debug = false
2222

23-
# Permutive integration - moved to [integrations.permutive] below
24-
# Keep this section for backwards compatibility (will be deprecated)
25-
[permutive]
26-
project_id = ""
27-
workspace_id = "a530f86f-f672-43fc-a11e-64681a09407d"
28-
organization_id = "a9695278-4085-40b3-9f02-8d4c38a6ff01"
29-
auto_configure = true
30-
proxy_events = true
31-
proxy_sync = true
32-
cache_ttl_seconds = 3600
33-
3423
[synthetic]
3524
counter_store = "counter_store"
3625
opid_store = "opid_store"

0 commit comments

Comments
 (0)