Fix SPO incremental sync skipping sites with unchanged timestamps#3995
Open
kmitul wants to merge 3 commits into
Open
Fix SPO incremental sync skipping sites with unchanged timestamps#3995kmitul wants to merge 3 commits into
kmitul wants to merge 3 commits into
Conversation
Contributor
|
Hey, we really appreciate this contribution! In the meantime, and just throwing this out there, we have built a SharePoint Online Connector that can fetch SPO data (although not into an index), that might or might not fit into what you're building - https://www.elastic.co/docs/reference/kibana/connectors-kibana/sharepoint-online-action-type - and we've been very actively iterating on that side of connectors so it might be a bit easier to incorporate feedback if this does end up fitting your use case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3994
In
get_docs_incrementally, thesites()call usedcheck_timestamp=True, filtering out sites whoselastModifiedDateTimehadn't changed. When a site was skipped, its drive delta links were never consumed — silently dropping drive item deletions and modifications.This is the same class of bug already fixed for
site_drives:The fix applies the same pattern one level up:
check_timestamp=Falseforsites()in incremental sync.Checklists
Pre-Review Checklist
Changes Requiring Extra Attention
N/A — one-line change to a boolean flag, no new dependencies or security implications.
Release Note
SharePoint Online incremental sync could silently skip entire sites when their
lastModifiedDateTimewas unchanged, causing drive item deletions and modifications to be missed. Fixed by ensuring all sites are iterated during incremental sync, consistent with the existing behavior for site drives.