Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Pickering <[email protected]>
  • Loading branch information
alexvpickering committed Sep 19, 2024
1 parent 02f8a10 commit d77a310
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions src/api.v2/helpers/pipeline/getPipelineStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,21 +295,36 @@ const getPipelineStatus = async (experimentId, processName) => {

const shouldRerun = await shouldPipelineRerun(experimentId, processName);

console.log('shouldRerun!!!!');
console.log(shouldRerun);

execution = await stepFunctions.describeExecution({
executionArn,
}).promise();

console.log('execution!!!');
console.log(execution);

const events = await getExecutionHistory(stepFunctions, executionArn);
error = checkError(events);
console.log('events!!!');
console.log(events);

const executedSteps = getStepsFromExecutionHistory(events);
console.log('executedSteps!!!');
console.log(executedSteps);

const completedSteps = await getCompletedSteps(
processName, stateMachineArn, executedSteps, stepFunctions,
);
console.log('completedSteps!!!');
console.log(completedSteps);

response = buildResponse(processName, execution, shouldRerun, error, completedSteps);
console.log('response!!!');
console.log(response);
try {
execution = await stepFunctions.describeExecution({
executionArn,
}).promise();

const events = await getExecutionHistory(stepFunctions, executionArn);
error = checkError(events);

const executedSteps = getStepsFromExecutionHistory(events);

const completedSteps = await getCompletedSteps(
processName, stateMachineArn, executedSteps, stepFunctions,
);

response = buildResponse(processName, execution, shouldRerun, error, completedSteps);
console.log('here');
} catch (e) {
if (
(e.code === pipelineConstants.EXECUTION_DOES_NOT_EXIST)
Expand Down

0 comments on commit d77a310

Please sign in to comment.