Skip to content

SkipIfBatchCancelled with retries marks previously failed jobs as successful #48810

Closed
@bernardwiesner

Description

@bernardwiesner

Laravel Version

10.4

PHP Version

8.1

Database Driver & Version

No response

Description

When using the SkipIfBatchCancelled middleware together with failed jobs retries, the jobs that previously failed are marked as successful when one job reaches the failed retry threshold.

Steps To Reproduce

Actual:

  1. Batch 10 jobs
  2. Job 3 and 7 fail
  3. Failed jobs are retried up to retry threshold
  4. Job 3 meets threshold first, marks batch as cancelled
  5. Job 7 is skipped, and marked as successful due to SkipIfBatchCancelled middleware

Expected
5. Job 7 had previously failed, so it should not be marked as successful, it should be marked as failed instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions