Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(sps): use internal_auth_key when calling lexical-service (#3084)
gbirman3360547d30af
diff --git a/infra/stacks/search-processing-service/Pulumi.dev.yaml b/infra/stacks/search-processing-service/Pulumi.dev.yamlindex 78165b9b8b..6147290457 100644--- a/infra/stacks/search-processing-service/Pulumi.dev.yaml+++ b/infra/stacks/search-processing-service/Pulumi.dev.yaml@@ -4,4 +4,3 @@ config:search-processing-service:macro_db_readonly_secret_key: macro-db-readonly-devsearch-processing-service:opensearch_password_key: macro-opensearch-password-devsearch-processing-service:internal_auth_key: document-storage-service-auth-key-dev- search-processing-service:sync_service_auth_key: sync-service-key-devdiff --git a/infra/stacks/search-processing-service/Pulumi.prod.yaml b/infra/stacks/search-processing-service/Pulumi.prod.yamlindex 181e465af2..0bf13c55f1 100644--- a/infra/stacks/search-processing-service/Pulumi.prod.yaml+++ b/infra/stacks/search-processing-service/Pulumi.prod.yaml@@ -4,4 +4,3 @@ config:search-processing-service:macro_db_readonly_secret_key: macro-db-readonly-prodsearch-processing-service:opensearch_password_key: macro-opensearch-password-prodsearch-processing-service:internal_auth_key: document-storage-service-auth-key-prod- search-processing-service:sync_service_auth_key: sync-service-key-proddiff --git a/infra/stacks/search-processing-service/index.ts b/infra/stacks/search-processing-service/index.tsindex 00c75570c7..ad49221f5b 100644--- a/infra/stacks/search-processing-service/index.ts+++ b/infra/stacks/search-processing-service/index.ts@@ -74,11 +74,6 @@ const INTERNAL_AUTH_KEY = aws.secretsmanager}).apply((secret) => secret.secretString);-const SYNC_SERVICE_AUTH_KEY = config.require(`sync_service_auth_key`);-const syncServiceAuthKeyArn: pulumi.Output<string> = aws.secretsmanager- .getSecretVersionOutput({ secretId: SYNC_SERVICE_AUTH_KEY })- .apply((secret) => secret.arn);-const searchProcessingService = new SearchProcessingService(`${BASE_NAME}-${stack}`,{@@ -86,7 +81,6 @@ const searchProcessingService = new SearchProcessingService(databaseUrlArn,databaseUrlReadonlyArn,opensearchPasswordArn,- syncServiceAuthKeyArn,],searchEventQueueArn,ecsClusterArn: cloudStorageClusterArn,@@ -145,10 +139,6 @@ const searchProcessingService = new SearchProcessingService(name: 'INTERNAL_API_SECRET_KEY',value: INTERNAL_AUTH_KEY,},- {- name: 'SYNC_SERVICE_AUTH_KEY',- value: SYNC_SERVICE_AUTH_KEY,- },{name: 'WORKER_COUNT',value: '3', // 3 workers per instancediff --git a/rust/cloud-storage/search_processing_service/src/config.rs b/rust/cloud-storage/search_processing_service/src/config.rsindex a3a9f91338..7b7bd6e2c6 100644--- a/rust/cloud-storage/search_processing_service/src/config.rs+++ b/rust/cloud-storage/search_processing_service/src/config.rs@@ -54,9 +54,6 @@ pub struct Config {/// The bucket where documents are storedpub document_storage_bucket: String,- /// API key for sync service- pub sync_service_auth_key: String,-/// The number of workers to spawnpub worker_count: u8,@@ -119,9 +116,6 @@ impl Config {let document_storage_bucket = std::env::var("DOCUMENT_STORAGE_BUCKET").context("DOCUMENT_STORAGE_BUCKET must be provided")?;- let sync_service_auth_key = std::env::var("SYNC_SERVICE_AUTH_KEY")- .context("SYNC_SERVICE_AUTH_KEY must be provided")?;-let worker_count: u8 = std::env::var("WORKER_COUNT").unwrap_or("10".to_string()).parse::<u8>()@@ -150,7 +144,6 @@ impl Config {opensearch_username,opensearch_password,document_storage_bucket,- sync_service_auth_key,worker_count,lexical_service_url,backfill_page_sizes,diff --git a/rust/cloud-storage/search_processing_service/src/main.rs b/rust/cloud-storage/search_processing_service/src/main.rsindex e9e76ee069..78f28bae9c 100644--- a/rust/cloud-storage/search_processing_service/src/main.rs+++ b/rust/cloud-storage/search_processing_service/src/main.rs@@ -174,17 +174,8 @@ async fn main() -> anyhow::Result<()> {tracing::trace!("libpdfium is present");}- let sync_service_auth_key = match config.environment {- Environment::Local => config.sync_service_auth_key.clone(),- _ => secretsmanager_client- .get_secret_value(&config.sync_service_auth_key)- .await- .context("unable to get secret")?- .to_string(),- };-let lexical_client = LexicalClient::new(- sync_service_auth_key.clone(),+ internal_auth_key.as_ref().to_string(),config.lexical_service_url.clone(),);