Skip to content

Conversation

Weves
Copy link
Contributor

@Weves Weves commented May 11, 2025

Description

Fixes https://linear.app/danswer/issue/DAN-1964/fix-poll-range-start

How Has This Been Tested?

Integration test.

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

@Weves Weves requested a review from a team as a code owner May 11, 2025 20:53
Copy link

vercel bot commented May 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2025 8:58pm

sanitized_e.__traceback__ = e.__traceback__
raise sanitized_e
try:
sanitized_e = type(e)(str(e)[:1024])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this previously raised an exception for exception types that needed more args

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR fixes polling connector indexing by modifying how the start time window is determined, ensuring more accurate document polling through proper tracking of poll range timestamps.

  • Added poll_range_start and poll_range_end fields in /backend/onyx/server/documents/models.py to properly track polling windows
  • Modified get_last_successful_attempt_poll_range_end in /backend/onyx/db/connector_credential_pair.py to use actual poll end times instead of start times
  • Added comprehensive integration test in /backend/tests/integration/tests/indexing/test_polling.py to validate polling window behavior
  • Updated indexing logic in /backend/onyx/background/indexing/run_indexing.py to reuse polling windows for failed/canceled attempts
  • Enhanced error handling in /backend/onyx/background/celery/tasks/indexing/tasks.py for exception sanitization failures

5 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

@Weves Weves added this pull request to the merge queue May 12, 2025
Merged via the queue into main with commit b19515e May 12, 2025
11 checks passed
@Weves Weves deleted the fix-window-start-time branch May 12, 2025 01:14
ferdinandl007 pushed a commit to ferdinandl007/onyx that referenced this pull request May 19, 2025
* Fix window_start

* Add comment
ZhipengHe pushed a commit to ZhipengHe/onyx that referenced this pull request Jun 6, 2025
* Fix window_start

* Add comment
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
* Fix window_start

* Add comment
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.

2 participants