Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Fix test runner in queue mode (no-changelog) #13479

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,37 @@ export class TestRunnerService {
pastExecutionWorkflowData,
);

const startNodesData = this.getStartNodesData(
workflow,
pastExecutionData,
pastExecutionWorkflowData,
);

// Prepare the data to run the workflow
// Evaluation executions should run the same way as manual,
// because they need pinned data and partial execution logic
const data: IWorkflowExecutionDataProcess = {
...this.getStartNodesData(workflow, pastExecutionData, pastExecutionWorkflowData),
...startNodesData,
executionMode: 'evaluation',
runData: {},
pinData,
workflowData: { ...workflow, pinData },
userId: metadata.userId,
partialExecutionVersion: 2,
executionData: {
startData: {
startNodes: startNodesData.startNodes,
},
resultData: {
pinData,
runData: {},
},
manualData: {
userId: metadata.userId,
partialExecutionVersion: 2,
triggerToStartFrom: startNodesData.triggerToStartFrom,
},
},
};

// Trigger the workflow under test with mocked data
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/scaling/job-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class JobProcessor {

const { startData, resultData, manualData, isTestWebhook } = execution.data;

if (execution.mode === 'manual' && !isTestWebhook) {
if (['manual', 'evaluation'].includes(execution.mode) && !isTestWebhook) {
const data: IWorkflowExecutionDataProcess = {
executionMode: execution.mode,
workflowData: execution.workflowData,
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/workflow-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ export class WorkflowRunner {
pushRef: data.pushRef,
});

if (data.executionData !== undefined) {
// Evaluation executions use the same logic as manual executions
// to use data pinning and start from a specific node
if (data.executionData !== undefined && data.executionMode !== 'evaluation') {
this.logger.debug(`Execution ID ${executionId} had Execution data. Running with payload.`, {
executionId,
});
Expand Down