From 1a2ff581eed2428c038d8f1fb7a7fa7dc84090c5 Mon Sep 17 00:00:00 2001 From: anabellabuckvar <41971124+anabellabuckvar@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:35:56 -0400 Subject: [PATCH 01/10] DOP-4481: Test-deploy all docs site button (#1022) * DOP-4490 scrappy changes * DOP-4490 slack changes * DOP-4490 deploy to preprd * DOP-4490 fixing nits * DOP-4490 fixing find options * DOP-4490-b new branch because of cdk error * DOP-4490-b commenting out * DOP-4490-b trying to put section back in * DOP-4490-b trying to put button back in * DOP-4490-b button back in * DOP-4490-b value out * DOP-4490-b value in * DOP-4490-b return value early * DOP-4490-b removing entire button section * DOP-4490-b removing entire button section * DOP-4490-b returning early * DOP-4490-b adding logging * DOP-4490-b return empty deploy repo * DOP-4490-b more logging * DOP-4490-b commenting out * DOP-4490-b logging values * DOP-4490-b add await * DOP-4490-b add button back in * DOP-4490-b add confirm modal * DOP-4490-b remove confirm modal * DOP-4490-b return from deployRepo early * DOP-4490-b return from deployRepo early, but later than before * DOP-4490-b return from deployRepo early, but later than before * DOP-4490-b return from deployRepo earlier * DOP-4490-b test conditional rendering of deploy button * DOP-4490-b test conditional rendering of deploy button * DOP-4490-b test conditional rendering if user is admin * DOP-4490-b test conditional rendering deploy button * DOP-4490-b test conditional rendering deploy button * DOP-4490-b parsing button response * DOP-4490-b fixing admin function * DOP-4490-b parsing button payload * DOP-4490-b parsing button payload * DOP-4490-b logging parsed values * DOP-4490-b logging parsed values * DOP-4490-b logging parsed values * DOP-4490-b logging parsed values * DOP-4490-b logging parsed values * DOP-4490-b changing button block type * DOP-4490-b changing button block type back * DOP-4490-b changing button block type to actions * DOP-4490-b changing button block type to actions * DOP-4490-b changing button block type to actions * DOP-4490-b testing radio button * DOP-4490-b updating radio button * DOP-4490-b prod deployable repo branches * DOP-4490-b parse selection correctly * DOP-4490-b logging getProdDeployableRepoBranches * DOP-4490-b logging getProdDeployableRepoBranches * DOP-4490-b undoing recent changes * DOP-4490-b readding some changes * DOP-4490-b undoing last change * DOP-4490-b changing parse function * DOP-4490-b adding back in * DOP-4490-b fix typo * DOP-4490-b cleaning up * DOP-4490-b logging type * DOP-4490-b logging type again * DOP-4490-b remove from preprd * DOP-4490-b repo selection optional * DOP-4490-b repo selection optional checks * DOP-4490-b redeploy to preprd * DOP-4490-b fix error catching * DOP-4490-b fix error catching * DOP-4490-b remove from preprd * DOP-4490-b nits * DOP-4490-b PR review nits * DOP-4490-b PR review nits * DOP-4490-b nits * DOP-4490-b change how errors are thrown * DOP-4490-b fix try catch for parsing selection --- api/controllers/v1/slack.ts | 85 +++++++++++------ api/controllers/v2/slack.ts | 15 ++- src/job/stagingJobHandler.ts | 2 +- src/repositories/repoBranchesRepository.ts | 9 +- .../repoEntitlementsRepository.ts | 9 ++ src/services/slack.ts | 92 ++++++++++++++++--- 6 files changed, 165 insertions(+), 47 deletions(-) diff --git a/api/controllers/v1/slack.ts b/api/controllers/v1/slack.ts index 6f208b7e2..45484e78a 100644 --- a/api/controllers/v1/slack.ts +++ b/api/controllers/v1/slack.ts @@ -4,6 +4,7 @@ import { RepoEntitlementsRepository } from '../../../src/repositories/repoEntitl import { RepoBranchesRepository } from '../../../src/repositories/repoBranchesRepository'; import { ConsoleLogger, ILogger } from '../../../src/services/logger'; import { SlackConnector } from '../../../src/services/slack'; +import { APIGatewayEvent, APIGatewayProxyResult } from 'aws-lambda'; import { JobRepository } from '../../../src/repositories/jobRepository'; import { buildEntitledBranchList, @@ -13,13 +14,23 @@ import { prepResponse, } from '../../handlers/slack'; import { DocsetsRepository } from '../../../src/repositories/docsetsRepository'; +import { Payload } from '../../../src/entities/job'; -export const DisplayRepoOptions = async (event: any = {}, context: any = {}): Promise => { +export const DisplayRepoOptions = async (event: APIGatewayEvent): Promise => { const consoleLogger = new ConsoleLogger(); const slackConnector = new SlackConnector(consoleLogger, c); + if (!slackConnector.validateSlackRequest(event)) { return prepResponse(401, 'text/plain', 'Signature Mismatch, Authentication Failed!'); } + + if (!event.body) { + return { + statusCode: 400, + body: 'Event body is undefined', + }; + } + const client = new mongodb.MongoClient(c.get('dbUrl')); await client.connect(); const db = client.db(process.env.DB_NAME); @@ -34,8 +45,11 @@ export const DisplayRepoOptions = async (event: any = {}, context: any = {}): Pr : 'User is not entitled!'; return prepResponse(401, 'text/plain', response); } + + const isAdmin = await repoEntitlementRepository.getIsAdmin(key_val['user_id']); + const entitledBranches = await buildEntitledBranchList(entitlement, repoBranchesRepository); - const resp = await slackConnector.displayRepoOptions(entitledBranches, key_val['trigger_id']); + const resp = await slackConnector.displayRepoOptions(entitledBranches, key_val['trigger_id'], isAdmin); if (resp?.status == 200 && resp?.data) { return { statusCode: 200, @@ -71,22 +85,29 @@ export const getDeployableJobs = async ( ) => { const deployable = []; - for (let i = 0; i < values.repo_option.length; i++) { - let repoOwner: string, repoName: string, branchName: string, directory: string | undefined; - const splitValues = values.repo_option[i].value.split('/'); - - if (splitValues.length === 3) { - // e.g. mongodb/docs-realm/master => (owner/repo/branch) - [repoOwner, repoName, branchName] = splitValues; - } else if (splitValues.length === 4 && process.env.FEATURE_FLAG_MONOREPO_PATH === 'true') { - // e.g. 10gen/docs-monorepo/cloud-docs/master => (owner/monorepo/repoDirectory/branch) - [repoOwner, repoName, directory, branchName] = splitValues; + for (let i = 0; i < values?.repo_option?.length; i++) { + let jobTitle: string, repoOwner: string, repoName: string, branchName: string, directory: string | undefined; + if (values.deploy_option == 'deploy_all') { + repoOwner = 'mongodb'; + branchName = 'master'; + repoName = values.repo_option[i].repoName; + jobTitle = `Slack deploy: ${repoOwner}/${repoName}/${branchName}, by ${entitlement.github_username}`; } else { - throw Error('Selected entitlement value is configured incorrectly. Check user entitlements!'); + const splitValues = values.repo_option[i].value.split('/'); + jobTitle = `Slack deploy: ${values.repo_option[i].value}, by ${entitlement.github_username}`; + + if (splitValues.length === 3) { + // e.g. mongodb/docs-realm/master => (owner/repo/branch) + [repoOwner, repoName, branchName] = splitValues; + } else if (splitValues.length === 4 && process.env.FEATURE_FLAG_MONOREPO_PATH === 'true') { + // e.g. 10gen/docs-monorepo/cloud-docs/master => (owner/monorepo/repoDirectory/branch) + [repoOwner, repoName, directory, branchName] = splitValues; + } else { + throw Error('Selected entitlement value is configured incorrectly. Check user entitlements!'); + } } const hashOption = values?.hash_option ?? null; - const jobTitle = `Slack deploy: ${values.repo_option[i].value}, by ${entitlement.github_username}`; const jobUserName = entitlement.github_username; const jobUserEmail = entitlement?.email ?? ''; @@ -96,12 +117,11 @@ export const getDeployableJobs = async ( const branchObject = await repoBranchesRepository.getRepoBranchAliases(repoName, branchName, repoInfo.project); if (!branchObject?.aliasObject) continue; - // TODO: Create strong typing for these rather than comments - const publishOriginalBranchName = branchObject.aliasObject.publishOriginalBranchName; // bool - let aliases = branchObject.aliasObject.urlAliases; // array or null - let urlSlug = branchObject.aliasObject.urlSlug; // string or null, string must match value in urlAliases or gitBranchName - const isStableBranch = branchObject.aliasObject.isStableBranch; // bool or Falsey - aliases = aliases?.filter((a) => a); + const publishOriginalBranchName: boolean = branchObject.aliasObject.publishOriginalBranchName; + const aliases: string[] | null = branchObject.aliasObject.urlAliases; + let urlSlug: string = branchObject.aliasObject.urlSlug; // string or null, string must match value in urlAliases or gitBranchName + const isStableBranch = !!branchObject.aliasObject.isStableBranch; // bool or Falsey, add strong typing + if (!urlSlug || !urlSlug.trim()) { urlSlug = branchName; } @@ -118,12 +138,10 @@ export const getDeployableJobs = async ( urlSlug, false, false, - false, + isStableBranch, directory ); - newPayload.stable = !!isStableBranch; - if (!aliases || aliases.length === 0) { if (non_versioned) { newPayload.urlSlug = ''; @@ -164,7 +182,7 @@ export const getDeployableJobs = async ( return deployable; }; -export const DeployRepo = async (event: any = {}, context: any = {}): Promise => { +export const DeployRepo = async (event: any = {}): Promise => { const consoleLogger = new ConsoleLogger(); const slackConnector = new SlackConnector(consoleLogger, c); if (!slackConnector.validateSlackRequest(event)) { @@ -173,6 +191,7 @@ export const DeployRepo = async (event: any = {}, context: any = {}): Promise 0) { await deployRepo(deployable, consoleLogger, jobRepository, c.get('jobsQueueUrl')); } @@ -235,7 +266,7 @@ function createPayload( }; } -function createJob(payload: any, jobTitle: string, jobUserName: string, jobUserEmail: string) { +function createJob(payload: Payload, jobTitle: string, jobUserName: string, jobUserEmail: string) { return { title: jobTitle, user: jobUserName, diff --git a/api/controllers/v2/slack.ts b/api/controllers/v2/slack.ts index b6d76f74a..fb3ef632f 100644 --- a/api/controllers/v2/slack.ts +++ b/api/controllers/v2/slack.ts @@ -20,6 +20,10 @@ export const DisplayRepoOptions = async (event: APIGatewayEvent): Promise 0) { diff --git a/src/job/stagingJobHandler.ts b/src/job/stagingJobHandler.ts index e543da9fb..df1d772b4 100644 --- a/src/job/stagingJobHandler.ts +++ b/src/job/stagingJobHandler.ts @@ -49,7 +49,7 @@ export class StagingJobHandler extends JobHandler { prepDeployCommands(): void { this.currJob.deployCommands = [ `cd repos/${getDirectory(this.currJob)}`, - `make next-gen-stage${this.currJob.payload.pathPrefix ? `MUT_PREFIX=${this.currJob.payload.mutPrefix}` : ''}`, + `make next-gen-stage${this.currJob.payload.pathPrefix ? ` MUT_PREFIX=${this.currJob.payload.mutPrefix}` : ''}`, ]; } diff --git a/src/repositories/repoBranchesRepository.ts b/src/repositories/repoBranchesRepository.ts index f2764c3ef..20bce0aeb 100644 --- a/src/repositories/repoBranchesRepository.ts +++ b/src/repositories/repoBranchesRepository.ts @@ -1,4 +1,4 @@ -import { Db } from 'mongodb'; +import { Document, Db } from 'mongodb'; import { BaseRepository } from './baseRepository'; import { ILogger } from '../services/logger'; import { IConfig } from 'config'; @@ -32,6 +32,13 @@ export class RepoBranchesRepository extends BaseRepository { return repo?.['branches'] ?? []; } + async getProdDeployableRepoBranches(): Promise { + const reposArray = await this._collection + .aggregate([{ $match: { prodDeployable: true, internalOnly: false } }, { $project: { _id: 0, repoName: 1 } }]) + .toArray(); + return reposArray ?? []; + } + async getRepoBranchAliases(repoName: string, branchName: string, project: string): Promise { const returnObject = { status: 'failure' }; const aliasArray = await this._collection diff --git a/src/repositories/repoEntitlementsRepository.ts b/src/repositories/repoEntitlementsRepository.ts index 2e73f8623..7cb5c8aaa 100644 --- a/src/repositories/repoEntitlementsRepository.ts +++ b/src/repositories/repoEntitlementsRepository.ts @@ -47,6 +47,15 @@ export class RepoEntitlementsRepository extends BaseRepository { } } + async getIsAdmin(slackUserId: string): Promise { + const query = { slack_user_id: slackUserId }; + const entitlementsObject = await this.findOne( + query, + `Mongo Timeout Error: Timedout while retrieving entitlements for ${slackUserId}` + ); + return entitlementsObject?.admin; + } + async getGatsbySiteIdByGithubUsername(githubUsername: string): Promise { return this.getBuildHookByGithubUsername(githubUsername, 'gatsby_site_id'); } diff --git a/src/services/slack.ts b/src/services/slack.ts index 4370a8500..20803d268 100644 --- a/src/services/slack.ts +++ b/src/services/slack.ts @@ -2,6 +2,7 @@ import axios from 'axios'; import { ILogger } from './logger'; import { IConfig } from 'config'; import * as crypto from 'crypto'; +import { RepoBranchesRepository } from '../repositories/repoBranchesRepository'; export const axiosApi = axios.create(); function bufferEqual(a: Buffer, b: Buffer) { @@ -22,8 +23,8 @@ function timeSafeCompare(a: string, b: string) { export interface ISlackConnector { validateSlackRequest(payload: any): boolean; - displayRepoOptions(repos: Array, triggerId: string): Promise; - parseSelection(payload: any): any; + displayRepoOptions(repos: Array, triggerId: string, isAdmin: boolean): Promise; + parseSelection(payload: any, isAdmin: boolean, repoBranchesRepository: RepoBranchesRepository): any; sendMessage(message: any, user: string): Promise; } @@ -52,25 +53,44 @@ export class SlackConnector implements ISlackConnector { } return {}; } - parseSelection(stateValues: any): any { + + async parseSelection( + stateValues: any, + isAdmin: boolean, + repoBranchesRepository: RepoBranchesRepository + ): Promise { const values = {}; const inputMapping = { block_repo_option: 'repo_option', block_hash_option: 'hash_option', + block_deploy_option: 'deploy_option', }; + // if deploy all was selected: + if (stateValues['block_deploy_option']['deploy_option']?.selected_option?.value == 'deploy_all') { + if (!isAdmin) { + throw new Error('User is not an admin and therefore not entitled to deploy all repos'); + } + + values['deploy_option'] = 'deploy_all'; + values['repo_option'] = await repoBranchesRepository.getProdDeployableRepoBranches(); + return values; + } + + //if deploy indivual repos was selected: // get key and values to figure out what user wants to deploy for (const blockKey in inputMapping) { const blockInputKey = inputMapping[blockKey]; const stateValuesObj = stateValues[blockKey][blockInputKey]; - // selected value from dropdown - if (stateValuesObj?.selected_option?.value) { - values[blockInputKey] = stateValuesObj.selected_option.value; - } + // multi select is an array - else if (stateValuesObj?.selected_options && stateValuesObj.selected_options.length > 0) { + if (stateValuesObj?.selected_options?.length > 0) { values[blockInputKey] = stateValuesObj.selected_options; } + //return an error if radio button choice 'deploy individual repos' was selected but no repo was actually chosen + else if (blockInputKey == 'repo_option') { + throw new Error('Deploy individual repos was selected but no repo was actually chosen to be deployed'); + } // input value else if (stateValuesObj?.value) { values[blockInputKey] = stateValuesObj.value; @@ -99,8 +119,9 @@ export class SlackConnector implements ISlackConnector { return false; } - async displayRepoOptions(repos: string[], triggerId: string): Promise { - const repoOptView = this._buildDropdown(repos, triggerId); + async displayRepoOptions(repos: string[], triggerId: string, isAdmin: boolean): Promise { + const reposToShow = this._buildDropdown(repos); + const repoOptView = this._getDropDownView(triggerId, reposToShow, isAdmin); const slackToken = this._config.get('slackAuthToken'); const slackUrl = this._config.get('slackViewOpenUrl'); return await axiosApi.post(slackUrl, repoOptView, { @@ -110,8 +131,51 @@ export class SlackConnector implements ISlackConnector { }, }); } + private _getDropDownView(triggerId: string, repos: Array, isAdmin: boolean) { + const deployAll = isAdmin + ? { + type: 'section', + block_id: 'block_deploy_option', + text: { + type: 'plain_text', + text: 'How would you like to deploy docs sites?', + }, + accessory: { + type: 'radio_buttons', + action_id: 'deploy_option', + initial_option: { + value: 'deploy_individually', + text: { + type: 'plain_text', + text: 'Deploy individual repos', + }, + }, + options: [ + { + value: 'deploy_individually', + text: { + type: 'plain_text', + text: 'Deploy individual repos', + }, + }, + { + value: 'deploy_all', + text: { + type: 'plain_text', + text: 'Deploy all repos', + }, + }, + ], + }, + } + : { + type: 'section', + text: { + type: 'plain_text', + text: ' ', + }, + }; - private _getDropDownView(triggerId: string, repos: Array) { return { trigger_id: triggerId, view: { @@ -145,6 +209,7 @@ export class SlackConnector implements ISlackConnector { }, options: repos, }, + optional: true, label: { type: 'plain_text', text: 'Select Repo', @@ -168,12 +233,13 @@ export class SlackConnector implements ISlackConnector { text: 'Commit Hash', }, }, + deployAll, ], }, }; } - private _buildDropdown(branches: Array, triggerId: string): any { + private _buildDropdown(branches: Array): Array { let reposToShow: Array = []; branches.forEach((fullPath) => { const displayBranchPath = fullPath; @@ -208,6 +274,6 @@ export class SlackConnector implements ISlackConnector { .localeCompare(a.text.text.toString().replace(/\d+/g, (n) => +n + 100000)); }); - return this._getDropDownView(triggerId, reposToShow); + return reposToShow; } } From 6d698e2cccc4ab05a335213573a111043661bc6a Mon Sep 17 00:00:00 2001 From: Maya Raman Date: Tue, 16 Apr 2024 09:48:03 -0400 Subject: [PATCH 02/10] DOP-4452: Add bucket routing rule to rehome Realm docs from /docs/realm to /docs/atlas/device-sdks (#1026) * adding bucket routing rule * bucket rules * prerpd * release preprd * taking back preprd * PREPRD AGAIN * back to preprd * let go of preprd --- infrastructure/ecs-main/buckets.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/infrastructure/ecs-main/buckets.yml b/infrastructure/ecs-main/buckets.yml index a476a5f8e..51a03e74a 100644 --- a/infrastructure/ecs-main/buckets.yml +++ b/infrastructure/ecs-main/buckets.yml @@ -84,6 +84,24 @@ Resources: Protocol: "https" HostName: ${self:custom.site.host.${self:provider.stage}} ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/php-library/upcoming + - RoutingRuleCondition: + KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/realm/sdk + RedirectRule: + Protocol: "https" + HostName: ${self:custom.site.host.${self:provider.stage}} + ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/atlas/device-sdks/sdk + - RoutingRuleCondition: + KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/realm/web + RedirectRule: + Protocol: "https" + HostName: ${self:custom.site.host.${self:provider.stage}} + ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/atlas/device-sdks/web + - RoutingRuleCondition: + KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/realm/studio + RedirectRule: + Protocol: "https" + HostName: ${self:custom.site.host.${self:provider.stage}} + ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/atlas/device-sdks/studio DocAtlasBucket: Type: "AWS::S3::Bucket" Properties: From 61806991bc36cc2ecf9973859a7948d3d291a3b9 Mon Sep 17 00:00:00 2001 From: anabellabuckvar <41971124+anabellabuckvar@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:50:58 -0400 Subject: [PATCH 03/10] DOP-4401-c: Add commit hash to path for Smoke Test Deploys (#1018) * DOP-4401-c initial changes * DOP-4414 undoing changes for testing * DOP-4401-c refactor pathprefix * DOP-4401-c playing with mut prefix * DOP-4401-c mut prefix * DOP-4401-c undoing pathprefix conditional * DOP-4401-c redoing path prefix conditional and populating pathPrefix * DOP-4401-c redoing path prefix conditional but depopulating path prefix * DOP-4401-c adding a space in next-gen-stage argument * DOP-4401-c pushing to preprd * DOP-4401-c removing from preprd * DOP-4401-c pushing to preprd * DOP-4401-c playing with pathprefix * DOP-4401-c playing with pathprefix * DOP-4401-c setting mutPrefix to prePrefix * DOP-4401-c adding slack deploy to the end of mutprefix * DOP-4401-c implementing changes test on 4414 * DOP-4401-c reverting conditional amended for testing --- src/job/jobHandler.ts | 1 + src/job/productionJobHandler.ts | 23 ++++++++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/job/jobHandler.ts b/src/job/jobHandler.ts index f0f8743cb..5b5a7ae3a 100644 --- a/src/job/jobHandler.ts +++ b/src/job/jobHandler.ts @@ -153,6 +153,7 @@ export abstract class JobHandler { // TODO: Can empty string check be removed? if (pathPrefix || pathPrefix === '') { this.currJob.payload.pathPrefix = pathPrefix; + //sets mutPrefix to the full pathPrefix unless server user is in the path (I believe this only happens in a subset of cases when docs-worker-xlarge is the server-user) const mutPrefix = pathPrefix.split(`/${server_user}`)[0]; this.currJob.payload.mutPrefix = mutPrefix; } diff --git a/src/job/productionJobHandler.ts b/src/job/productionJobHandler.ts index 6190cc018..e1529b5c5 100644 --- a/src/job/productionJobHandler.ts +++ b/src/job/productionJobHandler.ts @@ -141,22 +141,15 @@ export class ProductionJobHandler extends JobHandler { } getPathPrefix(): string { - try { - if (this.currJob.payload.prefix && this.currJob.payload.prefix === '') { - return this.currJob.payload.urlSlug ?? ''; - } - if (this.currJob.payload.urlSlug) { - if (this.currJob.payload.urlSlug === '') { - return this.currJob.payload.prefix; - } else { - return `${this.currJob.payload.prefix}/${this.currJob.payload.urlSlug}`; - } - } - return this.currJob.payload.prefix; - } catch (error) { - this.logger.save(this.currJob._id, error).then(); - throw new InvalidJobError(error.message); + const prefix = this.currJob.payload.urlSlug + ? `${this.currJob.payload.prefix}/${this.currJob.payload.urlSlug}` + : this.currJob.payload.prefix; + if (this.currJob.payload.action == 'automatedTest') { + const titleArray = this.currJob.title.split(' '); + const commitHash = titleArray[titleArray.length - 5]; + return `${prefix}/smokeTests/${commitHash}`; } + return prefix; } private async purgePublishedContent(makefileOutput: Array): Promise { From f10440364b9c403701f8ef749f47fb4713d85998 Mon Sep 17 00:00:00 2001 From: rayangler <27821750+rayangler@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:47:33 -0400 Subject: [PATCH 04/10] Update Dockerfile --- Dockerfile | 4 ++-- Dockerfile.local | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 947f95652..632613602 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,8 @@ RUN cd ./modules/oas-page-builder \ # where repo work will happen FROM ubuntu:20.04 ARG WORK_DIRECTORY=/home/docsworker-xlarge -ARG SNOOTY_PARSER_VERSION=0.16.5 -ARG SNOOTY_FRONTEND_VERSION=0.16.9 +ARG SNOOTY_PARSER_VERSION=0.16.6 +ARG SNOOTY_FRONTEND_VERSION=0.16.10 ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH diff --git a/Dockerfile.local b/Dockerfile.local index 6f3fbaa5a..ed0ba4f53 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -1,8 +1,8 @@ FROM arm64v8/ubuntu:20.04 as initial ARG NPM_BASE_64_AUTH ARG NPM_EMAIL -ARG SNOOTY_PARSER_VERSION=0.16.5 -ARG SNOOTY_FRONTEND_VERSION=0.16.9 +ARG SNOOTY_PARSER_VERSION=0.16.6 +ARG SNOOTY_FRONTEND_VERSION=0.16.10 ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH From 5abe722d4b892f082c747b53f5b8ebb67ca3d6bb Mon Sep 17 00:00:00 2001 From: anabellabuckvar <41971124+anabellabuckvar@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:46:33 -0400 Subject: [PATCH 05/10] DOP-4481 hotfix (#1032) * DOP-4481-hotfix adding extra check * DOP-4481-hotfix push to preprd * DOP-4481-hotfix fix conditional * DOP-4481-hotfix fix conditional * DOP-4481-hotfix fix conditional * DOP-4481-hotfix cleaning --- src/services/slack.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/services/slack.ts b/src/services/slack.ts index 20803d268..e5483ec98 100644 --- a/src/services/slack.ts +++ b/src/services/slack.ts @@ -63,11 +63,10 @@ export class SlackConnector implements ISlackConnector { const inputMapping = { block_repo_option: 'repo_option', block_hash_option: 'hash_option', - block_deploy_option: 'deploy_option', }; // if deploy all was selected: - if (stateValues['block_deploy_option']['deploy_option']?.selected_option?.value == 'deploy_all') { + if (stateValues['block_deploy_option']?.deploy_option?.selected_option?.value == 'deploy_all') { if (!isAdmin) { throw new Error('User is not an admin and therefore not entitled to deploy all repos'); } From 011e656aec3521bfc10bce796f8569f03a410011 Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Wed, 24 Apr 2024 17:25:11 -0400 Subject: [PATCH 06/10] :whale: DOP-0000 bumps SNOOTY_FRONTEND_VERSION on Dockerfile (#1033) Co-authored-by: Caesar Bell --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 632613602..786ec0e5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN cd ./modules/oas-page-builder \ FROM ubuntu:20.04 ARG WORK_DIRECTORY=/home/docsworker-xlarge ARG SNOOTY_PARSER_VERSION=0.16.6 -ARG SNOOTY_FRONTEND_VERSION=0.16.10 +ARG SNOOTY_FRONTEND_VERSION=0.16.11 ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH From 6cf17af6e3d82a8f39c0b0baae0dfc1a7c88477c Mon Sep 17 00:00:00 2001 From: Allison Reinheimer Moore Date: Wed, 1 May 2024 16:25:26 -0400 Subject: [PATCH 07/10] Update Dockerfile for BREADCRUMBIES --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 786ec0e5e..a441b9d7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN cd ./modules/oas-page-builder \ FROM ubuntu:20.04 ARG WORK_DIRECTORY=/home/docsworker-xlarge ARG SNOOTY_PARSER_VERSION=0.16.6 -ARG SNOOTY_FRONTEND_VERSION=0.16.11 +ARG SNOOTY_FRONTEND_VERSION=0.16.12 ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH From a0f46fc3f77e7ac77c705db72456682b7b16737b Mon Sep 17 00:00:00 2001 From: Allison Reinheimer Moore Date: Wed, 1 May 2024 16:26:15 -0400 Subject: [PATCH 08/10] Update Dockerfile.local for breadcrumbs --- Dockerfile.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.local b/Dockerfile.local index ed0ba4f53..0538bb46d 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -2,7 +2,7 @@ FROM arm64v8/ubuntu:20.04 as initial ARG NPM_BASE_64_AUTH ARG NPM_EMAIL ARG SNOOTY_PARSER_VERSION=0.16.6 -ARG SNOOTY_FRONTEND_VERSION=0.16.10 +ARG SNOOTY_FRONTEND_VERSION=0.16.12 ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH From 32a6dfb0c5666fc26557ab2261def0fec248fc50 Mon Sep 17 00:00:00 2001 From: Allison Reinheimer Moore Date: Wed, 1 May 2024 20:25:50 -0400 Subject: [PATCH 09/10] Update front-end to munich-y version --- Dockerfile | 2 +- Dockerfile.local | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a441b9d7a..80dc5c46b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN cd ./modules/oas-page-builder \ FROM ubuntu:20.04 ARG WORK_DIRECTORY=/home/docsworker-xlarge ARG SNOOTY_PARSER_VERSION=0.16.6 -ARG SNOOTY_FRONTEND_VERSION=0.16.12 +ARG SNOOTY_FRONTEND_VERSION=0.16.11-munich ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH diff --git a/Dockerfile.local b/Dockerfile.local index 0538bb46d..7298ef774 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -2,7 +2,7 @@ FROM arm64v8/ubuntu:20.04 as initial ARG NPM_BASE_64_AUTH ARG NPM_EMAIL ARG SNOOTY_PARSER_VERSION=0.16.6 -ARG SNOOTY_FRONTEND_VERSION=0.16.12 +ARG SNOOTY_FRONTEND_VERSION=0.16.11-munich ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH From ebebd379f444a991dc92b32ff596fff9f6569477 Mon Sep 17 00:00:00 2001 From: Allison Reinheimer Moore Date: Fri, 3 May 2024 12:44:42 -0400 Subject: [PATCH 10/10] Bump front-end to 0.16.13 --- Dockerfile | 2 +- Dockerfile.local | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 80dc5c46b..65be09e59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN cd ./modules/oas-page-builder \ FROM ubuntu:20.04 ARG WORK_DIRECTORY=/home/docsworker-xlarge ARG SNOOTY_PARSER_VERSION=0.16.6 -ARG SNOOTY_FRONTEND_VERSION=0.16.11-munich +ARG SNOOTY_FRONTEND_VERSION=0.16.13 ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH diff --git a/Dockerfile.local b/Dockerfile.local index 7298ef774..84646898a 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -2,7 +2,7 @@ FROM arm64v8/ubuntu:20.04 as initial ARG NPM_BASE_64_AUTH ARG NPM_EMAIL ARG SNOOTY_PARSER_VERSION=0.16.6 -ARG SNOOTY_FRONTEND_VERSION=0.16.11-munich +ARG SNOOTY_FRONTEND_VERSION=0.16.13 ARG MUT_VERSION=0.11.2 ARG REDOC_CLI_VERSION=1.2.3 ARG NPM_BASE_64_AUTH