Netflix/conductor

Scheduled Task initiated with previous failed task's outputData

Open

#2,452 opened on 2021年9月9日

GitHub で見る
 (6 comments) (1 reaction) (0 assignees)Java (12,918 stars) (2,331 forks)batch import
good first issuehelp_wanted

説明

Describe the bug Creating a task where it is setup to retry upon failure, the retried task is populated with the previous failed attempt's outputData.

Details Conductor version: 3.2.0 Workflow definition: { "name": "response_test", "version": 1, "tasks": [ { "type": "HTTP", "name": "FUNCTION", "taskReferenceName": "test_task", "inputParameters": { "http_request": { "uri": "http://httpstat.us/500", "method": "GET", "Accept": "application/json" } }, "taskDefinition": { "name": "test_task", "retryCount": 3, "retryLogic": "FIXED", "retryDelaySeconds": 120, "timeoutPolicy": "RETRY" } } ], "ownerEmail": "string@email.com", "schemaVersion": 2 } Task definition: included in workflow definition Event handler definition:

To Reproduce Steps to reproduce the behavior:

  1. Create workflow curl --location --request POST 'http://localhost:8080/api/metadata/workflow' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "response_test", "version": 1, "tasks": [ { "type": "HTTP", "name": "FUNCTION", "taskReferenceName": "test_task", "inputParameters": { "http_request": { "uri": "http://httpstat.us/500", "method": "GET", "Accept": "application/json" } }, "taskDefinition": { "name": "test_task", "retryCount": 3, "retryLogic": "FIXED", "retryDelaySeconds": 120, "timeoutPolicy": "RETRY" } } ], "ownerEmail": "string@email.com", "schemaVersion": 2 }'
  2. Start the workflow curl --location --request POST 'http://localhost:8080/api/workflow/response_test' \ --header 'accept: application/json' \ --header 'Content-Type: application/json' \ --data-raw '{"version": 1}'
  3. Get workflow by Id. Replace workflow id in the curl with output of step#2 curl --location --request GET 'http://localhost:8080/api/workflow/4949a49f-ea2c-4fc2-9c73-331c5ff70196'
  4. Search for "OutputData" in the response from step 3 and look for the second occurrence. Even though the taskId for the second execution is different than the the first and the task is in scheduled state, and the startTime and endTime are 0 indicating the task has executed, the outputData is populated with the response from the first attempt.

Expected behavior When a failed task is retried, the outputData should be empty until the task is actually executed and has outputData.

Screenshots Result Json with explanation:

  1. First task attempt failed, second retry in scheduled state and outputData is populated from the first attempt. workflow_execution_status_2_scheduled.txt

  2. Second retry now in Failed state and outputData now replaced with the actual result of second retry and a 3rd retry in scheduled state with outputData populated from the 2nd failure. workflow_execution_status_2_failed.txt

Additional context Add any other context about the problem here.

コントリビューターガイド