pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

[BUG] Hubspot's "Deal Updated" can get into a perpetual error state due to exceeding rate limit of requests

Open dangub opened this issue 2 years ago • 1 comments

Describe the bug When the amount of modified changes is high (about 500+), the Deal Updated source needs to paginate through multiple pages of 100 search results each, which causes Hubspot's rate limit of 4 search / sec to be exceeded. This causes an unhandled error, which prevents the Deal Updated from setting the last-checked timestamp. As a result, running the source again, runs into the same problem.

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Add around 1000 new deals into Hubspot.
  2. Run Deal Updated source
  3. Observe HTTP 429 error in log
  4. Run Deal Updated again - same events are emitted. And again, the log shows 429.

Expected behavior All updated events are emitted, and only once.

Additional context

  • This behaviour is currently exacerbated by #4208, where on first run events for the entire month are emitted
  • The chance of many deal updates happening all at once seem pretty low, but Hubspot has a peculiar behavior where when the Pipeline is updated, all deals' hs_lastmodifieddate property is updated. This can cause this bug, but also an undesired behavior overall, since there's no way currently to specify which property is being observed for changes.
  • The right approach is to use webhooks, per #4120.

dangub avatar Sep 10 '22 18:09 dangub

Thanks Dan. I'm adding this to the team's backlog.

For whomever picks this up - see #4208 , as well.

dylburger avatar Sep 10 '22 21:09 dylburger

Hi everyone, all test cases are passed! Ready for release!

Test report Hubspot_4232_2315.pdf

vunguyenhung avatar Sep 16 '22 16:09 vunguyenhung