Skip to content

Support upcoming version of RQ #2310

Closed

Description

@selwin

Problem Statement

I'm RQ's maintainer and I use Sentry in production. I plan on releasing a major improvement to RQ sometime in the next few weeks, but this upcoming change breaks Sentry's integration.

Solution Brainstorm

This pull request introduces a change that causes Sentry's RQ integration to fail. From what I can tell, the failure is caused by this change.

Can we get Sentry to support this change prior to the next major release of RQ? I plan on releasing this sometime in the next few weeks.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Aug 17, 2023
  2. sentrivana commented on Aug 17, 2023

    @sentrivana
    Collaborator

    Hey @selwin, thanks a lot for the heads up! We'll have to see if someone has time to squeeze this in this week, because if not, realistically speaking it's not likely that we will be able to look at this until after next week.

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Aug 17, 2023
  4. selwin commented on Aug 17, 2023

    @selwin
    Author

    Thanks @sentrivana !

  5. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Aug 17, 2023
  6. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Aug 17, 2023
  7. antonpirker commented on Aug 18, 2023

    @antonpirker
    Contributor

    Hey @selwin !

    Comming week we have our Sentry interal hackweek. (Where we stop our day to day work, and hack on other stuff)
    So we will pick up the RQ issue again in the week of August 28th. Don't know when exactly we can work on this, because we have still other things in our pipeline that need finishing first.

    When exactly is your release planned?

  8. selwin commented on Aug 19, 2023

    @selwin
    Author

    Hi @antonpirker, no worries. My schedule is currently quite packed so the next release will probably be a month or two from now. Plenty of time still :)

  9. 25 remaining items

  10. selwin commented on Sep 30, 2023

    @selwin
    Author
  11. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Sep 30, 2023
  12. antonpirker commented on Oct 2, 2023

    @antonpirker
    Contributor

    Thanks @selwin !

    In theory it works now, but I discovered a strange behavior. Calling job.is_failed in the Sentry integration, changes the status of the job.

    Look at this:

    test_sentry.py > /Users/antonpirker/code/sentry-python/sentry_sdk/integrations/rq.py(100)sentry_patched_handle_exception()
         99             import ipdb; ipdb.set_trace()
    --> 100             if job._status == JobStatus.FAILED or job.is_failed:
        101                 _capture_exception(exc_info)  # type: ignore
    
    ipdb> job._status
    <JobStatus.FAILED: 'failed'>
    ipdb> job.is_failed
    False
    ipdb> job._status
    'started'
    ipdb> 
    

    So job._status is failed, but when I then call job.is_failed the _status is set to 'started' because the is_failed gets the status from the connection and sets _status.

    The if in the Sentry SDK works with the new behavior and I am also ok with releasing it like this (will add a note that the order of the or statement in the if is important.

    I just wanted to let you know about this behavior.

  13. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Oct 2, 2023
  14. selwin commented on Oct 2, 2023

    @selwin
    Author

    Thanks!

    So job._status is failed, but when I then call job.is_failed the _status is set to 'started' because the is_failed gets the status from the connection and sets _status.

    Yes, job.is_failed() calls get_status() gets job status from Redis so the user gets the most recent status and caches it in _status. In hindsight I should have designed it a bit differently.

  15. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Oct 2, 2023
  16. antonpirker commented on Oct 3, 2023

    @antonpirker
    Contributor

    Now worries, as long it is works that is fine :-)
    I need an internal code review, and then we can deploy this with the next release of the SDK (this or next week)

  17. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Oct 3, 2023
  18. antonpirker commented on Oct 11, 2023

    @antonpirker
    Contributor
  19. selwin commented on Oct 11, 2023

    @selwin
    Author

    Thanks! Now the pressure is on me to finish the feature 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions