conductor-oss / conductor-oss/conductor

Bug: failureWorkflow marked as FAILED despite completing successfully

Open
#513 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
32.2k
Forks
1k
Avg merge
2d 5h
Merged PRs (30d)
41

Description

**Describe the bug**
I have a main workflow configured with a `failureWorkflow`. When the main workflow fails, the specified `failureWorkflow` is triggered correctly. The `failureWorkflow` completes with status `COMPLETED`, but it is still marked as `FAILED` and shows the error message from the main workflow.
This behavior **did not happen before** — the `failureWorkflow` used to be marked as `COMPLETED` when it finished successfully.

Additionally, this issue occurs **intermittently** — sometimes the `failureWorkflow` is correctly marked as `COMPLETED`, and other times it is incorrectly marked as `FAILED`.

This causes confusion in monitoring and error handling, since fallback workflows that complete successfully are incorrectly reported as failed.

**Details**
Conductor version: 3.21.14
Persistence implementation: Postgres
Queue implementation: Postgres
Lock: N/A

**To Reproduce**
Steps to reproduce the behavior:
1. Create a workflow A that fails.
2. Configure a `failureWorkflow` B.
3. When A fails, B is triggered as expected.
4. B finishes successfully, but its overall status is sometimes `FAILED` and shows the error message from A, even though all tasks in B completed.

**Expected behavior**
When a `failureWorkflow` completes successfully, it should always be marked with status `COMPLETED`, regardless of the failure reason or message from the original workflow.
The result status of the `failureWorkflow` should be independent and reflect its actual execution outcome.

**Screenshots behaviour issue**

![Image](https://github.com/user-attachments/assets/1394d06b-d080-4783-ae3b-b66ff5e4ccce)
![Image](https://github.com/user-attachments/assets/d0256c4d-4846-4eaa-8976-a02b54781a35)
![Image](https://github.com/user-attachments/assets/63ee8ccf-30d1-4ee0-ada2-d996746115ea)
![Image](https://github.com/user-attachments/assets/6a160948-18d0-474a-8b49-480707b14486)

**Screenshots behaviour expected**

![Image](https://github.com/user-attachments/assets/8074dfa2-2e9e-49a2-837d-70c10a2ac7ab)
![Image](https://github.com/user-attachments/assets/f309d865-c826-44bb-a8b9-0d4c94826732)
![Image](https://github.com/user-attachments/assets/2ebb20a2-4622-4f61-a419-255ba5ee22cf)
![Image](https://github.com/user-attachments/assets/aa7dbb45-6a7d-44af-bc06-1ff6d76064dc)

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reproducing the failureWorkflow scenario on Conductor 3.21.14 with Postgres persistence and queue implementations, then trace how the original workflow failure is propagated to the fallback workflow status. Done means a successfully completed failureWorkflow is consistently reported as COMPLETED with an independent result message.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgres
Domain
backend, databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.