diff --git a/src/commands/src/shared/next-gen-parse.ts b/src/commands/src/shared/next-gen-parse.ts index 18348b1dd..4036d4605 100644 --- a/src/commands/src/shared/next-gen-parse.ts +++ b/src/commands/src/shared/next-gen-parse.ts @@ -1,3 +1,4 @@ +import { IJobRepoLogger } from '../../../services/logger'; import { CliCommandResponse, executeCliCommand } from '../helpers'; const RSTSPEC_FLAG = '--rstspec=https://raw.githubusercontent.com/mongodb/snooty-parser/latest/snooty/rstspec.toml'; @@ -6,8 +7,14 @@ interface NextGenParseParams { repoDir: string; commitHash?: string; patchId?: string; + logger: IJobRepoLogger; } -export async function nextGenParse({ repoDir, patchId, commitHash }: NextGenParseParams): Promise { +export async function nextGenParse({ + repoDir, + patchId, + commitHash, + logger, +}: NextGenParseParams): Promise { const commandArgs = ['build', repoDir, '--output', `${repoDir}/bundle.zip`, RSTSPEC_FLAG]; if (patchId && commitHash) { @@ -18,5 +25,7 @@ export async function nextGenParse({ repoDir, patchId, commitHash }: NextGenPars commandArgs.push(patchId); } + logger.save(repoDir, `COMMAND for parse: ${commandArgs.join(' ')}`); + return executeCliCommand({ command: 'snooty', args: commandArgs }); } diff --git a/src/job/jobHandler.ts b/src/job/jobHandler.ts index 597d1c798..806bc208c 100644 --- a/src/job/jobHandler.ts +++ b/src/job/jobHandler.ts @@ -322,6 +322,7 @@ export abstract class JobHandler { const snootyParseRes = await nextGenParse({ repoDir: `repos/${getDirectory(this.currJob)}`, commitHash: this.currJob.payload.newHead ?? '', + logger: this._logger, }); this._logger.save( this.currJob._id,