-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(webhooks): prevent raise on give up #3295
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeError: expo() got an unexpected keyword argument 'raise_on_giveup'
Whoops, looks like it's only available since 2.0 which something in our deps graph is preventing. I'll fix this up. Sorry! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a double take to understand how the test works, but it looks good.
This seems fair on my own review so I've tried to add a bit more verbiage in the test to help clarify. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3295 +/- ##
==========================================
- Coverage 95.99% 95.95% -0.04%
==========================================
Files 1068 1068
Lines 32721 32721
==========================================
- Hits 31411 31399 -12
- Misses 1310 1322 +12 ☔ View full report in Codecov by Sentry. |
@@ -16,7 +16,7 @@ | |||
class RudderstackWrapper(AbstractBaseIdentityIntegrationWrapper): | |||
def __init__(self, config: RudderstackConfiguration): | |||
rudder_analytics.write_key = config.api_key | |||
rudder_analytics.data_plane_url = config.base_url | |||
rudder_analytics.dataPlaneUrl = config.base_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a change in v2 of the rudderstack library. It blows my mind that they've moved from snake case to camel in a python library 🤯 but it is what it is. I've tested it locally to verify this is correct.
Changes
Prevent the code from raising the exception on give up off the backoff logic. Should resolve this sentry issue. I've also changed the log level on backoff give up to warning which should resolve this sentry issue.
This change required an update to backoff which subsequently involved upgrading both segment and rudderstack packages since the existing versions had both pinned older versions of backoff.
How did you test this code?
I've added a unit test to test the change to the backoff functionality and manually tested (by running the API locally) the integrations with segment and rudderstack.