Skip to content

Conversation

@keelerm84
Copy link
Member

No description provided.

@keelerm84 keelerm84 requested a review from a team as a code owner August 5, 2025 15:46
@cursor
Copy link

cursor bot commented Aug 5, 2025

🚨 Bugbot Trial Expired

Your team's Bugbot trial has expired. Please contact your team administrator to turn on the paid plan to continue using Bugbot.

A team admin can activate the plan in the Cursor dashboard.

@keelerm84
Copy link
Member Author

bugbot run

cursor[bot]

This comment was marked as outdated.

next(sync)
assert False, "Expected StopIteration"
except StopIteration:
pass No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Newline at end of file.

)

if self._event.wait(self._poll_interval):
break
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: PollingDataSource Fails to Handle Exceptions and Retries Prematurely

The PollingDataSource.sync() method has two issues:

  1. It does not catch exceptions raised by requester.fetch(). Network errors (e.g., timeouts, connection failures) will propagate, terminating the synchronizer generator instead of yielding an INTERRUPTED or OFF Update. This can crash the polling process in production.
  2. On recoverable HTTP errors, sync() immediately retries without waiting for the configured poll interval. This creates a tight loop that can excessively hammer the polling endpoint and consume CPU.
Fix in Cursor Fix in Web

@keelerm84 keelerm84 merged commit 5398878 into main Aug 12, 2025
12 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-1412/polling-as-sync branch August 12, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants