Skip to content

NotImplementedError is always retried #1670

@olivier-thatch

Description

@olivier-thatch

NotImplementedError does not derive from StandardError. Per the documentation, exceptions that don't derive from StandardError are always retried, but if NotImplementedError is raised it's pretty much guaranteed that bad code was deployed and the job will never succeed.

We ran into this issue in our codebase, where a job was retried over 10,000 times before someone noticed and force-terminated the job via the UI. Also, the UI shows GoodJob::InterruptError as the exception, masking the actual NotImplementedError exception:

Image

We've fixed this by adding discard_on NotImplementedError to the ApplicationJob parent class, but ideally I think GoodJob should know not to retry jobs on NotImplementedError exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions