Skip to content

Commit

Permalink
[DOP-4334]: Add more logging to find where stuff stops working
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed Feb 21, 2024
1 parent 9ca45d5 commit 75f3d6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/handlers/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ interface CreatePayloadProps {
repoOwner: string;
repoName: string;
branchName: string;
newHead: string;
project: string;
prefix: string;
urlSlug;
Expand All @@ -303,6 +302,7 @@ interface CreatePayloadProps {
primaryAlias: boolean;
stable: boolean;
directory?: string;
newHead?: string;
}

export function createPayload({
Expand Down
6 changes: 4 additions & 2 deletions src/job/productionJobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class ProductionJobHandler extends JobHandler {
let resp;
if (process.env.FEATURE_FLAG_MONOREPO_PATH === 'true' && this.currJob.payload.repoName === MONOREPO_NAME) {
const { mutPrefix, branchName } = this.currJob.payload;
await this.logger.save(this.currJob._id, `${'(prod)'.padEnd(15)} Begin Deploy without makefiles`);
await this.logger.save(this.currJob._id, `${'(prod-monorepo)'.padEnd(15)} Begin Deploy without makefiles`);

// using this as a way to test deploy with feature branches in dotcomstg (preprod)
const finalMutPrefix =
Expand All @@ -188,8 +188,10 @@ export class ProductionJobHandler extends JobHandler {
: mutPrefix;

const { bucket, url } = await this.getEnvironmentVariables();
const hasConfigRedirects = await checkRedirects(this.currJob.payload.repoName, this.currJob.payload.directory);

await this.logger.save(this.currJob._id, `${'(prod-monorepo)'.padEnd(15)} Check redirects`);
const hasConfigRedirects = await checkRedirects(this.currJob.payload.repoName, this.currJob.payload.directory);
await this.logger.save(this.currJob._id, `${'(prod-monorepo)'.padEnd(15)} Redirects checked`);
resp = await nextGenDeploy({ mutPrefix: finalMutPrefix, bucket, url, branchName, hasConfigRedirects });
} else {
resp = await this.deployWithMakefiles();
Expand Down

0 comments on commit 75f3d6b

Please sign in to comment.