Skip to content

Commit 7674798

Browse files
authored
drop ai proxy app (#1078)
1 parent d12ccb6 commit 7674798

File tree

5 files changed

+4
-108
lines changed

5 files changed

+4
-108
lines changed

tembo-stacks/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tembo-stacks/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tembo-stacks"
33
description = "Tembo Stacks for Postgres"
4-
version = "0.21.1"
4+
version = "0.22.0"
55
authors = ["tembo.io"]
66
edition = "2021"
77
license = "Apache-2.0"

tembo-stacks/src/apps/ai.yaml

Lines changed: 0 additions & 71 deletions
This file was deleted.

tembo-stacks/src/apps/app.rs

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ use tracing::{instrument, warn};
1111
use crate::apps::types::{App, AppConfig, AppType, MergedConfigs};
1212

1313
lazy_static! {
14-
pub static ref AI: App =
15-
serde_yaml::from_str(include_str!("ai.yaml")).expect("ai.yaml not found");
1614
pub static ref HTTP: App =
1715
serde_yaml::from_str(include_str!("http.yaml")).expect("http.yaml not found");
1816
pub static ref RESTAPI: App =
@@ -45,22 +43,6 @@ pub fn merge_app_reqs(
4543
if let Some(apps) = user_apps {
4644
for app in apps {
4745
match app {
48-
AppType::AIProxy(_config) => {
49-
let ai = AI.clone();
50-
let ai_app_svc = ai.app_services.unwrap()[0].clone();
51-
// the AI appService is a proxy container to Tembo AI
52-
// and its configuration should not be modified
53-
user_app_services.push(ai_app_svc);
54-
if let Some(extensions) = ai.extensions {
55-
fin_app_extensions.extend(extensions);
56-
}
57-
if let Some(trunks) = ai.trunk_installs {
58-
fin_app_trunk_installs.extend(trunks);
59-
}
60-
if let Some(pg_cfg) = ai.postgres_config {
61-
final_pg_configs.extend(pg_cfg);
62-
}
63-
}
6446
AppType::RestAPI(config) => {
6547
// there is only 1 app_service in the restAPI
6648
let mut restapi = RESTAPI.clone().app_services.unwrap().clone()[0].clone();
@@ -390,8 +372,7 @@ mod tests {
390372
resources: None,
391373
};
392374
let user_embedding_app = AppType::Embeddings(Some(app_config));
393-
let user_ai_app = AppType::AIProxy(None);
394-
let user_apps = vec![user_embedding_app, user_ai_app];
375+
let user_apps = vec![user_embedding_app];
395376
let stack_apps = vec![AppService {
396377
name: "embeddings".to_string(),
397378
env: Some(vec![EnvVar {
@@ -403,17 +384,7 @@ mod tests {
403384
}];
404385
let merged_configs: MergedConfigs =
405386
merge_app_reqs(Some(user_apps), Some(stack_apps), None, None, None).unwrap();
406-
let mut found: bool = false;
407-
for config in merged_configs.pg_configs.clone().unwrap() {
408-
if config.name == "vectorize.tembo_service_url" {
409-
assert_eq!(
410-
config.value.to_string(),
411-
"http://${NAMESPACE}-ai-proxy:8080/v1"
412-
);
413-
found = true;
414-
}
415-
}
416-
assert!(found);
387+
417388
// filter for embedding app
418389
let embedding_app = merged_configs
419390
.app_services
@@ -455,7 +426,6 @@ mod tests {
455426
assert!(MQ.app_services.is_some());
456427
assert!(PGANALYZE.app_services.is_some());
457428
assert!(RESTAPI.app_services.is_some());
458-
assert!(AI.app_services.is_some());
459429
}
460430

461431
#[test]

tembo-stacks/src/apps/types.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ pub struct MergedConfigs {
2727

2828
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema, JsonSchema)]
2929
pub enum AppType {
30-
#[serde(rename = "ai-proxy")]
31-
AIProxy(Option<AppConfig>),
3230
#[serde(rename = "restapi")]
3331
RestAPI(Option<AppConfig>),
3432
#[serde(rename = "http")]
@@ -69,7 +67,6 @@ impl TryFrom<AppService> for AppType {
6967
});
7068

7169
match app_service.name.as_str() {
72-
"ai-proxy" => Ok(AppType::AIProxy(app_config)),
7370
"restapi" => Ok(AppType::RestAPI(app_config)),
7471
"http" => Ok(AppType::HTTP(app_config)),
7572
"mq-api" => Ok(AppType::MQ(app_config)),

0 commit comments

Comments
 (0)