From 73ce79edef4382e7e0dee35361704af4da72d594 Mon Sep 17 00:00:00 2001 From: anabellabuckvar <41971124+anabellabuckvar@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:09:24 -0400 Subject: [PATCH] DOP-4414 remove unecessary vars from the configs --- api/config/custom-environment-variables.json | 2 -- api/config/default.json | 4 ---- api/controllers/v2/github.ts | 2 +- cdk-infra/static/api/config/custom-environment-variables.json | 2 -- cdk-infra/static/api/config/default.json | 2 -- config/custom-environment-variables.json | 2 -- config/test.json | 1 - 7 files changed, 1 insertion(+), 14 deletions(-) diff --git a/api/config/custom-environment-variables.json b/api/config/custom-environment-variables.json index ee59dd577..4199fbce2 100644 --- a/api/config/custom-environment-variables.json +++ b/api/config/custom-environment-variables.json @@ -7,7 +7,6 @@ "dbPassword": "MONGO_ATLAS_PASSWORD", "dbName": "DB_NAME", "snootyDbName": "SNOOTY_DB_NAME", - "metadataDbName": "METADATA_DB_NAME", "dbUrl": "MONGO_ATLAS_URL", "fastlyDochubMap": "FASTLY_DOCHUB_MAP", "githubSecret": "GITHUB_SECRET", @@ -18,7 +17,6 @@ "slackViewOpenUrl": "https://slack.com/api/views.open", "snootySecret": "SNOOTY_SECRET", "jobQueueCollection": "JOB_QUEUE_COL_NAME", - "projectsCollection": "PROJECTS_COL_NAME", "entitlementCollection": "USER_ENTITLEMENT_COL_NAME", "dashboardUrl": "DASHBOARD_URL", "repoBranchesCollection": "REPO_BRANCHES_COL_NAME", diff --git a/api/config/default.json b/api/config/default.json index 66ee2ed48..16d56ce57 100644 --- a/api/config/default.json +++ b/api/config/default.json @@ -7,7 +7,6 @@ "dbPassword": "password", "dbName": "db_name", "snootyDbName": "snooty_db_name", - "metadataDbName": "METADATA_DB_NAME", "dbUrl": "url", "fastlyDochubMap": "FASTLY_DOCHUB_MAP", "githubSecret": "GITHUB_SECRET", @@ -18,7 +17,6 @@ "slackViewOpenUrl": "https://slack.com/api/views.open", "snootySecret": "SNOOTY_SECRET", "jobQueueCollection": "JOB_QUEUE_COL_NAME", - "projectsCollection": "PROJECTS_COL_NAME", "entitlementCollection": "USER_ENTITLEMENT_COL_NAME", "repoBranchesCollection": "REPO_BRANCHES_COL_NAME", "docsetsCollection": "DOCSETS_COL_NAME", @@ -39,7 +37,6 @@ "stg": { "dbName": "pool_test", "jobQueueCollection": "dotcom_queue", - "projectsCollection": "PROJECTS_COL_NAME", "jobsQueueUrl": "https://sqs.us-east-2.amazonaws.com/216656347858/autobuilder-jobs-queue-dotcomstg", "jobUpdatesQueueUrl": "https://sqs.us-east-2.amazonaws.com/216656347858/autobuilder-job-updates-queue-dotcomstg", "parallelStgName": "dotcomstg" @@ -47,7 +44,6 @@ "prd": { "dbName": "pool", "jobQueueCollection": "dotcom_queue", - "projectsCollection": "PROJECTS_COL_NAME", "jobsQueueUrl": "https://sqs.us-east-2.amazonaws.com/216656347858/autobuilder-jobs-queue-dotcomprd", "jobUpdatesQueueUrl": "https://sqs.us-east-2.amazonaws.com/216656347858/autobuilder-job-updates-queue-dotcomprd", "parallelStgName": "dotcomprd" diff --git a/api/controllers/v2/github.ts b/api/controllers/v2/github.ts index 7c479ac29..db4880496 100644 --- a/api/controllers/v2/github.ts +++ b/api/controllers/v2/github.ts @@ -119,7 +119,7 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr const db = client.db(c.get('dbName')); const consoleLogger = new ConsoleLogger(); const jobRepository = new JobRepository(db, c, consoleLogger); - const projectsRepository = new ProjectsRepository(client.db('docs_metadata'), c, consoleLogger); + const projectsRepository = new ProjectsRepository(client.db(process.env.METADATA_DB_NAME), c, consoleLogger); const repoBranchesRepository = new RepoBranchesRepository(db, c, consoleLogger); const docsetsRepository = new DocsetsRepository(db, c, consoleLogger); diff --git a/cdk-infra/static/api/config/custom-environment-variables.json b/cdk-infra/static/api/config/custom-environment-variables.json index 849fd6a7a..8d554d1b5 100644 --- a/cdk-infra/static/api/config/custom-environment-variables.json +++ b/cdk-infra/static/api/config/custom-environment-variables.json @@ -8,7 +8,6 @@ "githubBotPW": "GITHUB_BOT_PASSWORD", "dbName": "DB_NAME", "snootyDbName": "SNOOTY_DB_NAME", - "metadataDbName": "METADATA_DB_NAME", "dbUrl": "MONGO_ATLAS_URL", "fastlyDochubMap": "FASTLY_DOCHUB_MAP", "githubSecret": "GITHUB_SECRET", @@ -18,7 +17,6 @@ "slackViewOpenUrl": "https://slack.com/api/views.open", "snootySecret": "SNOOTY_SECRET", "jobQueueCollection": "JOB_QUEUE_COL_NAME", - "projectsCollection": "PROJECTS_COL_NAME", "entitlementCollection": "USER_ENTITLEMENT_COL_NAME", "dashboardUrl": "DASHBOARD_URL", "repoBranchesCollection": "REPO_BRANCHES_COL_NAME", diff --git a/cdk-infra/static/api/config/default.json b/cdk-infra/static/api/config/default.json index 621fb830e..3758dea37 100644 --- a/cdk-infra/static/api/config/default.json +++ b/cdk-infra/static/api/config/default.json @@ -7,7 +7,6 @@ "dbPassword": "password", "dbName": "db_name", "snootyDbName": "snooty_db_name", - "metadataDbName": "METADATA_DB_NAME", "dbUrl": "url", "githubBotPW": "GITHUB_BOT_PASSWORD", "fastlyDochubMap": "FASTLY_DOCHUB_MAP", @@ -18,7 +17,6 @@ "slackViewOpenUrl": "https://slack.com/api/views.open", "snootySecret": "SNOOTY_SECRET", "jobQueueCollection": "JOB_QUEUE_COL_NAME", - "projectsCollection": "PROJECTS_COL_NAME", "entitlementCollection": "USER_ENTITLEMENT_COL_NAME", "repoBranchesCollection": "REPO_BRANCHES_COL_NAME", "docsetsCollection": "DOCSETS_COL_NAME", diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index 73bd24144..6093f03ee 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -6,10 +6,8 @@ "dbHost": "MONGO_ATLAS_HOST", "dbName": "DB_NAME", "snootyDbName": "SNOOTY_DB_NAME", - "metadataDbName": "METADATA_DB_NAME", "dbUrl": "MONGO_ATLAS_URL", "jobQueueCollection": "JOB_QUEUE_COL_NAME", - "projectsCollection": "PROJECTS_COL_NAME", "awsKey": "AWS_ACCESS_KEY_ID", "awsSecret": "AWS_SECRET_ACCESS_KEY", "githubBotUserName": "GITHUB_BOT_USERNAME", diff --git a/config/test.json b/config/test.json index aded7d904..5a17611ea 100644 --- a/config/test.json +++ b/config/test.json @@ -12,7 +12,6 @@ "githubBotPW": "q1w", "fastlyDochubMap": "devfslydochubmap", "entitlementCollection": "entitlements", - "projectsCollection": "projects", "docsetsCollection": "docsets", "MONGO_TIMEOUT_S": 1, "JOB_TIMEOUT_S": 10,