Skip to content

Commit

Permalink
Merge branch 'main' into DOP-4401
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry authored Mar 26, 2024
2 parents 614e88e + 1752d87 commit c22f16b
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 15 deletions.
4 changes: 0 additions & 4 deletions cdk-infra/lib/constructs/worker/worker-env-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ export class WorkerEnvConstruct extends Construct {
// font-end feature flag for unified footer locale selector
const gatsbyHideUnifiedFooterLocale = StringParameter.valueFromLookup(this, `${ssmPrefix}/flag/hide_locale`);

// front end feature flag for chatbot UI
const gatsbyUseChatbot = StringParameter.valueFromLookup(this, `${ssmPrefix}/flag/use_chatbot`);

const githubBotUsername = StringParameter.valueFromLookup(this, `${ssmPrefix}/github/bot/username`);

const npmEmail = StringParameter.valueFromLookup(this, `${ssmPrefix}/npm/email`);
Expand Down Expand Up @@ -101,7 +98,6 @@ export class WorkerEnvConstruct extends Construct {
USE_CUSTOM_BUCKETS: `${getUseCustomBuckets()}`,
FEATURE_NAME: getFeatureName(),
GATSBY_TEST_SEARCH_UI: 'false',
GATSBY_SHOW_CHATBOT: gatsbyUseChatbot,
GATSBY_HIDE_UNIFIED_FOOTER_LOCALE: gatsbyHideUnifiedFooterLocale,
GATSBY_MARIAN_URL: gatsbyMarianUrl,
IS_FEATURE_BRANCH: getIsFeatureBranch(),
Expand Down
1 change: 0 additions & 1 deletion config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"previewBuildEnabled": "PREVIEW_BUILD_ENABLED",
"featureFlagUpdatePages": "FEATURE_FLAG_UPDATE_PAGES",
"featureFlagSearchUI": "GATSBY_TEST_SEARCH_UI",
"gatsbyUseChatbot": "GATSBY_SHOW_CHATBOT",
"gatsbyHideUnifiedFooterLocale": "GATSBY_HIDE_UNIFIED_FOOTER_LOCALE",
"gatsbyMarianURL": "GATSBY_MARIAN_URL",
"repoBranchesCollection": "REPO_BRANCHES_COL_NAME",
Expand Down
1 change: 0 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"previewBuildEnabled": "false",
"featureFlagUpdatePages": "false",
"featureFlagSearchUI": "false",
"gatsbyUseChatbot": "false",
"parallel": {
"enabled": true,
"stg": {
Expand Down
2 changes: 0 additions & 2 deletions infrastructure/ecs-main/ecs_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ Resources:
Value: ${self:custom.featureFlagMonorepoPath}
- Name: GATSBY_TEST_SEARCH_UI
Value: ${self:custom.featureFlagSearchUI}
- Name: GATSBY_SHOW_CHATBOT
Value: ${self:custom.gatsbyUseChatbot}
- Name: GATSBY_MARIAN_URL
Value: ${self:custom.gatsbyMarianURL}
- Name: GATSBY_HIDE_UNIFIED_FOOTER_LOCALE
Expand Down
1 change: 0 additions & 1 deletion infrastructure/ecs-main/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ custom:
featureFlagMonorepoPath: ${ssm:/env/${self:provider.stage}/docs/worker_pool/flag/monorepo_path}
featureFlagSearchUI: ${ssm:/env/${self:provider.stage}/docs/worker_pool/flag/search_ui}
gatsbyTestEmbedVersions: ${ssm:/env/${self:provider.stage}/docs/worker_pool/flag/embedded_versions}
gatsbyUseChatbot: ${ssm:/env/${self:provider.stage}/docs/worker_pool/flag/use_chatbot}
gatsbyHideUnifiedFooterLocale: ${ssm:/env/${self:provider.stage}/docs/worker_pool/flag/hide_locale}
gatsbyMarianURL: ${ssm:/env/${self:provider.stage}/docs/worker_pool/frontend/marian_url}
fastlyMainToken: ${ssm:/env/${self:provider.stage}/docs/worker_pool/fastly/docs/main/token}
Expand Down
2 changes: 0 additions & 2 deletions src/commands/src/scripts/local-build/utils/get-env-vars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const workerParamStrings = [
'/atlas/host',
'/flag/preview_webhook_enable',
'/flag/hide_locale',
'/flag/use_chatbot',
'/github/bot/username',
'/npm/email',
'/frontend/base_url',
Expand Down Expand Up @@ -73,7 +72,6 @@ const workerParamPathToEnvName: Record<WorkerParamString, string> = {
'/atlas/collections/user/entitlements': 'USER_ENTITLEMENT_COL_NAME',
'/npm/email': 'NPM_EMAIL',
'/atlas/collections/repo': 'REPO_BRANCHES_COL_NAME',
'/flag/use_chatbot': 'GATSBY_SHOW_CHATBOT',
'/flag/hide_locale': 'GATSBY_HIDE_UNIFIED_FOOTER_LOCALE',
'/atlas/collections/job/queue': 'JOB_QUEUE_COL_NAME',
'/flag/preview_webhook_enable': 'GATSBY_CLOUD_PREVIEW_WEBHOOK_ENABLED',
Expand Down
1 change: 0 additions & 1 deletion src/job/jobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ export abstract class JobHandler {
GATSBY_BASE_URL: this._config.get<string>('gatsbyBaseUrl'),
PREVIEW_BUILD_ENABLED: this._config.get<string>('previewBuildEnabled'),
GATSBY_TEST_SEARCH_UI: this._config.get<string>('featureFlagSearchUI'),
GATSBY_SHOW_CHATBOT: this._config.get<string>('gatsbyUseChatbot'),
GATSBY_HIDE_UNIFIED_FOOTER_LOCALE: this._config.get<string>('gatsbyHideUnifiedFooterLocale'),
GATSBY_MARIAN_URL: this._config.get<string>('gatsbyMarianURL'),
};
Expand Down
2 changes: 1 addition & 1 deletion tests/data/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class TestDataProvider {
}

static getEnvVarsWithPathPrefixWithFlags(job: Job): string {
return `GATSBY_PARSER_USER=TestUser\nGATSBY_PARSER_BRANCH=${job.payload.branchName}\nPATH_PREFIX=${job.payload.pathPrefix}\nGATSBY_BASE_URL=test\nPREVIEW_BUILD_ENABLED=false\nGATSBY_TEST_SEARCH_UI=false\nGATSBY_SHOW_CHATBOT=false\nGATSBY_HIDE_UNIFIED_FOOTER_LOCALE=true\nGATSBY_MARIAN_URL=test-url\n`;
return `GATSBY_PARSER_USER=TestUser\nGATSBY_PARSER_BRANCH=${job.payload.branchName}\nPATH_PREFIX=${job.payload.pathPrefix}\nGATSBY_BASE_URL=test\nPREVIEW_BUILD_ENABLED=false\nGATSBY_TEST_SEARCH_UI=false\nGATSBY_HIDE_UNIFIED_FOOTER_LOCALE=true\nGATSBY_MARIAN_URL=test-url\n`;
}

static getPathPrefixCases(): Array<any> {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/job/productionJobHandler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe('ProductionJobHandler Tests', () => {

expect(jobHandlerTestHelper.fileSystemServices.writeToFile).toBeCalledWith(
`repos/${jobHandlerTestHelper.job.payload.repoName}/.env.production`,
`GATSBY_PARSER_USER=TestUser\nGATSBY_PARSER_BRANCH=${jobHandlerTestHelper.job.payload.branchName}\nPATH_PREFIX=/\nGATSBY_BASE_URL=test\nPREVIEW_BUILD_ENABLED=false\nGATSBY_TEST_SEARCH_UI=false\nGATSBY_SHOW_CHATBOT=false\nGATSBY_HIDE_UNIFIED_FOOTER_LOCALE=true\nGATSBY_MARIAN_URL=test-url\n`,
`GATSBY_PARSER_USER=TestUser\nGATSBY_PARSER_BRANCH=${jobHandlerTestHelper.job.payload.branchName}\nPATH_PREFIX=/\nGATSBY_BASE_URL=test\nPREVIEW_BUILD_ENABLED=false\nGATSBY_TEST_SEARCH_UI=false\nGATSBY_HIDE_UNIFIED_FOOTER_LOCALE=true\nGATSBY_MARIAN_URL=test-url\n`,
{ encoding: 'utf8', flag: 'w' }
);
});
Expand Down
1 change: 0 additions & 1 deletion tests/utils/jobHandlerTestHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ export class JobHandlerTestHelper {
this.config.get.calledWith('gatsbyBaseUrl').mockReturnValue('test');
this.config.get.calledWith('previewBuildEnabled').mockReturnValue('false');
this.config.get.calledWith('featureFlagSearchUI').mockReturnValue('false');
this.config.get.calledWith('gatsbyUseChatbot').mockReturnValue('false');
this.config.get.calledWith('gatsbyHideUnifiedFooterLocale').mockReturnValue('true');
this.config.get.calledWith('gatsbyMarianURL').mockReturnValue('test-url');
this.repoConnector.checkCommits
Expand Down

0 comments on commit c22f16b

Please sign in to comment.