Skip to content

[Bug]: Flow jobs child failure handling is broken #2229

Closed
@CodingMeSwiftly

Description

@CodingMeSwiftly

Version

v4.6.3

Platform

NodeJS

What happened?

This is a follow up for #1469.

  • If a child job is failing, worker.on('failed', () => { ... } is invoked for the child job.
  • It is not invoked for the parent job failing, even if failParentOnFailure is set on the child.
  • Redis event stream shows: event: failed, jobId: xxx, failedReason: child xyz failed, prev: waiting-children, so the event is created, but the callback is never invoked.

According to #1469, this was fixed by #1481. However, it seems a regression was introduced with #1953.

Additionally, failParentOnFailure does not work with removeOnFail.
Expected behaviour: If failParentOnFailure is set for a child and the parent has removeOnFail, the parent should be removed from the queue.

How to reproduce.

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions