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(slack): use doppler for env vars (#7620)
Will Hutchinson0bddb66b4da7
diff --git a/infra/stacks/cloud-storage-service/index.ts b/infra/stacks/cloud-storage-service/index.tsindex 7609704288..2ae46e48bb 100644--- a/infra/stacks/cloud-storage-service/index.ts+++ b/infra/stacks/cloud-storage-service/index.ts@@ -210,24 +210,12 @@ export const slackImportDlqArn = slackImportQueue.dlq.arn;export const slackImportDlqName = slackImportQueue.dlq.name;export const slackImportWorkerPolicyArn = slackImportQueue.workerPolicy.arn;-const searchProcessingStack = new pulumi.StackReference(- 'slack-import-search-processing',- { name: `macro-inc/search-processing-service/${stack}` }-);const slackImportWorker = deploySlackImportWorker(`slack-import-worker-${stack}`,{ecsClusterArn: cloudStorageClusterArn,vpc: coparse_api_vpc,workerPolicyArn: slackImportQueue.workerPolicy.arn,- stagingBucketName: bulkUploadBucketName,- queueName: slackImportQueue.queue.name,- dlqName: slackImportQueue.dlq.name,- gatewayUrl: getServiceUrl(ServiceUrl.CONNECTION_GATEWAY_URL),- // This is the processing backfill API, not SearchServiceClient's query API.- searchProcessingUrl: searchProcessingStack.requireOutput(- 'searchProcessingServiceUrl'- ),tags,});diff --git a/infra/stacks/cloud-storage-service/slack-import-worker.ts b/infra/stacks/cloud-storage-service/slack-import-worker.tsindex 63d6cc1c35..dbd7cdc880 100644--- a/infra/stacks/cloud-storage-service/slack-import-worker.ts+++ b/infra/stacks/cloud-storage-service/slack-import-worker.ts@@ -19,11 +19,6 @@ interface SlackImportWorkerArgs {privateSubnetIds: pulumi.Input<string[]>;};workerPolicyArn: pulumi.Input<string>;- stagingBucketName: pulumi.Input<string>;- queueName: pulumi.Input<string>;- dlqName: pulumi.Input<string>;- gatewayUrl: pulumi.Input<string>;- searchProcessingUrl: pulumi.Input<string>;tags: { [key: string]: string };}@@ -102,18 +97,13 @@ export class SlackImportWorker extends pulumi.ComponentResource {},child);- const doppler = new DopplerEcsEnvironment(SERVICE_NAME, { tags }, child);- // Select keys from the shared Doppler sync instead of injecting APP_SECRETS_JSON:- // MacroConfig gives that JSON precedence over infrastructure-owned env values.- const secrets = [- 'DATABASE_URL',- 'INTERNAL_API_KEY',- 'SLACK_IMPORT_ENABLED',- 'SLACK_IMPORT_CONCURRENCY',- ].map((key) => ({- name: key,- valueFrom: pulumi.interpolate`${doppler.containerSecrets[0].valueFrom}:${key}::`,- }));++ const dopplerEcsEnvironment = new DopplerEcsEnvironment(+ SERVICE_NAME,+ { tags },+ child+ );+this.service = new awsx.ecs.FargateService(SERVICE_NAME,{@@ -130,7 +120,7 @@ export class SlackImportWorker extends pulumi.ComponentResource {cpu: '1024',memory: '2048',taskRole: { roleArn: this.role.arn },- executionRole: { roleArn: doppler.executionRole.arn },+ executionRole: { roleArn: dopplerEcsEnvironment.executionRole.arn },runtimePlatform: {operatingSystemFamily: 'LINUX',cpuArchitecture: 'X86_64',@@ -149,30 +139,9 @@ export class SlackImportWorker extends pulumi.ComponentResource {essential: true,memory: 1536,stopTimeout: 120,- secrets,+ secrets: [...dopplerEcsEnvironment.containerSecrets],environment: [{ name: 'ENVIRONMENT', value: stack },- {- name: 'UPLOAD_STAGING_BUCKET',- value: args.stagingBucketName,- },- { name: 'OVERRIDE_SLACK_IMPORT_QUEUE', value: args.queueName },- { name: 'OVERRIDE_SLACK_IMPORT_DLQ', value: args.dlqName },- {- name: 'OVERRIDE_CONNECTION_GATEWAY_URL',- value: args.gatewayUrl,- },- {- name: 'OVERRIDE_SEARCH_PROCESSING_SERVICE_URL',- value: args.searchProcessingUrl,- },- {- name: 'SLACK_IMPORT_JOIN_EMAIL_ENABLED',- value: String(- config.getBoolean('slack_import_join_email_enabled') ??- false- ),- },{ name: 'DD_SERVICE', value: SERVICE_NAME },{ name: 'DD_ENV', value: stack },],